From 7fe4d97bde52ade3cd71ad8f29e0221c56d85e4d Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Fri, 4 Apr 2025 20:19:26 +0100 Subject: [PATCH 01/17] chore: removal of the simulation scripts, not needed anymore --- contracts/hardhat.config.ts | 1 - contracts/scripts/simulations/README.md | 157 ------- contracts/scripts/simulations/tasks.ts | 568 ------------------------ contracts/scripts/simulations/utils.ts | 158 ------- 4 files changed, 884 deletions(-) delete mode 100644 contracts/scripts/simulations/README.md delete mode 100644 contracts/scripts/simulations/tasks.ts delete mode 100644 contracts/scripts/simulations/utils.ts diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 1e6c8b4bf..06ea08325 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -13,7 +13,6 @@ import "hardhat-watcher"; import "hardhat-docgen"; import "hardhat-contract-sizer"; import "hardhat-tracer"; -require("./scripts/simulations/tasks"); require("./scripts/populatePolicyRegistry"); require("./scripts/populateCourts"); require("./scripts/changeGovernor"); diff --git a/contracts/scripts/simulations/README.md b/contracts/scripts/simulations/README.md deleted file mode 100644 index 989f29edf..000000000 --- a/contracts/scripts/simulations/README.md +++ /dev/null @@ -1,157 +0,0 @@ -# Guide: Executing the dispute simulations tasks - -1. Copy and paste the file `.env.example` and rename it to `.env`. -2. Make sure to be located inside the contracts folder: - -```bash -$ cd kleros-v2/contracts/ -``` - -#### To run the scripts in hardhat's localhost network, first you need to do this - -```bash -# Open 2 terminals, on the first one, run this: -$ yarn hardhat node --tags Arbitration -# and on the second one, deploy the Arbitrable: -$ yarn deploy --network localhost --tags HomeArbitrable -# all set, from now on, run the scripts on the second console -``` - -## Scripts start here - -Note that if you get some gas related errors when executing any script, you can go to the file `contracts/scripts/simulations/utils.ts` and modify the variable `options` to have more GasPrice/GasLimit. Then save the file and you're good to go. - -#### Simulate All - -```bash -# This script simulates all at once. -$ yarn hardhat simulate:all --network localhost -``` - -#### Individual scripts - -#### Split PNK - -```bash -# This script quickly sends PNK from one wallet to other 4 wallets (the ones declared on the "hardhat.config.ts" as private keys, private key 1 matches walletindex 0, and so on). ENSURE that the five wallets from `.env` are correctly funded with ETH and PNK. Otherwise you will get a lot of nasty errors. In this example, you will need 800 PNK to perform this transaction, because will send 200 PNK to each wallet, watch out. -$ yarn hardhat simulate:split-pnk --walletindex 0 --pnkperwallet 200 --network arbitrumSepolia -``` - -#### Stake PNK - -```bash -# approve KlerosCore to use your PNK tokens on 5 different wallets, then stake them on the court "1" (specify courtid in parameter) -$ yarn hardhat simulate:stake-five-jurors --walletindexes 0,1,2,3,4 --pnkamounts 200,200,200,200,200 --courtid 1 --network arbitrumSepolia -``` - -#### (optional) Create Court - -```bash -# create a new court. Note that the config for creating this court is hardcoded in the task "create-court" in the file "contracts/scripts/simulations/tasks.ts". If you want a specific configuration for the court, you can go there and change the variables. -$ yarn hardhat simulate:create-court --walletindex 0 --network localhost -``` - -#### Create Dispute - -```bash -# create a new dispute (you need some ETH on the calling wallet) -$ yarn hardhat simulate:create-dispute --walletindex 0 --courtid 1 --nbofchoices 2 --nbofjurors 3n --feeforjuror 100000000000000000n --network arbitrumSepolia -``` - -#### To Freezing and Generating phase - -```bash -# pass Core and DK 1 phase each, core to 'freezing' and DK to 'generating' -$ yarn hardhat simulate:to-freezing-and-generating-phase --walletindex 0 --network arbitrumSepolia -``` - -#### Waits for Rng - -```bash -# waits for the random number to be generated and lets you know, we can not continue until this is done -$ yarn hardhat simulate:wait-for-rng --network arbitrumSepolia -``` - -#### Pass DK phase, draw, unfreeze - -```bash -# once the number is generated, this function will move DK to the phase 'drawing', it also draws the jurors for the dispute, then returns the DK and Core phases to 'resolving' and 'staking', respectively -$ yarn hardhat simulate:pass-phase-draw-unfreeze --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` - -#### (if you created multiple disputes you can use Draw individually) - -```bash -# draw jurors for a dispute -$ yarn hardhat simulate:draw --walletindex 0 --disputeid 5 --network arbitrumSepolia -``` - -#### Submit Evidence - -```bash -# submits evidence -$ yarn hardhat simulate:submit-evidence --walletindex 0 --evidencegroupid 35485348662853211036000747072835336201257659261269148469720238392298048238137 --network arbitrumSepolia -``` - -#### Dispute period to Commit - -```bash -# passes the dispute period to commit -$ yarn hardhat simulate:pass-period --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` - -#### Cast Commit - -```bash -# a juror commits its vote -$ yarn hardhat simulate:cast-commit --walletindex 1 --disputeid 0 --choice 1 --justification because --network arbitrumSepolia -``` - -#### Dispute period to Vote - -```bash -# passes the dispute period to voting -$ yarn hardhat simulate:pass-period --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` - -#### Cast Vote - -```bash -# a juror votes. In case there wasn't a commit period, omit the --salt parameter. In case there was a commit period, the commit and vote parameters have to match, and you must include the salt which for testing purposes we will use "123" -$ yarn hardhat simulate:cast-vote --walletindex 1 --disputeid 0 --choice 1 --justification because --salt 123 --network arbitrumSepolia -``` - -#### Dispute period to Appeal - -```bash -# passes the dispute period to appeal -$ yarn hardhat simulate:pass-period --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` - -#### Fund Appeal - -```bash -# appeal a choice -$ yarn hardhat simulate:fund-appeal --walletindex 0 --disputeid 0 --appealchoice 1 --network arbitrumSepolia -``` - -#### Dispute period to Execution - -```bash -# passes the dispute period to execution -$ yarn hardhat simulate:pass-period --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` - -#### Execute Ruling - -```bash -# execute the ruling and end the dispute -$ yarn hardhat simulate:execute-ruling --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` - -#### Withdraw Fees And Rewards - -```bash -# withdraws fees and rewards for the people that won appeals. modify parameters accordingly. -$ yarn hardhat simulate:withdraw-fees-and-rewards --beneficiary 0x1cC9304B31F05d27470ccD855b05310543b70f17 --roundId 0 --choice 1 --walletindex 0 --disputeid 0 --network arbitrumSepolia -``` diff --git a/contracts/scripts/simulations/tasks.ts b/contracts/scripts/simulations/tasks.ts deleted file mode 100644 index 4340456fd..000000000 --- a/contracts/scripts/simulations/tasks.ts +++ /dev/null @@ -1,568 +0,0 @@ -/* eslint-disable promise/param-names */ -import { toBigInt, BigNumberish, AddressLike } from "ethers"; -import { ethers } from "ethers"; -import { task } from "hardhat/config"; -import { - Period, - getContracts, - getWallet, - handleError, - options, - isRngReady, - mineBlocks, - isNetworkLocal, - waitFor, - waitForPeriod, - getArbitrationFees, - getSalt, - getRoundId, - getDrawnJurors, - getLatestRoundId, - findVoteIdInDrawnJurors, - findFirstDrawnJurorWalletIndex, - getAppealCost, -} from "./utils"; - -task("simulate:approve", "Grants permission to KlerosCore to use your PNK tokens") - .addParam("walletindex", "Index of the wallet to call this function from and approve it") - .addParam("pnkamount", "(in normal values, not wei!) Amount of PNK tokens to approve for transfer") - .setAction(async (taskArgs, hre) => { - const { core, pnk } = await getContracts(hre); - const { walletindex, pnkamount } = taskArgs; - - // Get the list of wallets and the network information from the hardhat config file - const { wallet } = await getWallet(hre, walletindex); - - // Approve PNK tokens for transfer to KlerosCore - try { - const approvePNKFunctionArgs: [AddressLike, BigNumberish] = [ - await core.getAddress(), - ethers.parseEther(pnkamount.toString()), - ]; - const resultApproveTx = await pnk.connect(wallet).approve(...approvePNKFunctionArgs, options); - await resultApproveTx.wait(); - console.log(`Approved ${pnkamount} PNK tokens for transfer to KlerosCore from wallet ${wallet.address}`); - console.log(`Transaction hash: ${resultApproveTx.hash}`); - } catch (e) { - handleError(e); - } - }); - -task("simulate:set-stake", "Stakes PNK tokens to participate in the Kleros dispute resolution") - .addParam("walletindex", "Index of the wallet to call this function from and stake it") - .addParam("pnkamount", "(in normal values, not wei!) Amount of PNK tokens to stake") - .addParam("courtid", "the ID of the court you want to stake on (General Court ID = 1") - .setAction(async (taskArgs, hre) => { - const { core } = await getContracts(hre); - const { walletindex, pnkamount, courtid } = taskArgs; - - const { wallet } = await getWallet(hre, walletindex); - - // Stakes PNK tokens in the Court you specified as parameter of this task - try { - const setStakeFunctionArgs: [string, bigint] = [courtid, ethers.parseEther(pnkamount.toString())]; - const resultSetStakeTx = await core.connect(wallet).setStake(...setStakeFunctionArgs, options); - await resultSetStakeTx.wait(); - console.log(`setStake wallet ${wallet.address}, txID: %s`, resultSetStakeTx?.hash); - } catch (e) { - handleError(e); - } - }); - -task("simulate:create-court", "callable by Governor only. Create a new Court") - .addParam("walletindex", "Index of the wallet to use for creating the Court") - .setAction(async (taskArgs, hre) => { - const { core } = await getContracts(hre); - const { walletindex } = taskArgs; - - const { wallet } = await getWallet(hre, walletindex); - - const parent = 1n; - const minStake = 2n * 10n ** 20n; - const alpha = 10000n; - const feeForJuror = 10n ** 17n; - const jurorsForCourtJump = 3n; - const hiddenVotes = false as boolean; - const timesPerPeriod = [300, 300, 300, 300] as [BigNumberish, BigNumberish, BigNumberish, BigNumberish]; - const sortitionSumTreeK = ethers.toBeHex(3); - const supportedDisputeKits = [1] as BigNumberish[]; // IDs of supported dispute kits - let courtID; - try { - const tx = await ( - await core - .connect(wallet) - .createCourt( - parent, - hiddenVotes, - minStake, - alpha, - feeForJuror, - jurorsForCourtJump, - timesPerPeriod, - sortitionSumTreeK, - supportedDisputeKits - ) - ).wait(); - console.log("createCourt txID: %s", tx?.hash); - // Get the court ID from the KlerosCore contract event logs - const filter = core.filters.CourtCreated(); - const logs = await core.queryFilter(filter, tx?.blockNumber, tx?.blockNumber); - const courtCreatedLog = logs[logs.length - 1]; - courtID = courtCreatedLog.args._courtID; - console.log( - `Created Court ${courtID} with these supportedDisputeKits: ${courtCreatedLog.args._supportedDisputeKits}` - ); - const newCourt = await core.courts(courtID); - console.log(`Details of this new court: ${newCourt}`); - } catch (e) { - handleError(e); - } - return courtID; - }); - -task("simulate:create-dispute", "Creates a dispute on an arbitrable contract") - .addParam("walletindex", "Index of the wallet to use for creating the dispute") - .addParam("courtid", "ID of the court to create the dispute in") - .addParam("nbofchoices", "Number of choices for the dispute") - .addParam("nbofjurors", "Number of jurors for the dispute (in BigInt) (ex: 3n)") - .addParam("feeforjuror", "Fee for each juror in wei (in BigInt) (ex: 100000n)") - .setAction(async (taskArgs, hre) => { - const { arbitrable, core } = await getContracts(hre); - const { walletindex, courtid, nbofchoices, nbofjurors, feeforjuror } = taskArgs; - const { ethers } = hre; - - const { wallet } = await getWallet(hre, walletindex); - - // Create a random evidence group ID - const evidenceGroupID = toBigInt(ethers.randomBytes(32)).toString(); - - let disputeID; - try { - // Create a dispute on the arbitrable contract - const tx = await arbitrable.connect(wallet)["createDispute(string)"]("hello world", { - value: getArbitrationFees(hre, nbofjurors, feeforjuror), - ...options, - }); - await tx.wait(); - console.log("createDisputeOnArbitrable txID: %s", tx?.hash); - - // Get the dispute ID from the KlerosCore contract event logs - const filter = core.filters.DisputeCreation(); - const logs = await core.queryFilter(filter); - disputeID = logs[logs.length - 1]?.args?._disputeID; - console.log("Created Dispute %s on Court %s with evidenceGroupID %s", disputeID, courtid, evidenceGroupID); - } catch (e) { - handleError(e); - } - const dispute = { - id: disputeID, - evidenceGroupID: evidenceGroupID, - }; - return dispute; - }); - -task("simulate:pass-phase", "Pass the phase of the SortitionModule") - .addParam("walletindex", "Index of the wallet to use for passing the phase") - .setAction(async (taskArgs, hre) => { - const { sortition } = await getContracts(hre); - const { walletindex } = taskArgs; - - const { wallet } = await getWallet(hre, walletindex); - - const before = await sortition.phase(); - try { - const tx = await (await sortition.connect(wallet).passPhase(options)).wait(); - console.log("passPhaseCore txID: %s", tx?.hash); - } catch (e) { - handleError(e); - } finally { - const after = await sortition.phase(); - console.log("phaseCore: %d -> %d", before, after); - } - }); - -task("simulate:wait-for-rng", "Waits for the RNG to be ready").setAction(async (taskArgs, hre) => { - const walletIndex = 0; - const { wallet } = await getWallet(hre, walletIndex); - - let ready: boolean; - - try { - ready = await isRngReady(wallet, hre); - } catch (e) { - ready = false; - } - while (!ready) { - console.log("Waiting for RNG to be ready..."); - await new Promise((r) => setTimeout(r, 10000)); - ready = await isRngReady(wallet, hre); - } -}); - -task("simulate:draw", "Draws jurors for a dispute on Kleros") - .addParam("walletindex", "Index of the wallet to use for drawing jurors") - .addParam("disputeid", "The ID of the dispute to draw jurors for") - .setAction(async (taskArgs, hre) => { - const { core } = await getContracts(hre); - const { disputeid, walletindex } = taskArgs; - const { wallet } = await getWallet(hre, walletindex); - - let info = await core.getRoundInfo(disputeid, 0); - console.log("Drawn jurors before: %O", info.drawnJurors); - try { - const tx = await (await core.connect(wallet).draw(disputeid, 10, options)).wait(); - console.log("draw txID: %s", tx?.hash); - } catch (e) { - handleError(e); - } finally { - info = await core.getRoundInfo(disputeid, 0); - console.log("Drawn jurors after: %O", info.drawnJurors); - } - }); - -task("simulate:pass-period", "Passes the period of a dispute on Kleros Core") - .addParam("walletindex", "Index of the wallet to use for passing period") - .addParam("disputeid", "The ID of the dispute") - .setAction(async (taskArgs, hre) => { - const { core } = await getContracts(hre); - const { disputeid, walletindex } = taskArgs; - const { wallet } = await getWallet(hre, walletindex); - - const before = (await core.disputes(disputeid)).period; - - try { - const tx = await (await core.connect(wallet).passPeriod(disputeid, options)).wait(); - console.log("passPeriod txID: %s", tx?.hash); - } catch (e) { - handleError(e); - } finally { - const after = (await core.disputes(disputeid)).period; - console.log("Period for dispute %s: %d -> %d", disputeid, before, after); - } - }); - -task("simulate:cast-commit", "Casts a commit for a drawn juror") - .addParam("walletindex", "Index of the wallet to use for casting the commit") - .addParam("disputeid", "The ID of the dispute to vote on") - .addParam("choice", "The ID of the choice you will vote") - .addParam("justification", "The justification of making that choice, not mandatory") - .setAction(async (taskArgs, hre) => { - const { disputeKitClassic } = await getContracts(hre); - const { disputeid, walletindex, choice } = taskArgs; - const { wallet } = await getWallet(hre, walletindex); - - const salt = "123"; - console.log("salt used on juror %s is: %s", walletindex, salt); - const generateCommit = (choice: number, justification: string) => { - const hash = ethers.solidityPackedKeccak256(["uint256", "string", "string"], [choice, justification, salt]); - return ethers.toBeHex(hash); - }; - const commitHash = generateCommit(choice, taskArgs.justification); - const drawnJurors = await getDrawnJurors(hre, disputeid, getRoundId(taskArgs, hre, disputeid)); - const voteid = findVoteIdInDrawnJurors(wallet.address, drawnJurors); - const voteIdsParam = [voteid.toString()]; - - const castCommitFunctionArgs: [string, string[], string] = [disputeid, voteIdsParam, commitHash]; - const tx = await disputeKitClassic.connect(wallet).castCommit(...castCommitFunctionArgs); - await tx.wait(); - - console.log("juror %s cast a commit on txID: %s", wallet.address, tx?.hash); - }); - -task("simulate:cast-vote", "Casts a vote for a drawn juror") - .addParam("walletindex", "Index of the wallet to use for casting the vote") - .addParam("disputeid", "The ID of the dispute to vote on") - .addParam("choice", "The ID of the choice you will vote") - .addParam("justification", "if there was a commit phase this must match the justification too") - .addOptionalParam("salt", "the salt used for the commit ONLY IF there was a commit period") - .setAction(async (taskArgs, hre) => { - const { disputeKitClassic } = await getContracts(hre); - const { disputeid, walletindex, choice } = taskArgs; - const { wallet } = await getWallet(hre, walletindex); - const drawnJurors = await getDrawnJurors(hre, disputeid, getRoundId(taskArgs, hre, disputeid)); - const voteid = findVoteIdInDrawnJurors(wallet.address, drawnJurors); - const voteIdsParam = [voteid.toString()]; - - const castVoteFunctionArgs: [string, string[], string, string, string] = [ - disputeid, - voteIdsParam, - choice, - getSalt(taskArgs), - taskArgs.justification, - ]; - const tx = await disputeKitClassic.connect(wallet).castVote(...castVoteFunctionArgs); - await tx.wait(); - - console.log("juror %s cast a vote on txID: %s", wallet.address, tx?.hash); - }); - -task("simulate:fund-appeal", "Funds an appeal on a dispute") - .addParam("walletindex", "Index of the wallet to use for funding the appeal") - .addParam("disputeid", "The ID of the dispute to fund an appeal for") - .addParam("appealchoice", "The choice being funded (0 or 1)") - .setAction(async (taskArgs, hre) => { - const { disputeKitClassic } = await getContracts(hre); - const { disputeid, walletindex, appealchoice } = taskArgs; - const { wallet } = await getWallet(hre, walletindex); - - const fundAppealFunctionArgs: [number, number, { value: BigNumberish }] = [ - disputeid, - appealchoice, - { value: await getAppealCost(hre, disputeid) }, - ]; - - try { - if (isNetworkLocal(hre)) { - const numberOfBlocksToMine = 5; - await mineBlocks(numberOfBlocksToMine, hre.network); - } - const fundAppealTx = await (await disputeKitClassic.connect(wallet).fundAppeal(...fundAppealFunctionArgs)).wait(); - console.log("fundAppeal (in DisputeKitClassic) txID: %s", fundAppealTx?.hash); - } catch (e) { - handleError(e); - } - }); - -task("simulate:execute-ruling", "Executes the ruling for a dispute on KlerosCore") - .addParam("walletindex", "Index of the wallet to use for executing the ruling") - .addParam("disputeid", "The ID of the dispute to execute ruling") - .setAction(async (taskArgs, hre) => { - const { core } = await getContracts(hre); - const { disputeid, walletindex } = taskArgs; - - const { wallet } = await getWallet(hre, walletindex); - const connectedKlerosCore = core.connect(wallet); - let executeRulingTx; - try { - const executeTx = await (await connectedKlerosCore.execute(disputeid, 0, 10)).wait(); // redistribute - console.log("txID execute: %s", executeTx?.hash); - - executeRulingTx = await (await connectedKlerosCore.executeRuling(disputeid)).wait(); // rule - console.log("txID executeRuling: %s", executeRulingTx?.hash); - } catch (e) { - handleError(e); - } finally { - const dispute = await connectedKlerosCore.disputes(disputeid); - console.log("Ruled? %s", dispute.ruled); - - const ruling = await connectedKlerosCore.currentRuling(disputeid); - console.log("Ruling: %d, Tied? %s, Overridden? %s", ruling.ruling, ruling.tied, ruling.overridden); - } - }); - -task("simulate:withdraw-fees-and-rewards", "Withdraws fees and rewards for people who appealed and won") - .addParam("walletindex", "Index of the wallet to use for executing the ruling") - .addParam("disputeid", "The ID of the dispute to execute ruling") - .addParam("beneficiary", "The address of the person who won the appeal") - .addOptionalParam("roundid", "the round ID the appeal took place") - .addParam("choice", "the choice you want to withdraw from") - .setAction(async (taskArgs, hre) => { - const { disputeKitClassic } = await getContracts(hre); - const { disputeid, walletindex, beneficiary, choice } = taskArgs; - - const { wallet } = await getWallet(hre, walletindex); - // disputeid, beneficiary, getRoundId(taskArgs, hre, disputeid), choice - // toBigInt(disputeid), - // await ethers.getAddress(beneficiary), - // getRoundId(taskArgs, hre, disputeid), - // choice - const _disputeId: BigNumberish = disputeid; - const _beneficiary: AddressLike = beneficiary; - const _coreRoundId: BigNumberish = await getRoundId(taskArgs, hre, disputeid); - const _choice: BigNumberish = choice; - try { - const withdrawTx = await ( - await disputeKitClassic.connect(wallet).withdrawFeesAndRewards(_disputeId, _beneficiary, _coreRoundId, _choice) - ).wait(); // redistribute - console.log("txID withdrawFeesAndRewards: %s", withdrawTx?.hash); - } catch (e) { - handleError(e); - } - }); - -task("simulate:stake-five-jurors", "Approve and stake 5 different wallets on the court 1") - .addParam("walletindexes", "An array of wallet indexes that you want to stake (ex: 0,1,2,3,4)") - .addParam("pnkamounts", "An array of pnkamounts to stake (in normal values, not wei!) (ex: 200,300,200,100,200)") - .addParam("courtid", "the ID of the court you want to stake on (General Court ID = 1") - .setAction(async (taskArgs, hre) => { - const walletIndexes = taskArgs.walletindexes.split(",").map((index) => index.toString()); - const pnkAmounts = taskArgs.pnkamounts.split(",").map((amount) => amount.toString()); - const { courtid } = taskArgs; - - await hre.run("simulate:approve", { walletindex: walletIndexes[0], pnkamount: pnkAmounts[0] }); - await hre.run("simulate:approve", { walletindex: walletIndexes[1], pnkamount: pnkAmounts[1] }); - await hre.run("simulate:approve", { walletindex: walletIndexes[2], pnkamount: pnkAmounts[2] }); - await hre.run("simulate:approve", { walletindex: walletIndexes[3], pnkamount: pnkAmounts[3] }); - await hre.run("simulate:approve", { walletindex: walletIndexes[4], pnkamount: pnkAmounts[4] }); - - await hre.run("simulate:set-stake", { walletindex: walletIndexes[0], pnkamount: pnkAmounts[0], courtid: courtid }); - await hre.run("simulate:set-stake", { walletindex: walletIndexes[1], pnkamount: pnkAmounts[1], courtid: courtid }); - await hre.run("simulate:set-stake", { walletindex: walletIndexes[2], pnkamount: pnkAmounts[2], courtid: courtid }); - await hre.run("simulate:set-stake", { walletindex: walletIndexes[3], pnkamount: pnkAmounts[3], courtid: courtid }); - await hre.run("simulate:set-stake", { walletindex: walletIndexes[4], pnkamount: pnkAmounts[4], courtid: courtid }); - }); - -task("simulate:to-freezing-and-generating-phase", "Pass phase from 'staking' to 'generating") - .addParam("walletindex", "Index of the wallet to use for calling this task") - .setAction(async (taskArgs, hre: any) => { - const { walletindex } = taskArgs; - await hre.run("simulate:pass-phase", { walletindex: walletindex }); - if (isNetworkLocal(hre)) { - const { sortition, randomizerMock, randomizerRng } = await getContracts(hre); - const { wallet } = await getWallet(hre, walletindex); - const numberOfBlocksToMine = Number(await sortition.rngLookahead()); - await mineBlocks(numberOfBlocksToMine, hre.network); - await randomizerMock.connect(wallet).relay(randomizerRng.target, 0, ethers.randomBytes(32)); - } - }); - -task( - "simulate:pass-phase-draw-unfreeze", - "Passes phase from 'generating' to 'drawing', draws the jurors, then passes the phase to 'staking'." -) - .addParam("walletindex", "Index of the wallet to use for calling this task") - .addParam("disputeid", "The ID of the dispute to draw jurors for") - .setAction(async (taskArgs, hre) => { - await hre.run("simulate:pass-phase", { walletindex: taskArgs.walletindex }); - await hre.run("simulate:draw", { walletindex: taskArgs.walletindex, disputeid: taskArgs.disputeid }); - await hre.run("simulate:pass-phase", { walletindex: taskArgs.walletindex }); - }); - -task("simulate:split-pnk", "one wallet funds with PNK the other 4 wallets") - .addParam("walletindex", "Index of the wallet to use for calling this task") - .addParam("pnkperwallet", "PNK amount sent to each wallet") - .setAction(async (taskArgs, hre) => { - const { pnk } = await getContracts(hre); - const { walletindex, pnkperwallet } = taskArgs; - const { wallet } = await getWallet(hre, walletindex); - const amount = ethers.parseEther(pnkperwallet.toString()); - - const firstWallet = await (await getWallet(hre, 1)).wallet; - const secondWallet = await (await getWallet(hre, 2)).wallet; - const thirdWallet = await (await getWallet(hre, 3)).wallet; - const fourthWallet = await (await getWallet(hre, 4)).wallet; - const firstTx = await pnk.connect(wallet).transfer(firstWallet.address, amount); - console.log("funded wallet %s with %s: %s", firstWallet.address, amount, firstTx?.hash); - const secondTx = await pnk.connect(wallet).transfer(secondWallet.address, amount); - console.log("funded wallet %s with %s: %s", secondWallet.address, amount, secondTx?.hash); - const thirdTx = await pnk.connect(wallet).transfer(thirdWallet.address, amount); - console.log("funded wallet %s with %s: %s", thirdWallet.address, amount, thirdTx?.hash); - const fourthTx = await pnk.connect(wallet).transfer(fourthWallet.address, amount); - console.log("funded wallet %s with %s: %s", fourthWallet.address, amount, fourthTx?.hash); - }); - -task("simulate:submit-evidence", "Submits evidence to a dispute") - .addParam("walletindex", "Index of the wallet to use for submitting evidence") - .addParam("evidencegroupid", "The evidenceGroupID, which is linked to the dispute") - .setAction(async (taskArgs, hre) => { - const { evidenceModule } = await getContracts(hre); - const { walletindex, evidencegroupid } = taskArgs; - - const { wallet } = await getWallet(hre, walletindex); - const evidence = "/ipfs/QmaNEknCUEKDy74sDNLFXo8Vc3PqX7QC1ZyvUx4n7V6q1L/evidence.json"; - try { - const tx = await (await evidenceModule.connect(wallet).submitEvidence(evidencegroupid, evidence)).wait(); - console.log("txID submitEvidence: %s", tx?.hash); - } catch (e) { - handleError(e); - } - }); - -task("simulate:all", "Simulates arbitration activity to troubleshoot the subgraph and frontend").setAction( - async (taskArgs, hre) => { - const { sortition } = await getContracts(hre); - const operator = 0; - const stake = 1000; - const courtId = "1"; - const appealChoice = "1"; - - console.log("split pnk....."); - await hre.run("simulate:split-pnk", { walletindex: operator.toString(), pnkperwallet: stake.toString() }); - - console.log("stake five jurors...."); - await hre.run("simulate:stake-five-jurors", { - walletindexes: "0,1,2,3,4", - pnkamounts: `${stake},${stake},${stake},${stake},${stake}`, - courtid: courtId, - }); - - console.log("create dispute...."); - const dispute = await hre.run("simulate:create-dispute", { - walletindex: operator.toString(), - courtid: courtId.toString(), - nbofchoices: "2", - nbofjurors: "3", - feeforjuror: ethers.parseEther("0.1").toString(), - }); - - // Wait for minStakingTime - const minStakingTime = await sortition.minStakingTime(); - await waitFor(ethers.getNumber(minStakingTime), hre); - - // Phase Staking -> Generating - console.log("to freezing and generating phase....."); - await hre.run("simulate:to-freezing-and-generating-phase", { walletindex: operator.toString() }); - - // Wait for RNG - console.log("wait for rng...."); - await hre.run("simulate:wait-for-rng"); - - // Phase: Generating -> Drawing - // Draws - // Phase: Drawing -> Staking - console.log("pass phase draw unfreeze....."); - await hre.run("simulate:pass-phase-draw-unfreeze", { - walletindex: operator.toString(), - disputeid: dispute.id.toString(), - }); - - // Submit evidence - console.log("submit evidence....."); - await hre.run("simulate:submit-evidence", { - walletindex: operator.toString(), - evidencegroupid: dispute.evidenceGroupID, - }); - - // Period: Evidence -> Vote - await waitForPeriod(dispute.id, Period.Evidence, hre); - console.log("pass period....."); - await hre.run("simulate:pass-period", { walletindex: operator.toString(), disputeid: dispute.id.toString() }); - - // Find the first drawn juror and the corresponding wallet index - const drawnJurors = await getDrawnJurors(hre, dispute.id, getLatestRoundId(hre, dispute.id)); - const firstDrawnJurorWalletIndex = (await findFirstDrawnJurorWalletIndex(hre, drawnJurors)) as number; - - // Vote - console.log("cast vote....."); - await hre.run("simulate:cast-vote", { - walletindex: firstDrawnJurorWalletIndex.toString(), - disputeid: dispute.id.toString(), - choice: "1", - justification: "because", - }); - - // Period: Vote -> Appeal - await waitForPeriod(dispute.id, Period.Vote, hre); - console.log("pass period...."); - await hre.run("simulate:pass-period", { walletindex: operator.toString(), disputeid: dispute.id.toString() }); - - // Fund Appeal - console.log("fund appeal...."); - await hre.run("simulate:fund-appeal", { - walletindex: operator.toString(), - disputeid: dispute.id.toString(), - appealchoice: appealChoice, - }); - - // Period: Appeal -> Execution - await waitForPeriod(dispute.id, Period.Appeal, hre); - console.log("pass period...."); - await hre.run("simulate:pass-period", { walletindex: operator.toString(), disputeid: dispute.id.toString() }); - - // Execution - console.log("execute ruling...."); - await hre.run("simulate:execute-ruling", { walletindex: operator.toString(), disputeid: dispute.id.toString() }); - } -); - -module.exports = {}; diff --git a/contracts/scripts/simulations/utils.ts b/contracts/scripts/simulations/utils.ts deleted file mode 100644 index 454df6bfd..000000000 --- a/contracts/scripts/simulations/utils.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { setTimeout } from "timers/promises"; -import { - KlerosCore, - SortitionModule, - DisputeKitClassic, - PNK, - RandomizerRNG, - EvidenceModule, - ArbitrableExample, - RandomizerMock, -} from "../../typechain-types"; -import { toBigInt, ethers } from "ethers"; - -export enum Period { - Evidence, - Commit, - Vote, - Appeal, -} - -export const options = { gasLimit: 10000000, gasPrice: 5000000000 }; - -export const getContracts = async (hre) => { - const core = (await hre.ethers.getContract("KlerosCore")) as KlerosCore; - const sortition = (await hre.ethers.getContract("SortitionModule")) as SortitionModule; - const disputeKitClassic = (await hre.ethers.getContract("DisputeKitClassic")) as DisputeKitClassic; - const pnk = (await hre.ethers.getContract("PNK")) as PNK; - const randomizerRng = (await hre.ethers.getContract("RandomizerRNG")) as RandomizerRNG; - const arbitrable = (await hre.ethers.getContract("ArbitrableExample")) as ArbitrableExample; - const evidenceModule = (await hre.ethers.getContract("EvidenceModule")) as EvidenceModule; - const randomizerMock = (await hre.ethers.getContract("RandomizerOracle")) as RandomizerMock; - - return { - core, - sortition, - disputeKitClassic, - pnk, - randomizerRng, - arbitrable, - evidenceModule, - randomizerMock, - }; -}; - -export const handleError = (e: any) => { - if (typeof e === "string") { - console.log("Error: %s", e); - } else if (e instanceof Error) { - console.log("%O", e); - } -}; - -export const getWallet = async (hre: any, walletIndex: number) => { - const signers = await hre.ethers.getSigners(); - const wallet = signers[walletIndex]; - return { wallet }; -}; - -export const isRngReady = async (wallet, hre) => { - const { randomizerRng, disputeKitClassic } = await getContracts(hre); - const requesterID = await randomizerRng.connect(wallet).requesterToID(disputeKitClassic.target); - const n = await randomizerRng.connect(wallet).randomNumbers(requesterID); - if (Number(n) === 0) { - console.log("rng is NOT ready."); - return false; - } else { - console.log("rng is ready: %s", n.toString()); - return true; - } -}; - -export const mineBlocks = async (n: number, network) => { - for (let index = 0; index < n; index++) { - await network.provider.send("evm_mine", []); - } -}; - -export const isNetworkLocal = (hre: any): boolean => { - return hre.network.tags?.local === true; -}; - -export const getArbitrationFees = (hre, nbofjurors: bigint, feeforjuror: bigint) => { - if (isNetworkLocal(hre)) { - return hre.ethers.parseEther("1"); - } else { - return nbofjurors * feeforjuror; - } -}; - -export const getSalt = (taskArgs) => { - if (!taskArgs?.salt || taskArgs.salt === "0") return "0"; - else return taskArgs.salt; -}; - -export const getLatestRoundId = async (hre, disputeid: string) => { - const { core } = await getContracts(hre); - return Number(await core.getNumberOfRounds(disputeid)) - 1; -}; - -export const getRoundId = async (taskArgs, hre, disputeid: string) => { - if (!taskArgs?.roundid) return getLatestRoundId(hre, disputeid); - else return taskArgs.roundid; -}; - -export const getDrawnJurors = async (hre, disputeid, roundid) => { - const { core } = await getContracts(hre); - return (await core.getRoundInfo(disputeid, roundid)).drawnJurors; -}; - -export const findVoteIdInDrawnJurors = (walletAddress: string, drawnJurors: string[]) => { - return drawnJurors.findIndex((address) => address.toLowerCase() === walletAddress.toLowerCase()); -}; - -export const findFirstDrawnJurorWalletIndex = async (hre, drawnJurors) => { - // "i" represents the walletIndex, and the "5" is the length of the walletIndex array (in this case we have 5 accounts) - for (let i = 0; i < 5; i++) { - const { wallet } = await getWallet(hre, i); - const voteId = findVoteIdInDrawnJurors(wallet.address, drawnJurors); - if (voteId !== -1) { - return i; - } - } -}; - -export const getAppealCost = async (hre, disputeId) => { - const { core } = await getContracts(hre); - return await core.appealCost(disputeId); -}; - -export const waitFor = async (seconds: number, hre) => { - if (isNetworkLocal(hre)) { - await hre.network.provider.send("evm_increaseTime", [seconds]); - await hre.network.provider.send("evm_mine"); - } else { - console.log("Waiting for %d seconds...", seconds); - setTimeout(seconds * 1000); // in milliseconds - } -}; - -export const latest = async (network): Promise => { - const latestBlock = (await network.provider.request({ - method: "eth_getBlockByNumber", - params: ["latest", false], - })) as { timestamp: string }; - - return parseInt(latestBlock.timestamp, 16); -}; - -export const waitForPeriod = async (disputeId: number, period: Period, hre) => { - const { core } = await getContracts(hre); - const { lastPeriodChange, courtID } = await core.disputes(disputeId); - const periodDuration = (await core.getTimesPerPeriod(courtID))[period]; - const now = await latest(hre.network); - const remainingDuration = ethers.getNumber(lastPeriodChange + periodDuration - toBigInt(now)); - if (remainingDuration > 0) { - await waitFor(remainingDuration, hre); - } -}; From f793d6a563e5d38d81764648194276c19fb57be5 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Fri, 4 Apr 2025 20:24:33 +0100 Subject: [PATCH 02/17] chore: upgradeAll script and initializers --- contracts/deploy/upgrade-all.ts | 60 ++++++++++ ...e-kit.ts => upgrade-dispute-kit-v0.8.0.ts} | 10 +- ...-core.ts => upgrade-kleros-core-v0.8.0.ts} | 10 +- ....ts => upgrade-sortition-module-v0.8.0.ts} | 8 +- contracts/scripts/utils/contracts.ts | 107 ++++++++++++++---- .../arbitration/DisputeTemplateRegistry.sol | 4 + contracts/src/arbitration/KlerosCore.sol | 4 + contracts/src/arbitration/KlerosCoreNeo.sol | 4 + contracts/src/arbitration/PolicyRegistry.sol | 4 + .../arbitration/devtools/KlerosCoreRuler.sol | 4 + .../dispute-kits/DisputeKitClassic.sol | 4 + .../arbitration/evidence/EvidenceModule.sol | 4 + 12 files changed, 192 insertions(+), 31 deletions(-) create mode 100644 contracts/deploy/upgrade-all.ts rename contracts/deploy/{upgrade-dispute-kit.ts => upgrade-dispute-kit-v0.8.0.ts} (76%) rename contracts/deploy/{upgrade-kleros-core.ts => upgrade-kleros-core-v0.8.0.ts} (76%) rename contracts/deploy/{upgrade-sortition-module-v0.9.0.ts => upgrade-sortition-module-v0.8.0.ts} (79%) diff --git a/contracts/deploy/upgrade-all.ts b/contracts/deploy/upgrade-all.ts new file mode 100644 index 000000000..4881fad05 --- /dev/null +++ b/contracts/deploy/upgrade-all.ts @@ -0,0 +1,60 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { prompt, print } from "gluegun"; +import { deployUpgradable } from "./utils/deployUpgradable"; +import { HomeChains, isSkipped } from "./utils"; +import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; + +const { bold } = print.colors; + +const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, getChainId } = hre; + + // fallback to hardhat node signers on local network + const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; + const chainId = Number(await getChainId()); + console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer); + + const { disputeKitClassic, disputeTemplateRegistry, evidence, core, policyRegistry, sortition } = + await getContractNamesFromNetwork(hre); + + const upgrade = async (contractName: string, initializer: string, args: any[]) => { + try { + print.highlight(`💣 Upgrading ${bold(contractName)}`); + const { confirm } = await prompt.ask({ + type: "confirm", + name: "confirm", + message: "Are you sure you want to proceed?", + }); + if (!confirm) { + console.log("Operation cancelled by user."); + return; + } + print.info(`Upgrading ${contractName}...`); + + // await deployUpgradable(deployments, contractName, { + // newImplementation: contractName, + // initializer, + // from: deployer, + // args, // Warning: do not reinitialize existing state variables, only the new ones + // }); + } catch (err) { + console.error(err); + throw err; + } + }; + + await upgrade(disputeKitClassic, "initializer2", []); + await upgrade(disputeTemplateRegistry, "initialize2", []); + await upgrade(evidence, "initialize2", []); + await upgrade(core, "initialize3", []); + await upgrade(policyRegistry, "initialize2", []); + await upgrade(sortition, "initialize3", []); +}; + +deployUpgradeAll.tags = ["UpgradeAll"]; +deployUpgradeAll.skip = async ({ network }) => { + return isSkipped(network, !HomeChains[network.config.chainId ?? 0]); +}; + +export default deployUpgradeAll; diff --git a/contracts/deploy/upgrade-dispute-kit.ts b/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts similarity index 76% rename from contracts/deploy/upgrade-dispute-kit.ts rename to contracts/deploy/upgrade-dispute-kit-v0.8.0.ts index f6439c91f..e9d497b9b 100644 --- a/contracts/deploy/upgrade-dispute-kit.ts +++ b/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts @@ -2,6 +2,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { deployUpgradable } from "./utils/deployUpgradable"; import { HomeChains, isSkipped } from "./utils"; +import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; const deployUpgradeDisputeKit: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; @@ -12,10 +13,11 @@ const deployUpgradeDisputeKit: DeployFunction = async (hre: HardhatRuntimeEnviro console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer); try { - console.log("upgrading DisputeKitClassicNeo..."); - await deployUpgradable(deployments, "DisputeKitClassicNeo", { - contract: "DisputeKitClassic", - initializer: "initialize", + const { disputeKitClassic: contractName } = await getContractNamesFromNetwork(hre); + console.log(`upgrading ${contractName}...`); + await deployUpgradable(deployments, contractName, { + newImplementation: contractName, + initializer: "initialize2", from: deployer, // Warning: do not reinitialize everything, only the new variables args: [], diff --git a/contracts/deploy/upgrade-kleros-core.ts b/contracts/deploy/upgrade-kleros-core-v0.8.0.ts similarity index 76% rename from contracts/deploy/upgrade-kleros-core.ts rename to contracts/deploy/upgrade-kleros-core-v0.8.0.ts index 9f504e6cc..a02a9ca69 100644 --- a/contracts/deploy/upgrade-kleros-core.ts +++ b/contracts/deploy/upgrade-kleros-core-v0.8.0.ts @@ -2,6 +2,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { deployUpgradable } from "./utils/deployUpgradable"; import { HomeChains, isSkipped } from "./utils"; +import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; const deployUpgradeKlerosCore: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; @@ -12,10 +13,11 @@ const deployUpgradeKlerosCore: DeployFunction = async (hre: HardhatRuntimeEnviro console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer); try { - console.log("upgrading KlerosCoreNeo..."); - await deployUpgradable(deployments, "KlerosCoreNeo", { - newImplementation: "KlerosCoreNeo", - initializer: "initialize", + const { core: contractName } = await getContractNamesFromNetwork(hre); + console.log(`upgrading ${contractName}...`); + await deployUpgradable(deployments, contractName, { + newImplementation: contractName, + initializer: "initialize3", from: deployer, // Warning: do not reinitialize everything, only the new variables args: [], diff --git a/contracts/deploy/upgrade-sortition-module-v0.9.0.ts b/contracts/deploy/upgrade-sortition-module-v0.8.0.ts similarity index 79% rename from contracts/deploy/upgrade-sortition-module-v0.9.0.ts rename to contracts/deploy/upgrade-sortition-module-v0.8.0.ts index 819c240b0..84c9957f0 100644 --- a/contracts/deploy/upgrade-sortition-module-v0.9.0.ts +++ b/contracts/deploy/upgrade-sortition-module-v0.8.0.ts @@ -2,6 +2,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { deployUpgradable } from "./utils/deployUpgradable"; import { HomeChains, isSkipped } from "./utils"; +import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; const deployUpgradeSortitionModule: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; @@ -12,9 +13,10 @@ const deployUpgradeSortitionModule: DeployFunction = async (hre: HardhatRuntimeE console.log("upgrading on %s with deployer %s", HomeChains[chainId], deployer); try { - console.log("upgrading SortitionModuleNeo..."); - await deployUpgradable(deployments, "SortitionModuleNeo", { - newImplementation: "SortitionModuleNeo", + const { sortition: contractName } = await getContractNamesFromNetwork(hre); + console.log(`upgrading ${contractName}...`); + await deployUpgradable(deployments, contractName, { + newImplementation: contractName, initializer: "initialize3", from: deployer, // Warning: do not reinitialize everything, only the new variables diff --git a/contracts/scripts/utils/contracts.ts b/contracts/scripts/utils/contracts.ts index 2decbb282..933f889c8 100644 --- a/contracts/scripts/utils/contracts.ts +++ b/contracts/scripts/utils/contracts.ts @@ -16,6 +16,7 @@ import { SortitionModuleUniversity, TransactionBatcher, KlerosCoreSnapshotProxy, + EvidenceModule, } from "../../typechain-types"; export const Cores = { @@ -26,6 +27,44 @@ export const Cores = { export type Core = (typeof Cores)[keyof typeof Cores]; +export const getContractNames = (coreType: Core) => { + const coreSpecificNames = { + [Cores.NEO]: { + core: "KlerosCoreNeo", + sortition: "SortitionModuleNeo", + disputeKitClassic: "DisputeKitClassicNeo", + disputeResolver: "DisputeResolverNeo", + }, + [Cores.BASE]: { + core: "KlerosCore", + sortition: "SortitionModule", + disputeKitClassic: "DisputeKitClassic", + disputeResolver: "DisputeResolver", + }, + [Cores.UNIVERSITY]: { + core: "KlerosCoreUniversity", + sortition: "SortitionModuleUniversity", + disputeKitClassic: "DisputeKitClassicUniversity", + disputeResolver: "DisputeResolverUniversity", + }, + }; + + if (!(coreType in coreSpecificNames)) throw new Error("Invalid core type, must be one of BASE, NEO, or UNIVERSITY"); + + return { + ...coreSpecificNames[coreType], + evidence: "EvidenceModule", + disputeTemplateRegistry: "DisputeTemplateRegistry", + policyRegistry: "PolicyRegistry", + batcher: "TransactionBatcher", + chainlinkRng: "ChainlinkRNG", + randomizerRng: "RandomizerRNG", + blockHashRNG: "BlockHashRNG", + pnk: "PNK", + snapshotProxy: "KlerosCoreSnapshotProxy", + }; +}; + export const getContracts = async (hre: HardhatRuntimeEnvironment, coreType: Core) => { const { ethers } = hre; let core: KlerosCore | KlerosCoreNeo | KlerosCoreUniversity; @@ -34,40 +73,46 @@ export const getContracts = async (hre: HardhatRuntimeEnvironment, coreType: Cor let disputeResolver: DisputeResolver; switch (coreType) { case Cores.NEO: - core = await ethers.getContract("KlerosCoreNeo"); - sortition = await ethers.getContract("SortitionModuleNeo"); - disputeKitClassic = await ethers.getContract("DisputeKitClassicNeo"); - disputeResolver = await ethers.getContract("DisputeResolverNeo"); + core = await ethers.getContract(getContractNames(coreType).core); + sortition = await ethers.getContract(getContractNames(coreType).sortition); + disputeKitClassic = await ethers.getContract(getContractNames(coreType).disputeKitClassic); + disputeResolver = await ethers.getContract(getContractNames(coreType).disputeResolver); break; case Cores.BASE: - core = await ethers.getContract("KlerosCore"); - sortition = await ethers.getContract("SortitionModule"); - disputeKitClassic = await ethers.getContract("DisputeKitClassic"); - disputeResolver = await ethers.getContract("DisputeResolver"); + core = await ethers.getContract(getContractNames(coreType).core); + sortition = await ethers.getContract(getContractNames(coreType).sortition); + disputeKitClassic = await ethers.getContract(getContractNames(coreType).disputeKitClassic); + disputeResolver = await ethers.getContract(getContractNames(coreType).disputeResolver); break; case Cores.UNIVERSITY: - core = await ethers.getContract("KlerosCoreUniversity"); - sortition = await ethers.getContract("SortitionModuleUniversity"); - disputeKitClassic = await ethers.getContract("DisputeKitClassicUniversity"); - disputeResolver = await ethers.getContract("DisputeResolverUniversity"); + core = await ethers.getContract(getContractNames(coreType).core); + sortition = await ethers.getContract(getContractNames(coreType).sortition); + disputeKitClassic = await ethers.getContract(getContractNames(coreType).disputeKitClassic); + disputeResolver = await ethers.getContract(getContractNames(coreType).disputeResolver); break; default: throw new Error("Invalid core type, must be one of BASE, NEO, or UNIVERSITY"); } - const disputeTemplateRegistry = await ethers.getContract("DisputeTemplateRegistry"); - const policyRegistry = await ethers.getContract("PolicyRegistry"); - const batcher = await ethers.getContract("TransactionBatcher"); - const chainlinkRng = await ethers.getContractOrNull("ChainlinkRNG"); - const randomizerRng = await ethers.getContractOrNull("RandomizerRNG"); - const blockHashRNG = await ethers.getContractOrNull("BlockHashRNG"); - const pnk = await ethers.getContract("PNK"); - const snapshotProxy = await ethers.getContractOrNull("KlerosCoreSnapshotProxy"); + const disputeTemplateRegistry = await ethers.getContract( + getContractNames(coreType).disputeTemplateRegistry + ); + const evidence = await ethers.getContract(getContractNames(coreType).evidence); + const policyRegistry = await ethers.getContract(getContractNames(coreType).policyRegistry); + const batcher = await ethers.getContract(getContractNames(coreType).batcher); + const chainlinkRng = await ethers.getContractOrNull(getContractNames(coreType).chainlinkRng); + const randomizerRng = await ethers.getContractOrNull(getContractNames(coreType).randomizerRng); + const blockHashRNG = await ethers.getContractOrNull(getContractNames(coreType).blockHashRNG); + const pnk = await ethers.getContract(getContractNames(coreType).pnk); + const snapshotProxy = await ethers.getContractOrNull( + getContractNames(coreType).snapshotProxy + ); return { core, sortition, disputeKitClassic, disputeResolver, disputeTemplateRegistry, + evidence, policyRegistry, chainlinkRng, randomizerRng, @@ -77,3 +122,25 @@ export const getContracts = async (hre: HardhatRuntimeEnvironment, coreType: Cor snapshotProxy, }; }; + +export const getContractsFromNetwork = async (hre: HardhatRuntimeEnvironment) => { + const { network } = hre; + if (network.name === "arbitrumSepoliaDevnet" || network.name === "arbitrumSepolia") { + return getContracts(hre, Cores.BASE); + } else if (network.name === "arbitrum") { + return getContracts(hre, Cores.NEO); + } else { + throw new Error("Invalid network"); + } +}; + +export const getContractNamesFromNetwork = async (hre: HardhatRuntimeEnvironment) => { + const { network } = hre; + if (network.name === "arbitrumSepoliaDevnet" || network.name === "arbitrumSepolia") { + return getContractNames(Cores.BASE); + } else if (network.name === "arbitrum") { + return getContractNames(Cores.NEO); + } else { + throw new Error("Invalid network"); + } +}; diff --git a/contracts/src/arbitration/DisputeTemplateRegistry.sol b/contracts/src/arbitration/DisputeTemplateRegistry.sol index ca22c6400..2ff61b911 100644 --- a/contracts/src/arbitration/DisputeTemplateRegistry.sol +++ b/contracts/src/arbitration/DisputeTemplateRegistry.sol @@ -44,6 +44,10 @@ contract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Ini governor = _governor; } + function initialize2() external reinitializer(2) { + // NOP + } + // ************************ // // * Governance * // // ************************ // diff --git a/contracts/src/arbitration/KlerosCore.sol b/contracts/src/arbitration/KlerosCore.sol index 771a9eefd..a0a5d8625 100644 --- a/contracts/src/arbitration/KlerosCore.sol +++ b/contracts/src/arbitration/KlerosCore.sol @@ -56,6 +56,10 @@ contract KlerosCore is KlerosCoreBase { ); } + function initialize3() external reinitializer(3) { + // NOP + } + // ************************************* // // * Governance * // // ************************************* // diff --git a/contracts/src/arbitration/KlerosCoreNeo.sol b/contracts/src/arbitration/KlerosCoreNeo.sol index 87bbdfeee..67a054307 100644 --- a/contracts/src/arbitration/KlerosCoreNeo.sol +++ b/contracts/src/arbitration/KlerosCoreNeo.sol @@ -67,6 +67,10 @@ contract KlerosCoreNeo is KlerosCoreBase { jurorNft = _jurorNft; } + function initialize3() external reinitializer(3) { + // NOP + } + // ************************************* // // * Governance * // // ************************************* // diff --git a/contracts/src/arbitration/PolicyRegistry.sol b/contracts/src/arbitration/PolicyRegistry.sol index 7150ba0f1..f30f361f2 100644 --- a/contracts/src/arbitration/PolicyRegistry.sol +++ b/contracts/src/arbitration/PolicyRegistry.sol @@ -51,6 +51,10 @@ contract PolicyRegistry is UUPSProxiable, Initializable { governor = _governor; } + function initialize2() external reinitializer(2) { + // NOP + } + // ************************************* // // * Governance * // // ************************************* // diff --git a/contracts/src/arbitration/devtools/KlerosCoreRuler.sol b/contracts/src/arbitration/devtools/KlerosCoreRuler.sol index 2100ad1c3..cf1964530 100644 --- a/contracts/src/arbitration/devtools/KlerosCoreRuler.sol +++ b/contracts/src/arbitration/devtools/KlerosCoreRuler.sol @@ -210,6 +210,10 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable { ); } + function initialize2() external reinitializer(2) { + // NOP + } + // ************************************* // // * Governance * // // ************************************* // diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol b/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol index f9696004d..3aacdcea7 100644 --- a/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol +++ b/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol @@ -29,6 +29,10 @@ contract DisputeKitClassic is DisputeKitClassicBase { __DisputeKitClassicBase_initialize(_governor, _core); } + function initialize2() external reinitializer(2) { + // NOP + } + // ************************ // // * Governance * // // ************************ // diff --git a/contracts/src/arbitration/evidence/EvidenceModule.sol b/contracts/src/arbitration/evidence/EvidenceModule.sol index f0bfb4bdb..e545044fc 100644 --- a/contracts/src/arbitration/evidence/EvidenceModule.sol +++ b/contracts/src/arbitration/evidence/EvidenceModule.sol @@ -41,6 +41,10 @@ contract EvidenceModule is IEvidence, Initializable, UUPSProxiable { governor = _governor; } + function initialize2() external reinitializer(2) { + // NOP + } + // ************************ // // * Governance * // // ************************ // From c3fa89e0c45071d19e931a76c79763797a531176 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Fri, 4 Apr 2025 22:18:53 +0100 Subject: [PATCH 03/17] chore: devnet and testnet upgraded to 0.8 --- contracts/README.md | 24 +- contracts/deploy/upgrade-all.ts | 17 +- .../deploy/upgrade-dispute-kit-v0.8.0.ts | 2 +- .../deploy/upgrade-kleros-core-v0.8.0.ts | 2 +- .../deploy/upgrade-sortition-module-v0.8.0.ts | 2 +- .../arbitrumSepolia/DisputeKitClassic.json | 52 ++- .../DisputeKitClassic_Implementation.json | 211 +++++---- .../DisputeTemplateRegistry.json | 38 +- ...isputeTemplateRegistry_Implementation.json | 85 ++-- .../arbitrumSepolia/EvidenceModule.json | 38 +- .../EvidenceModule_Implementation.json | 85 ++-- .../arbitrumSepolia/KlerosCore.json | 76 ++-- .../KlerosCore_Implementation.json | 242 +++++----- .../arbitrumSepolia/PolicyRegistry.json | 38 +- .../PolicyRegistry_Implementation.json | 93 ++-- .../arbitrumSepolia/SortitionModule.json | 64 ++- .../SortitionModule_Implementation.json | 257 +++++++---- .../DisputeKitClassic.json | 76 +++- .../DisputeKitClassic_Implementation.json | 229 ++++++---- .../DisputeTemplateRegistry.json | 52 ++- ...isputeTemplateRegistry_Implementation.json | 91 ++-- .../arbitrumSepoliaDevnet/EvidenceModule.json | 52 ++- .../EvidenceModule_Implementation.json | 89 ++-- .../arbitrumSepoliaDevnet/KlerosCore.json | 208 ++++++--- .../KlerosCore_Implementation.json | 422 ++++++++++++------ .../arbitrumSepoliaDevnet/PolicyRegistry.json | 52 ++- .../PolicyRegistry_Implementation.json | 93 ++-- .../SortitionModule.json | 104 ++--- .../SortitionModule_Implementation.json | 292 +++++++----- 29 files changed, 1977 insertions(+), 1109 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index 36b23216f..842db8a0f 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -35,17 +35,17 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [ChainlinkRNG](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) - [DAI](https://sepolia.arbiscan.io/address/0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03) - [DAIFaucet](https://sepolia.arbiscan.io/address/0x1Fa58B52326488D62A406E71DBaD839560e810fF) -- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94), [implementation](https://sepolia.arbiscan.io/address/0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1) +- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94), [implementation](https://sepolia.arbiscan.io/address/0xCd4B2aD853027DbF7629003242CD609BDdaA89E1) - [DisputeResolver](https://sepolia.arbiscan.io/address/0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652) -- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb), [implementation](https://sepolia.arbiscan.io/address/0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34) -- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397), [implementation](https://sepolia.arbiscan.io/address/0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8) -- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479), [implementation](https://sepolia.arbiscan.io/address/0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55) +- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb), [implementation](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) +- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397), [implementation](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) +- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479), [implementation](https://sepolia.arbiscan.io/address/0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7) - [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) - [PNKFaucet](https://sepolia.arbiscan.io/address/0x9f6ffc13B685A68ae359fCA128dfE776458Df464) - [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) -- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585), [implementation](https://sepolia.arbiscan.io/address/0xB958113f96950C7806d584eFBed964288d46a0B8) +- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585), [implementation](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) - [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627), [implementation](https://sepolia.arbiscan.io/address/0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203) -- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD), [implementation](https://sepolia.arbiscan.io/address/0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9) +- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD), [implementation](https://sepolia.arbiscan.io/address/0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b) - [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - [WETH](https://sepolia.arbiscan.io/address/0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511) - [WETHFaucet](https://sepolia.arbiscan.io/address/0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835) @@ -77,16 +77,16 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [ChainlinkRNG](https://sepolia.arbiscan.io/address/0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8) - [DAI](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) -- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b), [implementation](https://sepolia.arbiscan.io/address/0x692CC78F2570181FFB99297965FeAA8352ab12E8) +- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b), [implementation](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) - [DisputeKitClassicNeo: proxy](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1), [implementation](https://sepolia.arbiscan.io/address/0xE636AB278fBfc8712E807c589A362dc2396d2d2F) - [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5), [implementation](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) - [DisputeResolver](https://sepolia.arbiscan.io/address/0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61) - [DisputeResolverNeo](https://sepolia.arbiscan.io/address/0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C) - [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) - [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) -- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391), [implementation](https://sepolia.arbiscan.io/address/0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E) -- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09), [implementation](https://sepolia.arbiscan.io/address/0x05AD81f245209b7f91885fd96e57c9da90554824) -- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8), [implementation](https://sepolia.arbiscan.io/address/0x91a373BBdE0532F86410682F362e2Cf685e95085) +- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391), [implementation](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) +- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09), [implementation](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) +- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8), [implementation](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) - [KlerosCoreNeo: proxy](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A), [implementation](https://sepolia.arbiscan.io/address/0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB) - [KlerosCoreRuler: proxy](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5), [implementation](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) - [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) @@ -94,9 +94,9 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [KlerosV2NeoEarlyUser](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - [PNKFaucet](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) -- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da), [implementation](https://sepolia.arbiscan.io/address/0xAA637C9E2831614158d7eB193D03af4a7223C56E) +- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da), [implementation](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) - [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836), [implementation](https://sepolia.arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) -- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C), [implementation](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3) +- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C), [implementation](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) - [SortitionModuleNeo: proxy](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64), [implementation](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0) - [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79), [implementation](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) - [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) diff --git a/contracts/deploy/upgrade-all.ts b/contracts/deploy/upgrade-all.ts index 4881fad05..78962aa69 100644 --- a/contracts/deploy/upgrade-all.ts +++ b/contracts/deploy/upgrade-all.ts @@ -32,19 +32,22 @@ const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment) } print.info(`Upgrading ${contractName}...`); - // await deployUpgradable(deployments, contractName, { - // newImplementation: contractName, - // initializer, - // from: deployer, - // args, // Warning: do not reinitialize existing state variables, only the new ones - // }); + await deployUpgradable(deployments, contractName, { + newImplementation: contractName, + initializer, + from: deployer, + args, // Warning: do not reinitialize existing state variables, only the new ones + }); + + print.info(`Verifying ${contractName} on Etherscan...`); + await hre.run("etherscan-verify", { contractName: `${contractName}_Implementation` }); } catch (err) { console.error(err); throw err; } }; - await upgrade(disputeKitClassic, "initializer2", []); + await upgrade(disputeKitClassic, "initialize2", []); await upgrade(disputeTemplateRegistry, "initialize2", []); await upgrade(evidence, "initialize2", []); await upgrade(core, "initialize3", []); diff --git a/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts b/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts index e9d497b9b..e71c1aab7 100644 --- a/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts +++ b/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts @@ -16,7 +16,7 @@ const deployUpgradeDisputeKit: DeployFunction = async (hre: HardhatRuntimeEnviro const { disputeKitClassic: contractName } = await getContractNamesFromNetwork(hre); console.log(`upgrading ${contractName}...`); await deployUpgradable(deployments, contractName, { - newImplementation: contractName, + contract: contractName, initializer: "initialize2", from: deployer, // Warning: do not reinitialize everything, only the new variables diff --git a/contracts/deploy/upgrade-kleros-core-v0.8.0.ts b/contracts/deploy/upgrade-kleros-core-v0.8.0.ts index a02a9ca69..dd14806ce 100644 --- a/contracts/deploy/upgrade-kleros-core-v0.8.0.ts +++ b/contracts/deploy/upgrade-kleros-core-v0.8.0.ts @@ -16,7 +16,7 @@ const deployUpgradeKlerosCore: DeployFunction = async (hre: HardhatRuntimeEnviro const { core: contractName } = await getContractNamesFromNetwork(hre); console.log(`upgrading ${contractName}...`); await deployUpgradable(deployments, contractName, { - newImplementation: contractName, + contract: contractName, initializer: "initialize3", from: deployer, // Warning: do not reinitialize everything, only the new variables diff --git a/contracts/deploy/upgrade-sortition-module-v0.8.0.ts b/contracts/deploy/upgrade-sortition-module-v0.8.0.ts index 84c9957f0..d6e98ba7f 100644 --- a/contracts/deploy/upgrade-sortition-module-v0.8.0.ts +++ b/contracts/deploy/upgrade-sortition-module-v0.8.0.ts @@ -16,7 +16,7 @@ const deployUpgradeSortitionModule: DeployFunction = async (hre: HardhatRuntimeE const { sortition: contractName } = await getContractNamesFromNetwork(hre); console.log(`upgrading ${contractName}...`); await deployUpgradable(deployments, contractName, { - newImplementation: contractName, + contract: contractName, initializer: "initialize3", from: deployer, // Warning: do not reinitialize everything, only the new variables diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json b/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json index ed51c80c8..8f3317924 100644 --- a/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json +++ b/contracts/deployments/arbitrumSepolia/DisputeKitClassic.json @@ -835,6 +835,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -877,6 +884,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "singleDrawPerJuror", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -895,6 +915,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -979,19 +1012,16 @@ "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212209138e100adbd3fe6a9a3438fe94aa8c15d5a5ba828eefa2eadc87e1958a90b6a64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212209138e100adbd3fe6a9a3438fe94aa8c15d5a5ba828eefa2eadc87e1958a90b6a64736f6c63430008180033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x0000000000000000000000000000000000000000" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", + "implementation": "0xCd4B2aD853027DbF7629003242CD609BDdaA89E1", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json index 4a98a2db0..a86375b4d 100644 --- a/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json +++ b/contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", + "address": "0xCd4B2aD853027DbF7629003242CD609BDdaA89E1", "abi": [ { "inputs": [], @@ -832,6 +832,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -874,6 +881,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "singleDrawPerJuror", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -892,6 +912,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -927,41 +960,41 @@ "type": "function" } ], - "transactionHash": "0x92ce32b649a9108387946721a9f552884596222f802dd65af799df527cf46ba0", + "transactionHash": "0x58c15afe66fff713a3ab92099ec23c04e63f42f7d60c7ddf536c831d0cf491aa", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", + "contractAddress": "0xCd4B2aD853027DbF7629003242CD609BDdaA89E1", "transactionIndex": 1, - "gasUsed": "3803056", - "logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000c0000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000040000000000000", - "blockHash": "0xb8cd178b04cbd65d610c20c916d187576b339378ac5c4e6fa2411ef7a26a8e28", - "transactionHash": "0x92ce32b649a9108387946721a9f552884596222f802dd65af799df527cf46ba0", + "gasUsed": "3660965", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf47da49b04f5b80be85b87a7320dc938bddff075e4769055b58b0ace9b975787", + "transactionHash": "0x58c15afe66fff713a3ab92099ec23c04e63f42f7d60c7ddf536c831d0cf491aa", "logs": [ { "transactionIndex": 1, - "blockNumber": 95247778, - "transactionHash": "0x92ce32b649a9108387946721a9f552884596222f802dd65af799df527cf46ba0", - "address": "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", + "blockNumber": 139234748, + "transactionHash": "0x58c15afe66fff713a3ab92099ec23c04e63f42f7d60c7ddf536c831d0cf491aa", + "address": "0xCd4B2aD853027DbF7629003242CD609BDdaA89E1", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0xb8cd178b04cbd65d610c20c916d187576b339378ac5c4e6fa2411ef7a26a8e28" + "blockHash": "0xf47da49b04f5b80be85b87a7320dc938bddff075e4769055b58b0ace9b975787" } ], - "blockNumber": 95247778, - "cumulativeGasUsed": "3803056", + "blockNumber": 139234748, + "cumulativeGasUsed": "3660965", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commit. Note that justification string is a part of the commit.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"initialize(address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"title\":\"DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./KlerosCoreBase.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) external reinitializer(1) {\\n _initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x1dc9311f4df8d5c707be5fc0f0e87574b2ca4a4957eb0ffecdf2153a8eace1d2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2 {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function _initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) internal {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n function draw(uint256 _disputeID, uint256 _iterations) external {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n}\\n\",\"keccak256\":\"0x7435f0d24fde25165d4de404cbd4040339be136bac507196bfed0bb1f9f493f4\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"../KlerosCore.sol\\\";\\nimport \\\"../interfaces/IDisputeKit.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is IDisputeKit, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n function initialize(address _governor, KlerosCore _core) external reinitializer(1) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n // TODO: Handle the situation when no one has staked yet.\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n\\n if (_postDrawCheck(_coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commit. Note that justification string is a part of the commit.\\n function castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) external notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _salt)),\\n \\\"The commit must match the choice in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, msg.sender, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).send(msg.value - contribution);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.send(amount); // Deliberate use of send to prevent reverting fallback. It's the user's responsibility to accept ETH.\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalVoted == round.votes.length;\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return Whether the address can be drawn or not.\\n function _postDrawCheck(uint256 _coreDisputeID, address _juror) internal view returns (bool) {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n uint256 lockedAmountPerJuror = core\\n .getRoundInfo(_coreDisputeID, core.getNumberOfRounds(_coreDisputeID) - 1)\\n .pnkAtStakePerJuror;\\n (uint256 totalStaked, uint256 totalLocked, , ) = core.sortitionModule().getJurorBalance(_juror, courtID);\\n return totalStaked >= totalLocked + lockedAmountPerJuror;\\n }\\n}\\n\",\"keccak256\":\"0xde57a6569422626bf1ec215f3442ede6c13df57f6f5d27da3bc8cd8bc3d313cd\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613ec76200010360003960008181611588015281816115b101526117a90152613ec76000f3fe6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613174565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613174565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613174565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131a2565b610785565b34801561029857600080fd5b506102ac6102a73660046131df565b610c10565b005b6102ac6102bc366004613218565b610d0d565b6102ac6102cf366004613327565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613174565b6117fa565b6040516101b3939291906133c6565b34801561032457600080fd5b506102ac610333366004613432565b6118c0565b34801561034457600080fd5b50610358610353366004613174565b611bc5565b6040516101b39190613484565b34801561037157600080fd5b506102216103803660046134c8565b611c89565b34801561039157600080fd5b506103a56103a0366004613503565b611dce565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613174565b611e86565b3480156103fe57600080fd5b506102ac61040d36600461352f565b611efd565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613587565b611fc9565b34801561045457600080fd5b506102ac61046336600461361f565b61269a565b34801561047457600080fd5b50610488610483366004613503565b6126e6565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461363c565b6127ac565b3480156104f657600080fd5b506101a7610505366004613503565b612981565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613218565b612a1c565b34801561054c57600080fd5b5061022161055b366004613218565b612d25565b34801561056c57600080fd5b506102ac61057b36600461361f565b612e78565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136c3565b600091825260208220600590910201805490925082906105e6906001906136ef565b815481106105f6576105f66136c3565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136c3565b60009182526020822060059091020180549092508290610665906001906136ef565b81548110610675576106756136c3565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610716919061372e565b5090935060049250610726915050565b81600481111561073857610738613795565b0361077b57600061074888611bc5565b905080516001036107795780600081518110610766576107666136c3565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f7919061372e565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137ab565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136c3565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137c6565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613802565b610a939190613819565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136c3565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136c3565b9060005260206000200154815260200190815260200160002054610b28919061383b565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613802565b610b679190613819565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136c3565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b81526004016108469061384e565b600083815260036020526040812054600280549091908110610d8957610d896136c3565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613885565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137c6565b50509050868103610f30576127109150610fb1565b612710611388610f4086866136ef565b610f4a9190613802565b610f549190613819565b610f5e85426136ef565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc4906001906136ef565b81548110610fd457610fd46136c3565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138a9565b61106191906136ef565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138a9565b905060006127106111448784613802565b61114e9190613819565b611158908361383b565b60008c8152600686016020526040812054919250908211156112095760008c8152600686016020526040902054349061119190846136ef565b116111b65760008c81526006860160205260409020546111b190836136ef565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061383b565b909155505060008c81526006860160205260408120805483929061125a90849061383b565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061383b565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156115375782856009015461134991906136ef565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137ab565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161383b565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138a9565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b8152600401611504939291906138fc565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d83346136ef565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ec4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e728339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138a9565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e7283398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e728339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b031683604051611733919061399b565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e7283398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138c2565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136c3565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611986919061372e565b5090935060019250611996915050565b8160048111156119a8576119a8613795565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136c3565b60009182526020822060059091020180549092508290611a88906001906136ef565b81548110611a9857611a986136c3565b90600052602060002090600c0201905060005b86811015611b5e573382898984818110611ac757611ac76136c3565b9050602002013581548110611ade57611ade6136c3565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139b7565b8582898984818110611b2957611b296136c3565b9050602002013581548110611b4057611b406136c3565b60009182526020909120600160049092020181019190915501611aab565b5086869050816005016000828254611b76919061383b565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bb3908b908b908b90613a20565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611beb57611beb6136c3565b60009182526020822060059091020180549092508290611c0d906001906136ef565b81548110611c1d57611c1d6136c3565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c7b57602002820191906000526020600020905b815481526020019060010190808311611c67575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cad57611cad6136c3565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce157611ce16136c3565b90600052602060002090600c02016000018681548110611d0357611d036136c3565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8591906137c6565b506003850154919350915060ff168015611da957508183600201541480611da95750805b15611dbc57612710945050505050611dc5565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611dff57611dff6136c3565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3357611e336136c3565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eaa57611eaa6136c3565b60009182526020822060059091020180549092508290611ecc906001906136ef565b81548110611edc57611edc6136c3565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f275760405162461bcd60e51b815260040161084690613a44565b6000836001600160a01b03168383604051611f42919061399b565b60006040518083038185875af1925050503d8060008114611f7f576040519150601f19603f3d011682016040523d82523d6000602084013e611f84565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611fed57611fed6136c3565b600091825260209091206002600590920201015460ff16156120215760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f919061372e565b509093506002925061209f915050565b8160048111156120b1576120b1613795565b1461210c5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561214e5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b600088815260036020526040812054600280549091908110612172576121726136c3565b9060005260206000209060050201905080600101548611156121cd5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e0906001906136ef565b815481106121f0576121f06136c3565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f919061372e565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190613a86565b505050505091505060005b8a8110156125605733848d8d84818110612315576123156136c3565b905060200201358154811061232c5761232c6136c3565b60009182526020909120600490910201546001600160a01b0316146123635760405162461bcd60e51b8152600401610846906139b7565b8115806123d6575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123ab576123ab6136c3565b90506020020135815481106123c2576123c26136c3565b906000526020600020906004020160010154145b6124485760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c8381811061245b5761245b6136c3565b9050602002013581548110612472576124726136c3565b600091825260209091206003600490920201015460ff16156124cb5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124df576124df6136c3565b90506020020135815481106124f6576124f66136c3565b60009182526020909120600260049092020101556001848d8d8481811061251f5761251f6136c3565b9050602002013581548110612536576125366136c3565b60009182526020909120600490910201600301805460ff19169115159190911790556001016122f9565b508a8a9050836004016000828254612578919061383b565b90915550506000898152600284016020526040812080548c929061259d90849061383b565b9091555050600183015489036125cc57600383015460ff16156125c75760038301805460ff191690555b612645565b60018301546000908152600284016020526040808220548b83529120540361260e57600383015460ff166125c75760038301805460ff19166001179055612645565b60018301546000908152600284016020526040808220548b83529120541115612645576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161268493929190613af0565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126c45760405162461bcd60e51b815260040161084690613a44565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612714576127146136c3565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612748576127486136c3565b90600052602060002090600c0201600001878154811061276a5761276a6136c3565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127d65760405162461bcd60e51b815260040161084690613b20565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612861858783613bb4565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128dc91906138a9565b6128e691906136ef565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061296f908a908a908a90613c74565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129a5576129a56136c3565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129d9576129d96136c3565b90600052602060002090600c020160000184815481106129fb576129fb6136c3565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a495760405162461bcd60e51b815260040161084690613b20565b600083815260036020526040902054600280548592908110612a6d57612a6d6136c3565b600091825260209091206002600590920201015460ff1615612aa15760405162461bcd60e51b81526004016108469061384e565b600084815260036020526040812054600280549091908110612ac557612ac56136c3565b60009182526020822060059091020180549092508290612ae7906001906136ef565b81548110612af757612af76136c3565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b809190613caa565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061372e565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c7b9190613caa565b9650612c878988612ef1565b15612d1457604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d19565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d4957612d496136c3565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d7d57612d7d6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0091906137c6565b5091509150826004015460001480612e2f575080158015612e2f57506000828152600284016020526040902054155b15612e41576000945050505050612e72565b8015612e56575050600401549150612e729050565b506000908152600290910160205260409020549150612e729050565b92915050565b6000546001600160a01b03163314612ea25760405162461bcd60e51b815260040161084690613a44565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612eee5760405162461bcd60e51b815260040161084690613a44565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f63919061372e565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe691906138a9565b612ff091906136ef565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613031573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130599190810190613d5a565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d99190613caa565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131549190613e3b565b5050915091508281613166919061383b565b909110159695505050505050565b60006020828403121561318657600080fd5b5035919050565b6001600160a01b0381168114612eee57600080fd5b600080600080608085870312156131b857600080fd5b8435935060208501356131ca8161318d565b93969395505050506040820135916060013590565b600080604083850312156131f257600080fd5b82356131fd8161318d565b9150602083013561320d8161318d565b809150509250929050565b6000806040838503121561322b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132735761327361323a565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132a1576132a161323a565b604052919050565b60006001600160401b038311156132c2576132c261323a565b6132d5601f8401601f1916602001613279565b90508281528383830111156132e957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261331157600080fd5b613320838335602085016132a9565b9392505050565b6000806040838503121561333a57600080fd5b82356133458161318d565b915060208301356001600160401b0381111561336057600080fd5b61336c85828601613300565b9150509250929050565b60005b83811015613391578181015183820152602001613379565b50506000910152565b600081518084526133b2816020860160208601613376565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dc5606083018461339a565b60008083601f8401126133f957600080fd5b5081356001600160401b0381111561341057600080fd5b6020830191508360208260051b850101111561342b57600080fd5b9250929050565b6000806000806060858703121561344857600080fd5b8435935060208501356001600160401b0381111561346557600080fd5b613471878288016133e7565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134bc578351835292840192918401916001016134a0565b50909695505050505050565b600080600080600060a086880312156134e057600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561351857600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561354457600080fd5b833561354f8161318d565b92506020840135915060408401356001600160401b0381111561357157600080fd5b61357d86828701613300565b9150509250925092565b60008060008060008060a087890312156135a057600080fd5b8635955060208701356001600160401b03808211156135be57600080fd5b6135ca8a838b016133e7565b9097509550604089013594506060890135935060808901359150808211156135f157600080fd5b508701601f8101891361360357600080fd5b613612898235602084016132a9565b9150509295509295509295565b60006020828403121561363157600080fd5b81356133208161318d565b60008060008060006080868803121561365457600080fd5b853594506020860135935060408601356001600160401b038082111561367957600080fd5b818801915088601f83011261368d57600080fd5b81358181111561369c57600080fd5b8960208285010111156136ae57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e7257612e726136d9565b80516001600160601b038116811461371957600080fd5b919050565b8051801515811461371957600080fd5b600080600080600060a0868803121561374657600080fd5b61374f86613702565b9450602086015161375f8161318d565b60408701519094506005811061377457600080fd5b92506137826060870161371e565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137bd57600080fd5b6133208261371e565b6000806000606084860312156137db57600080fd5b835192506137eb6020850161371e565b91506137f96040850161371e565b90509250925092565b8082028115828204841417612e7257612e726136d9565b60008261383657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e7257612e726136d9565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561389857600080fd5b505080516020909101519092909150565b6000602082840312156138bb57600080fd5b5051919050565b600181811c908216806138d657607f821691505b6020821081036138f657634e487b7160e01b600052602260045260246000fd5b50919050565b83815260006020846020840152606060408401526000845461391d816138c2565b806060870152608060018084166000811461393f576001811461395b5761398b565b60ff19851660808a0152608084151560051b8a0101955061398b565b89600052602060002060005b858110156139825781548b8201860152908301908801613967565b8a016080019650505b50939a9950505050505050505050565b600082516139ad818460208701613376565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613a0757600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a346040830185876139ee565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613aa157600080fd5b613aaa88613702565b9650613ab86020890161371e565b955060408801519450606088015193506080880151925060a08801519150613ae260c0890161371e565b905092959891949750929550565b604081526000613b046040830185876139ee565b8281036020840152613b16818561339a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611797576000816000526020600020601f850160051c81016020861015613b8d5750805b601f850160051c820191505b81811015613bac57828155600101613b99565b505050505050565b6001600160401b03831115613bcb57613bcb61323a565b613bdf83613bd983546138c2565b83613b64565b6000601f841160018114613c135760008515613bfb5750838201355b600019600387901b1c1916600186901b178355613c6d565b600083815260209020601f19861690835b82811015613c445786850135825560209485019460019092019101613c24565b5086821015613c615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613cbc57600080fd5b81516133208161318d565b600082601f830112613cd857600080fd5b815160206001600160401b03821115613cf357613cf361323a565b8160051b613d02828201613279565b9283528481018201928281019087851115613d1c57600080fd5b83870192505b84831015613d44578251613d358161318d565b82529183019190830190613d22565b979650505050505050565b80516137198161318d565b600060208284031215613d6c57600080fd5b81516001600160401b0380821115613d8357600080fd5b908301906101608286031215613d9857600080fd5b613da0613250565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613de857600080fd5b613df487828601613cc7565b60c08301525060e0838101519082015261010080840151908201526101209150613e1f828401613d4f565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e5157600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ece2f97e5f37049420403eea1739d27d704a432100da66c99ed49ffe1796440264736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613174565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613174565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613174565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131a2565b610785565b34801561029857600080fd5b506102ac6102a73660046131df565b610c10565b005b6102ac6102bc366004613218565b610d0d565b6102ac6102cf366004613327565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613174565b6117fa565b6040516101b3939291906133c6565b34801561032457600080fd5b506102ac610333366004613432565b6118c0565b34801561034457600080fd5b50610358610353366004613174565b611bc5565b6040516101b39190613484565b34801561037157600080fd5b506102216103803660046134c8565b611c89565b34801561039157600080fd5b506103a56103a0366004613503565b611dce565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613174565b611e86565b3480156103fe57600080fd5b506102ac61040d36600461352f565b611efd565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613587565b611fc9565b34801561045457600080fd5b506102ac61046336600461361f565b61269a565b34801561047457600080fd5b50610488610483366004613503565b6126e6565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461363c565b6127ac565b3480156104f657600080fd5b506101a7610505366004613503565b612981565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613218565b612a1c565b34801561054c57600080fd5b5061022161055b366004613218565b612d25565b34801561056c57600080fd5b506102ac61057b36600461361f565b612e78565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136c3565b600091825260208220600590910201805490925082906105e6906001906136ef565b815481106105f6576105f66136c3565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136c3565b60009182526020822060059091020180549092508290610665906001906136ef565b81548110610675576106756136c3565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610716919061372e565b5090935060049250610726915050565b81600481111561073857610738613795565b0361077b57600061074888611bc5565b905080516001036107795780600081518110610766576107666136c3565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f7919061372e565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137ab565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136c3565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137c6565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613802565b610a939190613819565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136c3565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136c3565b9060005260206000200154815260200190815260200160002054610b28919061383b565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613802565b610b679190613819565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136c3565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b81526004016108469061384e565b600083815260036020526040812054600280549091908110610d8957610d896136c3565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613885565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137c6565b50509050868103610f30576127109150610fb1565b612710611388610f4086866136ef565b610f4a9190613802565b610f549190613819565b610f5e85426136ef565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc4906001906136ef565b81548110610fd457610fd46136c3565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138a9565b61106191906136ef565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138a9565b905060006127106111448784613802565b61114e9190613819565b611158908361383b565b60008c8152600686016020526040812054919250908211156112095760008c8152600686016020526040902054349061119190846136ef565b116111b65760008c81526006860160205260409020546111b190836136ef565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061383b565b909155505060008c81526006860160205260408120805483929061125a90849061383b565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061383b565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156115375782856009015461134991906136ef565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137ab565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161383b565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138a9565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b8152600401611504939291906138fc565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d83346136ef565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ec4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e728339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138a9565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e7283398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e728339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b031683604051611733919061399b565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e7283398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138c2565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136c3565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611986919061372e565b5090935060019250611996915050565b8160048111156119a8576119a8613795565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136c3565b60009182526020822060059091020180549092508290611a88906001906136ef565b81548110611a9857611a986136c3565b90600052602060002090600c0201905060005b86811015611b5e573382898984818110611ac757611ac76136c3565b9050602002013581548110611ade57611ade6136c3565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139b7565b8582898984818110611b2957611b296136c3565b9050602002013581548110611b4057611b406136c3565b60009182526020909120600160049092020181019190915501611aab565b5086869050816005016000828254611b76919061383b565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bb3908b908b908b90613a20565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611beb57611beb6136c3565b60009182526020822060059091020180549092508290611c0d906001906136ef565b81548110611c1d57611c1d6136c3565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c7b57602002820191906000526020600020905b815481526020019060010190808311611c67575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cad57611cad6136c3565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce157611ce16136c3565b90600052602060002090600c02016000018681548110611d0357611d036136c3565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8591906137c6565b506003850154919350915060ff168015611da957508183600201541480611da95750805b15611dbc57612710945050505050611dc5565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611dff57611dff6136c3565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3357611e336136c3565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eaa57611eaa6136c3565b60009182526020822060059091020180549092508290611ecc906001906136ef565b81548110611edc57611edc6136c3565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f275760405162461bcd60e51b815260040161084690613a44565b6000836001600160a01b03168383604051611f42919061399b565b60006040518083038185875af1925050503d8060008114611f7f576040519150601f19603f3d011682016040523d82523d6000602084013e611f84565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611fed57611fed6136c3565b600091825260209091206002600590920201015460ff16156120215760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f919061372e565b509093506002925061209f915050565b8160048111156120b1576120b1613795565b1461210c5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561214e5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b600088815260036020526040812054600280549091908110612172576121726136c3565b9060005260206000209060050201905080600101548611156121cd5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e0906001906136ef565b815481106121f0576121f06136c3565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f919061372e565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190613a86565b505050505091505060005b8a8110156125605733848d8d84818110612315576123156136c3565b905060200201358154811061232c5761232c6136c3565b60009182526020909120600490910201546001600160a01b0316146123635760405162461bcd60e51b8152600401610846906139b7565b8115806123d6575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123ab576123ab6136c3565b90506020020135815481106123c2576123c26136c3565b906000526020600020906004020160010154145b6124485760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c8381811061245b5761245b6136c3565b9050602002013581548110612472576124726136c3565b600091825260209091206003600490920201015460ff16156124cb5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124df576124df6136c3565b90506020020135815481106124f6576124f66136c3565b60009182526020909120600260049092020101556001848d8d8481811061251f5761251f6136c3565b9050602002013581548110612536576125366136c3565b60009182526020909120600490910201600301805460ff19169115159190911790556001016122f9565b508a8a9050836004016000828254612578919061383b565b90915550506000898152600284016020526040812080548c929061259d90849061383b565b9091555050600183015489036125cc57600383015460ff16156125c75760038301805460ff191690555b612645565b60018301546000908152600284016020526040808220548b83529120540361260e57600383015460ff166125c75760038301805460ff19166001179055612645565b60018301546000908152600284016020526040808220548b83529120541115612645576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161268493929190613af0565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126c45760405162461bcd60e51b815260040161084690613a44565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612714576127146136c3565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612748576127486136c3565b90600052602060002090600c0201600001878154811061276a5761276a6136c3565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127d65760405162461bcd60e51b815260040161084690613b20565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612861858783613bb4565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128dc91906138a9565b6128e691906136ef565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061296f908a908a908a90613c74565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129a5576129a56136c3565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129d9576129d96136c3565b90600052602060002090600c020160000184815481106129fb576129fb6136c3565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a495760405162461bcd60e51b815260040161084690613b20565b600083815260036020526040902054600280548592908110612a6d57612a6d6136c3565b600091825260209091206002600590920201015460ff1615612aa15760405162461bcd60e51b81526004016108469061384e565b600084815260036020526040812054600280549091908110612ac557612ac56136c3565b60009182526020822060059091020180549092508290612ae7906001906136ef565b81548110612af757612af76136c3565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b809190613caa565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061372e565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c7b9190613caa565b9650612c878988612ef1565b15612d1457604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d19565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d4957612d496136c3565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d7d57612d7d6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0091906137c6565b5091509150826004015460001480612e2f575080158015612e2f57506000828152600284016020526040902054155b15612e41576000945050505050612e72565b8015612e56575050600401549150612e729050565b506000908152600290910160205260409020549150612e729050565b92915050565b6000546001600160a01b03163314612ea25760405162461bcd60e51b815260040161084690613a44565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612eee5760405162461bcd60e51b815260040161084690613a44565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f63919061372e565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe691906138a9565b612ff091906136ef565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613031573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130599190810190613d5a565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d99190613caa565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131549190613e3b565b5050915091508281613166919061383b565b909110159695505050505050565b60006020828403121561318657600080fd5b5035919050565b6001600160a01b0381168114612eee57600080fd5b600080600080608085870312156131b857600080fd5b8435935060208501356131ca8161318d565b93969395505050506040820135916060013590565b600080604083850312156131f257600080fd5b82356131fd8161318d565b9150602083013561320d8161318d565b809150509250929050565b6000806040838503121561322b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132735761327361323a565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132a1576132a161323a565b604052919050565b60006001600160401b038311156132c2576132c261323a565b6132d5601f8401601f1916602001613279565b90508281528383830111156132e957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261331157600080fd5b613320838335602085016132a9565b9392505050565b6000806040838503121561333a57600080fd5b82356133458161318d565b915060208301356001600160401b0381111561336057600080fd5b61336c85828601613300565b9150509250929050565b60005b83811015613391578181015183820152602001613379565b50506000910152565b600081518084526133b2816020860160208601613376565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dc5606083018461339a565b60008083601f8401126133f957600080fd5b5081356001600160401b0381111561341057600080fd5b6020830191508360208260051b850101111561342b57600080fd5b9250929050565b6000806000806060858703121561344857600080fd5b8435935060208501356001600160401b0381111561346557600080fd5b613471878288016133e7565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134bc578351835292840192918401916001016134a0565b50909695505050505050565b600080600080600060a086880312156134e057600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561351857600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561354457600080fd5b833561354f8161318d565b92506020840135915060408401356001600160401b0381111561357157600080fd5b61357d86828701613300565b9150509250925092565b60008060008060008060a087890312156135a057600080fd5b8635955060208701356001600160401b03808211156135be57600080fd5b6135ca8a838b016133e7565b9097509550604089013594506060890135935060808901359150808211156135f157600080fd5b508701601f8101891361360357600080fd5b613612898235602084016132a9565b9150509295509295509295565b60006020828403121561363157600080fd5b81356133208161318d565b60008060008060006080868803121561365457600080fd5b853594506020860135935060408601356001600160401b038082111561367957600080fd5b818801915088601f83011261368d57600080fd5b81358181111561369c57600080fd5b8960208285010111156136ae57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e7257612e726136d9565b80516001600160601b038116811461371957600080fd5b919050565b8051801515811461371957600080fd5b600080600080600060a0868803121561374657600080fd5b61374f86613702565b9450602086015161375f8161318d565b60408701519094506005811061377457600080fd5b92506137826060870161371e565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137bd57600080fd5b6133208261371e565b6000806000606084860312156137db57600080fd5b835192506137eb6020850161371e565b91506137f96040850161371e565b90509250925092565b8082028115828204841417612e7257612e726136d9565b60008261383657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e7257612e726136d9565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561389857600080fd5b505080516020909101519092909150565b6000602082840312156138bb57600080fd5b5051919050565b600181811c908216806138d657607f821691505b6020821081036138f657634e487b7160e01b600052602260045260246000fd5b50919050565b83815260006020846020840152606060408401526000845461391d816138c2565b806060870152608060018084166000811461393f576001811461395b5761398b565b60ff19851660808a0152608084151560051b8a0101955061398b565b89600052602060002060005b858110156139825781548b8201860152908301908801613967565b8a016080019650505b50939a9950505050505050505050565b600082516139ad818460208701613376565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613a0757600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a346040830185876139ee565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613aa157600080fd5b613aaa88613702565b9650613ab86020890161371e565b955060408801519450606088015193506080880151925060a08801519150613ae260c0890161371e565b905092959891949750929550565b604081526000613b046040830185876139ee565b8281036020840152613b16818561339a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611797576000816000526020600020601f850160051c81016020861015613b8d5750805b601f850160051c820191505b81811015613bac57828155600101613b99565b505050505050565b6001600160401b03831115613bcb57613bcb61323a565b613bdf83613bd983546138c2565b83613b64565b6000601f841160018114613c135760008515613bfb5750838201355b600019600387901b1c1916600186901b178355613c6d565b600083815260209020601f19861690835b82811015613c445786850135825560209485019460019092019101613c24565b5086821015613c615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613cbc57600080fd5b81516133208161318d565b600082601f830112613cd857600080fd5b815160206001600160401b03821115613cf357613cf361323a565b8160051b613d02828201613279565b9283528481018201928281019087851115613d1c57600080fd5b83870192505b84831015613d44578251613d358161318d565b82529183019190830190613d22565b979650505050505050565b80516137198161318d565b600060208284031215613d6c57600080fd5b81516001600160401b0380821115613d8357600080fd5b908301906101608286031215613d9857600080fd5b613da0613250565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613de857600080fd5b613df487828601613cc7565b60c08301525060e0838101519082015261010080840151908201526101209150613e1f828401613d4f565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e5157600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ece2f97e5f37049420403eea1739d27d704a432100da66c99ed49ffe1796440264736f6c63430008180033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":[],\"name\":\"initialize2\",\"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\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"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\"}]},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __DisputeKitClassicBase_initialize(_governor, _core);\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0xa3633f78ef652659c2ef88fd20a5565e4d0148e20a61c4ccca9e37204df7dadf\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n // ************************************* //\\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 mapping(address drawnAddress => bool) alreadyDrawn; // Set to 'true' if the address has already been drawn, so it can't be drawn more than once.\\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 bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\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 Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n function __DisputeKitClassicBase_initialize(address _governor, KlerosCore _core) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************ //\\n // * Governance * //\\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 drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n round.alreadyDrawn[drawnAddress] = true;\\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 /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless since we check for insolvency anyway.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n (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 result = totalStaked >= totalLocked + lockedAmountPerJuror;\\n\\n if (singleDrawPerJuror) {\\n result = result && !_round.alreadyDrawn[_juror];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x243af54007e2a208797bb56f6b576f68bdb5c0b932cd6df22375d646491318e1\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516140c96200010360003960008181611692015281816116bb01526118b301526140c96000f3fe6080604052600436106101a35760003560e01c806369f3f041116100e2578063b6ede54011610085578063b6ede54014610558578063ba66fde714610578578063be46760414610598578063d2b8035a146105ae578063da3beb8c146105ce578063e349ad30146104a0578063e4c0aaf4146105ee578063f2f4eb261461060e57600080fd5b806369f3f041146104135780636d4cd8ea14610460578063751accd014610480578063796490f9146104a05780637c04034e146104b65780638e426460146104d6578063a7cc08fe146104f6578063b34bfaa81461054257600080fd5b80634b2f0ea01161014a5780634b2f0ea0146102fe5780634f1ef2861461031157806352d1902d1461032457806354fd4d5014610339578063564a565d146103775780635c92e2f6146103a657806365540b96146103c6578063675926f6146103f357600080fd5b80630baa64d1146101a85780630c340a24146101dd5780631200aabc146102155780631c3db16d146102505780632621b9a21461028d578063362c3479146102a7578063472abf68146102c7578063485cc955146102de575b600080fd5b3480156101b457600080fd5b506101c86101c3366004613363565b61062e565b60405190151581526020015b60405180910390f35b3480156101e957600080fd5b506000546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b34801561022157600080fd5b50610242610230366004613363565b60036020526000908152604090205481565b6040519081526020016101d4565b34801561025c57600080fd5b5061027061026b366004613363565b6106a5565b6040805193845291151560208401521515908201526060016101d4565b34801561029957600080fd5b506004546101c89060ff1681565b3480156102b357600080fd5b506102426102c2366004613391565b610813565b3480156102d357600080fd5b506102dc610c9e565b005b3480156102ea57600080fd5b506102dc6102f93660046133ce565b610d4f565b6102dc61030c366004613407565b610e17565b6102dc61031f366004613516565b61167e565b34801561033057600080fd5b506102426118a6565b34801561034557600080fd5b5061036a604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516101d491906135b5565b34801561038357600080fd5b50610397610392366004613363565b611904565b6040516101d4939291906135c8565b3480156103b257600080fd5b506102dc6103c1366004613634565b6119ca565b3480156103d257600080fd5b506103e66103e1366004613363565b611ccf565b6040516101d49190613686565b3480156103ff57600080fd5b5061024261040e3660046136ca565b611d93565b34801561041f57600080fd5b5061043361042e366004613705565b611ed8565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101d4565b34801561046c57600080fd5b506101c861047b366004613363565b611f90565b34801561048c57600080fd5b506102dc61049b366004613731565b612007565b3480156104ac57600080fd5b5061024261271081565b3480156104c257600080fd5b506102dc6104d1366004613789565b6120d3565b3480156104e257600080fd5b506102dc6104f1366004613821565b6127a4565b34801561050257600080fd5b50610516610511366004613705565b6127f0565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101d4565b34801561054e57600080fd5b50610242614e2081565b34801561056457600080fd5b506102dc61057336600461383e565b6128b6565b34801561058457600080fd5b506101c8610593366004613705565b612a8b565b3480156105a457600080fd5b5061024261138881565b3480156105ba57600080fd5b506101fd6105c9366004613407565b612b26565b3480156105da57600080fd5b506102426105e9366004613407565b612e40565b3480156105fa57600080fd5b506102dc610609366004613821565b612f93565b34801561061a57600080fd5b506001546101fd906001600160a01b031681565b600081815260036020526040812054600280548392908110610652576106526138c5565b60009182526020822060059091020180549092508290610674906001906138f1565b81548110610684576106846138c5565b60009182526020909120600d90910201805460059091015414949350505050565b60008060008060026003600087815260200190815260200160002054815481106106d1576106d16138c5565b600091825260208220600590910201805490925082906106f3906001906138f1565b81548110610703576107036138c5565b60009182526020909120600d90910201600381015460ff16945090508361072e578060010154610731565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190613930565b50909350600492506107b4915050565b8160048111156107c6576107c6613997565b036108095760006107d688611ccf565b9050805160010361080757806000815181106107f4576107f46138c5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108859190613930565b509350505050806108dd5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095491906139ad565b156109925760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b60448201526064016108d4565b6000868152600360205260408120546002805490919081106109b6576109b66138c5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106109ea576109ea6138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600d9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906139c8565b5050600087815260078401602052604090205490915060ff16610ab3576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610bf8565b808603610b28576000868152600683016020526040902054610ad6576000610b21565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610b179190613a04565b610b219190613a1b565b9450610bf8565b600081815260078301602052604090205460ff16610bf85781600601600083600a01600181548110610b5c57610b5c6138c5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b9257610b926138c5565b9060005260206000200154815260200190815260200160002054610bb69190613a3d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610beb9190613a04565b610bf59190613a1b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c92576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b60026000610caa612fdf565b8054909150600160401b900460ff1680610cd1575080546001600160401b03808416911610155b15610cee5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60016000610d5b612fdf565b8054909150600160401b900460ff1680610d82575080546001600160401b03808416911610155b15610d9f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610dca8484613003565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610e3b57610e3b6138c5565b600091825260209091206002600590920201015460ff1615610e6f5760405162461bcd60e51b81526004016108d490613a50565b600083815260036020526040812054600280549091908110610e9357610e936138c5565b906000526020600020906005020190508060010154831115610ef75760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e60448201526064016108d4565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190613a87565b91509150814210158015610f7b57508042105b610fc05760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b60448201526064016108d4565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102591906139c8565b5050905086810361103a5761271091506110bb565b61271061138861104a86866138f1565b6110549190613a04565b61105e9190613a1b565b61106885426138f1565b106110b55760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f7365720060448201526064016108d4565b614e2091505b845460009086906110ce906001906138f1565b815481106110de576110de6138c5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600d949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561113d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111619190613aab565b61116b91906138f1565b60008a815260078401602052604090205490915060ff16156111cf5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e000000000060448201526064016108d4565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa158015611219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123d9190613aab565b9050600061271061124e8784613a04565b6112589190613a1b565b6112629083613a3d565b60008c8152600686016020526040812054919250908211156113135760008c8152600686016020526040902054349061129b90846138f1565b116112c05760008c81526006860160205260409020546112bb90836138f1565b6112c2565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161130a929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061133f908490613a3d565b909155505060008c815260068601602052604081208054839290611364908490613a3d565b909155505060008c815260068601602052604090205482116114365760008c8152600686016020526040812054600987018054919290916113a6908490613a3d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156116415782856009015461145391906138f1565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906139ad565b156114de5760028a01805460ff191660011790556115c1565b895460038b0160006114f1876001613a3d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600d02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161156c91815260200190565b602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190613aab565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161160e93929190613afe565b6000604051808303818588803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b50505050505b8034111561166f57336108fc61165783346138f1565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61168782613039565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061170557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116f96000805160206140748339815191525490565b6001600160a01b031614155b156117235760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561177d575060408051601f3d908101601f1916820190925261177a91810190613aab565b60015b6117a557604051630c76093760e01b81526001600160a01b03831660048201526024016108d4565b60008051602061407483398151915281146117d657604051632a87526960e21b8152600481018290526024016108d4565b6000805160206140748339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118a1576000836001600160a01b03168360405161183d9190613b9d565b600060405180830381855af49150503d8060008114611878576040519150601f19603f3d011682016040523d82523d6000602084013e61187d565b606091505b505090508061189f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118f15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061407483398151915290565b6002818154811061191457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161194790613ac4565b80601f016020809104026020016040519081016040528092919081815260200182805461197390613ac4565b80156119c05780601f10611995576101008083540402835291602001916119c0565b820191906000526020600020905b8154815290600101906020018083116119a357829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106119ee576119ee6138c5565b600091825260209091206002600590920201015460ff1615611a225760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a909190613930565b5090935060019250611aa0915050565b816004811115611ab257611ab2613997565b14611b0f5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b60648201526084016108d4565b82611b4c5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b60448201526064016108d4565b600086815260036020526040812054600280549091908110611b7057611b706138c5565b60009182526020822060059091020180549092508290611b92906001906138f1565b81548110611ba257611ba26138c5565b90600052602060002090600d0201905060005b86811015611c68573382898984818110611bd157611bd16138c5565b9050602002013581548110611be857611be86138c5565b60009182526020909120600490910201546001600160a01b031614611c1f5760405162461bcd60e51b81526004016108d490613bb9565b8582898984818110611c3357611c336138c5565b9050602002013581548110611c4a57611c4a6138c5565b60009182526020909120600160049092020181019190915501611bb5565b5086869050816005016000828254611c809190613a3d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611cbd908b908b908b90613c22565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611cf557611cf56138c5565b60009182526020822060059091020180549092508290611d17906001906138f1565b81548110611d2757611d276138c5565b90600052602060002090600d0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d8557602002820191906000526020600020905b815481526020019060010190808311611d71575b505050505092505050919050565b600085815260036020526040812054600280548392908110611db757611db76138c5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611deb57611deb6138c5565b90600052602060002090600d02016000018681548110611e0d57611e0d6138c5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f91906139c8565b506003850154919350915060ff168015611eb357508183600201541480611eb35750805b15611ec657612710945050505050611ecf565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611f0957611f096138c5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611f3d57611f3d6138c5565b600091825260208083206001600d909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611fb457611fb46138c5565b60009182526020822060059091020180549092508290611fd6906001906138f1565b81548110611fe657611fe66138c5565b60009182526020909120600d90910201805460049091015414949350505050565b6000546001600160a01b031633146120315760405162461bcd60e51b81526004016108d490613c46565b6000836001600160a01b0316838360405161204c9190613b9d565b60006040518083038185875af1925050503d8060008114612089576040519150601f19603f3d011682016040523d82523d6000602084013e61208e565b606091505b505090508061189f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b60448201526064016108d4565b6000868152600360205260409020546002805488929081106120f7576120f76138c5565b600091825260209091206002600590920201015460ff161561212b5760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190613930565b50909350600292506121a9915050565b8160048111156121bb576121bb613997565b146122165760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b60648201526084016108d4565b856122585760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b60448201526064016108d4565b60008881526003602052604081205460028054909190811061227c5761227c6138c5565b9060005260206000209060050201905080600101548611156122d75760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b60448201526064016108d4565b805460009082906122ea906001906138f1565b815481106122fa576122fa6138c5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600d9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123799190613930565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156123d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f89190613c88565b505050505091505060005b8a81101561266a5733848d8d8481811061241f5761241f6138c5565b9050602002013581548110612436576124366138c5565b60009182526020909120600490910201546001600160a01b03161461246d5760405162461bcd60e51b81526004016108d490613bb9565b8115806124e0575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106124b5576124b56138c5565b90506020020135815481106124cc576124cc6138c5565b906000526020600020906004020160010154145b6125525760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e00000060648201526084016108d4565b838c8c83818110612565576125656138c5565b905060200201358154811061257c5761257c6138c5565b600091825260209091206003600490920201015460ff16156125d55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b60448201526064016108d4565b89848d8d848181106125e9576125e96138c5565b9050602002013581548110612600576126006138c5565b60009182526020909120600260049092020101556001848d8d84818110612629576126296138c5565b9050602002013581548110612640576126406138c5565b60009182526020909120600490910201600301805460ff1916911515919091179055600101612403565b508a8a90508360040160008282546126829190613a3d565b90915550506000898152600284016020526040812080548c92906126a7908490613a3d565b9091555050600183015489036126d657600383015460ff16156126d15760038301805460ff191690555b61274f565b60018301546000908152600284016020526040808220548b83529120540361271857600383015460ff166126d15760038301805460ff1916600117905561274f565b60018301546000908152600284016020526040808220548b8352912054111561274f576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161278e93929190613cf2565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146127ce5760405162461bcd60e51b81526004016108d490613c46565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061281e5761281e6138c5565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612852576128526138c5565b90600052602060002090600d02016000018781548110612874576128746138c5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146128e05760405162461bcd60e51b81526004016108d490613d22565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161296b858783613db6565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190613aab565b6129f091906138f1565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600d909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612a79908a908a908a90613e76565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612aaf57612aaf6138c5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612ae357612ae36138c5565b90600052602060002090600d02016000018481548110612b0557612b056138c5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612b535760405162461bcd60e51b81526004016108d490613d22565b600083815260036020526040902054600280548592908110612b7757612b776138c5565b600091825260209091206002600590920201015460ff1615612bab5760405162461bcd60e51b81526004016108d490613a50565b600084815260036020526040812054600280549091908110612bcf57612bcf6138c5565b60009182526020822060059091020180549092508290612bf1906001906138f1565b81548110612c0157612c016138c5565b90600052602060002090600d020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8a9190613eac565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613930565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d859190613eac565b9650612d92848a89613066565b15612e2f57604080516080810182526001600160a01b03808a1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff19958616179055918152600c8901909152929092208054909216179055612e34565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612e6457612e646138c5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612e9857612e986138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600d93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1b91906139c8565b5091509150826004015460001480612f4a575080158015612f4a57506000828152600284016020526040902054155b15612f5c576000945050505050612f8d565b8015612f71575050600401549150612f8d9050565b506000908152600290910160205260409020549150612f8d9050565b92915050565b6000546001600160a01b03163314612fbd5760405162461bcd60e51b81526004016108d490613c46565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61300b613322565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b6000546001600160a01b031633146130635760405162461bcd60e51b81526004016108d490613c46565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d89190613930565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b9190613aab565b61316591906138f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa1580156131a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131ce9190810190613f5c565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561322a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324e9190613eac565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa1580156132a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c9919061403d565b50509150915082816132db9190613a3d565b60045490831015955060ff16156133175784801561331457506001600160a01b0386166000908152600c8901602052604090205460ff16155b94505b505050509392505050565b61332a613349565b61334757604051631afcd79f60e31b815260040160405180910390fd5b565b6000613353612fdf565b54600160401b900460ff16919050565b60006020828403121561337557600080fd5b5035919050565b6001600160a01b038116811461306357600080fd5b600080600080608085870312156133a757600080fd5b8435935060208501356133b98161337c565b93969395505050506040820135916060013590565b600080604083850312156133e157600080fd5b82356133ec8161337c565b915060208301356133fc8161337c565b809150509250929050565b6000806040838503121561341a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561346257613462613429565b60405290565b604051601f8201601f191681016001600160401b038111828210171561349057613490613429565b604052919050565b60006001600160401b038311156134b1576134b1613429565b6134c4601f8401601f1916602001613468565b90508281528383830111156134d857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261350057600080fd5b61350f83833560208501613498565b9392505050565b6000806040838503121561352957600080fd5b82356135348161337c565b915060208301356001600160401b0381111561354f57600080fd5b61355b858286016134ef565b9150509250929050565b60005b83811015613580578181015183820152602001613568565b50506000910152565b600081518084526135a1816020860160208601613565565b601f01601f19169290920160200192915050565b60208152600061350f6020830184613589565b8381528215156020820152606060408201526000611ecf6060830184613589565b60008083601f8401126135fb57600080fd5b5081356001600160401b0381111561361257600080fd5b6020830191508360208260051b850101111561362d57600080fd5b9250929050565b6000806000806060858703121561364a57600080fd5b8435935060208501356001600160401b0381111561366757600080fd5b613673878288016135e9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156136be578351835292840192918401916001016136a2565b50909695505050505050565b600080600080600060a086880312156136e257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561371a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561374657600080fd5b83356137518161337c565b92506020840135915060408401356001600160401b0381111561377357600080fd5b61377f868287016134ef565b9150509250925092565b60008060008060008060a087890312156137a257600080fd5b8635955060208701356001600160401b03808211156137c057600080fd5b6137cc8a838b016135e9565b9097509550604089013594506060890135935060808901359150808211156137f357600080fd5b508701601f8101891361380557600080fd5b61381489823560208401613498565b9150509295509295509295565b60006020828403121561383357600080fd5b813561350f8161337c565b60008060008060006080868803121561385657600080fd5b853594506020860135935060408601356001600160401b038082111561387b57600080fd5b818801915088601f83011261388f57600080fd5b81358181111561389e57600080fd5b8960208285010111156138b057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f8d57612f8d6138db565b80516001600160601b038116811461391b57600080fd5b919050565b8051801515811461391b57600080fd5b600080600080600060a0868803121561394857600080fd5b61395186613904565b945060208601516139618161337c565b60408701519094506005811061397657600080fd5b925061398460608701613920565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156139bf57600080fd5b61350f82613920565b6000806000606084860312156139dd57600080fd5b835192506139ed60208501613920565b91506139fb60408501613920565b90509250925092565b8082028115828204841417612f8d57612f8d6138db565b600082613a3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612f8d57612f8d6138db565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60008060408385031215613a9a57600080fd5b505080516020909101519092909150565b600060208284031215613abd57600080fd5b5051919050565b600181811c90821680613ad857607f821691505b602082108103613af857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208460208401526060604084015260008454613b1f81613ac4565b8060608701526080600180841660008114613b415760018114613b5d57613b8d565b60ff19851660808a0152608084151560051b8a01019550613b8d565b89600052602060002060005b85811015613b845781548b8201860152908301908801613b69565b8a016080019650505b50939a9950505050505050505050565b60008251613baf818460208701613565565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613c0957600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613c36604083018587613bf0565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ca357600080fd5b613cac88613904565b9650613cba60208901613920565b955060408801519450606088015193506080880151925060a08801519150613ce460c08901613920565b905092959891949750929550565b604081526000613d06604083018587613bf0565b8281036020840152613d188185613589565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156118a1576000816000526020600020601f850160051c81016020861015613d8f5750805b601f850160051c820191505b81811015613dae57828155600101613d9b565b505050505050565b6001600160401b03831115613dcd57613dcd613429565b613de183613ddb8354613ac4565b83613d66565b6000601f841160018114613e155760008515613dfd5750838201355b600019600387901b1c1916600186901b178355613e6f565b600083815260209020601f19861690835b82811015613e465786850135825560209485019460019092019101613e26565b5086821015613e635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ebe57600080fd5b815161350f8161337c565b600082601f830112613eda57600080fd5b815160206001600160401b03821115613ef557613ef5613429565b8160051b613f04828201613468565b9283528481018201928281019087851115613f1e57600080fd5b83870192505b84831015613f46578251613f378161337c565b82529183019190830190613f24565b979650505050505050565b805161391b8161337c565b600060208284031215613f6e57600080fd5b81516001600160401b0380821115613f8557600080fd5b908301906101608286031215613f9a57600080fd5b613fa261343f565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613fea57600080fd5b613ff687828601613ec9565b60c08301525060e0838101519082015261010080840151908201526101209150614021828401613f51565b9181019190915261014091820151918101919091529392505050565b6000806000806080858703121561405357600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dbc0f07975f24862ef29107d65fe042a587199d6ad1f6756f0fbf8ad88bad54664736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106101a35760003560e01c806369f3f041116100e2578063b6ede54011610085578063b6ede54014610558578063ba66fde714610578578063be46760414610598578063d2b8035a146105ae578063da3beb8c146105ce578063e349ad30146104a0578063e4c0aaf4146105ee578063f2f4eb261461060e57600080fd5b806369f3f041146104135780636d4cd8ea14610460578063751accd014610480578063796490f9146104a05780637c04034e146104b65780638e426460146104d6578063a7cc08fe146104f6578063b34bfaa81461054257600080fd5b80634b2f0ea01161014a5780634b2f0ea0146102fe5780634f1ef2861461031157806352d1902d1461032457806354fd4d5014610339578063564a565d146103775780635c92e2f6146103a657806365540b96146103c6578063675926f6146103f357600080fd5b80630baa64d1146101a85780630c340a24146101dd5780631200aabc146102155780631c3db16d146102505780632621b9a21461028d578063362c3479146102a7578063472abf68146102c7578063485cc955146102de575b600080fd5b3480156101b457600080fd5b506101c86101c3366004613363565b61062e565b60405190151581526020015b60405180910390f35b3480156101e957600080fd5b506000546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b34801561022157600080fd5b50610242610230366004613363565b60036020526000908152604090205481565b6040519081526020016101d4565b34801561025c57600080fd5b5061027061026b366004613363565b6106a5565b6040805193845291151560208401521515908201526060016101d4565b34801561029957600080fd5b506004546101c89060ff1681565b3480156102b357600080fd5b506102426102c2366004613391565b610813565b3480156102d357600080fd5b506102dc610c9e565b005b3480156102ea57600080fd5b506102dc6102f93660046133ce565b610d4f565b6102dc61030c366004613407565b610e17565b6102dc61031f366004613516565b61167e565b34801561033057600080fd5b506102426118a6565b34801561034557600080fd5b5061036a604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516101d491906135b5565b34801561038357600080fd5b50610397610392366004613363565b611904565b6040516101d4939291906135c8565b3480156103b257600080fd5b506102dc6103c1366004613634565b6119ca565b3480156103d257600080fd5b506103e66103e1366004613363565b611ccf565b6040516101d49190613686565b3480156103ff57600080fd5b5061024261040e3660046136ca565b611d93565b34801561041f57600080fd5b5061043361042e366004613705565b611ed8565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101d4565b34801561046c57600080fd5b506101c861047b366004613363565b611f90565b34801561048c57600080fd5b506102dc61049b366004613731565b612007565b3480156104ac57600080fd5b5061024261271081565b3480156104c257600080fd5b506102dc6104d1366004613789565b6120d3565b3480156104e257600080fd5b506102dc6104f1366004613821565b6127a4565b34801561050257600080fd5b50610516610511366004613705565b6127f0565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101d4565b34801561054e57600080fd5b50610242614e2081565b34801561056457600080fd5b506102dc61057336600461383e565b6128b6565b34801561058457600080fd5b506101c8610593366004613705565b612a8b565b3480156105a457600080fd5b5061024261138881565b3480156105ba57600080fd5b506101fd6105c9366004613407565b612b26565b3480156105da57600080fd5b506102426105e9366004613407565b612e40565b3480156105fa57600080fd5b506102dc610609366004613821565b612f93565b34801561061a57600080fd5b506001546101fd906001600160a01b031681565b600081815260036020526040812054600280548392908110610652576106526138c5565b60009182526020822060059091020180549092508290610674906001906138f1565b81548110610684576106846138c5565b60009182526020909120600d90910201805460059091015414949350505050565b60008060008060026003600087815260200190815260200160002054815481106106d1576106d16138c5565b600091825260208220600590910201805490925082906106f3906001906138f1565b81548110610703576107036138c5565b60009182526020909120600d90910201600381015460ff16945090508361072e578060010154610731565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190613930565b50909350600492506107b4915050565b8160048111156107c6576107c6613997565b036108095760006107d688611ccf565b9050805160010361080757806000815181106107f4576107f46138c5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108859190613930565b509350505050806108dd5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095491906139ad565b156109925760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b60448201526064016108d4565b6000868152600360205260408120546002805490919081106109b6576109b66138c5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106109ea576109ea6138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600d9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906139c8565b5050600087815260078401602052604090205490915060ff16610ab3576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610bf8565b808603610b28576000868152600683016020526040902054610ad6576000610b21565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610b179190613a04565b610b219190613a1b565b9450610bf8565b600081815260078301602052604090205460ff16610bf85781600601600083600a01600181548110610b5c57610b5c6138c5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b9257610b926138c5565b9060005260206000200154815260200190815260200160002054610bb69190613a3d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610beb9190613a04565b610bf59190613a1b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c92576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b60026000610caa612fdf565b8054909150600160401b900460ff1680610cd1575080546001600160401b03808416911610155b15610cee5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60016000610d5b612fdf565b8054909150600160401b900460ff1680610d82575080546001600160401b03808416911610155b15610d9f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610dca8484613003565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610e3b57610e3b6138c5565b600091825260209091206002600590920201015460ff1615610e6f5760405162461bcd60e51b81526004016108d490613a50565b600083815260036020526040812054600280549091908110610e9357610e936138c5565b906000526020600020906005020190508060010154831115610ef75760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e60448201526064016108d4565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190613a87565b91509150814210158015610f7b57508042105b610fc05760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b60448201526064016108d4565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102591906139c8565b5050905086810361103a5761271091506110bb565b61271061138861104a86866138f1565b6110549190613a04565b61105e9190613a1b565b61106885426138f1565b106110b55760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f7365720060448201526064016108d4565b614e2091505b845460009086906110ce906001906138f1565b815481106110de576110de6138c5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600d949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561113d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111619190613aab565b61116b91906138f1565b60008a815260078401602052604090205490915060ff16156111cf5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e000000000060448201526064016108d4565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa158015611219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123d9190613aab565b9050600061271061124e8784613a04565b6112589190613a1b565b6112629083613a3d565b60008c8152600686016020526040812054919250908211156113135760008c8152600686016020526040902054349061129b90846138f1565b116112c05760008c81526006860160205260409020546112bb90836138f1565b6112c2565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161130a929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061133f908490613a3d565b909155505060008c815260068601602052604081208054839290611364908490613a3d565b909155505060008c815260068601602052604090205482116114365760008c8152600686016020526040812054600987018054919290916113a6908490613a3d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156116415782856009015461145391906138f1565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906139ad565b156114de5760028a01805460ff191660011790556115c1565b895460038b0160006114f1876001613a3d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600d02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161156c91815260200190565b602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190613aab565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161160e93929190613afe565b6000604051808303818588803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b50505050505b8034111561166f57336108fc61165783346138f1565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61168782613039565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061170557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116f96000805160206140748339815191525490565b6001600160a01b031614155b156117235760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561177d575060408051601f3d908101601f1916820190925261177a91810190613aab565b60015b6117a557604051630c76093760e01b81526001600160a01b03831660048201526024016108d4565b60008051602061407483398151915281146117d657604051632a87526960e21b8152600481018290526024016108d4565b6000805160206140748339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118a1576000836001600160a01b03168360405161183d9190613b9d565b600060405180830381855af49150503d8060008114611878576040519150601f19603f3d011682016040523d82523d6000602084013e61187d565b606091505b505090508061189f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118f15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061407483398151915290565b6002818154811061191457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161194790613ac4565b80601f016020809104026020016040519081016040528092919081815260200182805461197390613ac4565b80156119c05780601f10611995576101008083540402835291602001916119c0565b820191906000526020600020905b8154815290600101906020018083116119a357829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106119ee576119ee6138c5565b600091825260209091206002600590920201015460ff1615611a225760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a909190613930565b5090935060019250611aa0915050565b816004811115611ab257611ab2613997565b14611b0f5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b60648201526084016108d4565b82611b4c5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b60448201526064016108d4565b600086815260036020526040812054600280549091908110611b7057611b706138c5565b60009182526020822060059091020180549092508290611b92906001906138f1565b81548110611ba257611ba26138c5565b90600052602060002090600d0201905060005b86811015611c68573382898984818110611bd157611bd16138c5565b9050602002013581548110611be857611be86138c5565b60009182526020909120600490910201546001600160a01b031614611c1f5760405162461bcd60e51b81526004016108d490613bb9565b8582898984818110611c3357611c336138c5565b9050602002013581548110611c4a57611c4a6138c5565b60009182526020909120600160049092020181019190915501611bb5565b5086869050816005016000828254611c809190613a3d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611cbd908b908b908b90613c22565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611cf557611cf56138c5565b60009182526020822060059091020180549092508290611d17906001906138f1565b81548110611d2757611d276138c5565b90600052602060002090600d0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d8557602002820191906000526020600020905b815481526020019060010190808311611d71575b505050505092505050919050565b600085815260036020526040812054600280548392908110611db757611db76138c5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611deb57611deb6138c5565b90600052602060002090600d02016000018681548110611e0d57611e0d6138c5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f91906139c8565b506003850154919350915060ff168015611eb357508183600201541480611eb35750805b15611ec657612710945050505050611ecf565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611f0957611f096138c5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611f3d57611f3d6138c5565b600091825260208083206001600d909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611fb457611fb46138c5565b60009182526020822060059091020180549092508290611fd6906001906138f1565b81548110611fe657611fe66138c5565b60009182526020909120600d90910201805460049091015414949350505050565b6000546001600160a01b031633146120315760405162461bcd60e51b81526004016108d490613c46565b6000836001600160a01b0316838360405161204c9190613b9d565b60006040518083038185875af1925050503d8060008114612089576040519150601f19603f3d011682016040523d82523d6000602084013e61208e565b606091505b505090508061189f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b60448201526064016108d4565b6000868152600360205260409020546002805488929081106120f7576120f76138c5565b600091825260209091206002600590920201015460ff161561212b5760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190613930565b50909350600292506121a9915050565b8160048111156121bb576121bb613997565b146122165760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b60648201526084016108d4565b856122585760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b60448201526064016108d4565b60008881526003602052604081205460028054909190811061227c5761227c6138c5565b9060005260206000209060050201905080600101548611156122d75760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b60448201526064016108d4565b805460009082906122ea906001906138f1565b815481106122fa576122fa6138c5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600d9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123799190613930565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156123d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f89190613c88565b505050505091505060005b8a81101561266a5733848d8d8481811061241f5761241f6138c5565b9050602002013581548110612436576124366138c5565b60009182526020909120600490910201546001600160a01b03161461246d5760405162461bcd60e51b81526004016108d490613bb9565b8115806124e0575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106124b5576124b56138c5565b90506020020135815481106124cc576124cc6138c5565b906000526020600020906004020160010154145b6125525760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e00000060648201526084016108d4565b838c8c83818110612565576125656138c5565b905060200201358154811061257c5761257c6138c5565b600091825260209091206003600490920201015460ff16156125d55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b60448201526064016108d4565b89848d8d848181106125e9576125e96138c5565b9050602002013581548110612600576126006138c5565b60009182526020909120600260049092020101556001848d8d84818110612629576126296138c5565b9050602002013581548110612640576126406138c5565b60009182526020909120600490910201600301805460ff1916911515919091179055600101612403565b508a8a90508360040160008282546126829190613a3d565b90915550506000898152600284016020526040812080548c92906126a7908490613a3d565b9091555050600183015489036126d657600383015460ff16156126d15760038301805460ff191690555b61274f565b60018301546000908152600284016020526040808220548b83529120540361271857600383015460ff166126d15760038301805460ff1916600117905561274f565b60018301546000908152600284016020526040808220548b8352912054111561274f576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161278e93929190613cf2565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146127ce5760405162461bcd60e51b81526004016108d490613c46565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061281e5761281e6138c5565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612852576128526138c5565b90600052602060002090600d02016000018781548110612874576128746138c5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146128e05760405162461bcd60e51b81526004016108d490613d22565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161296b858783613db6565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190613aab565b6129f091906138f1565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600d909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612a79908a908a908a90613e76565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612aaf57612aaf6138c5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612ae357612ae36138c5565b90600052602060002090600d02016000018481548110612b0557612b056138c5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612b535760405162461bcd60e51b81526004016108d490613d22565b600083815260036020526040902054600280548592908110612b7757612b776138c5565b600091825260209091206002600590920201015460ff1615612bab5760405162461bcd60e51b81526004016108d490613a50565b600084815260036020526040812054600280549091908110612bcf57612bcf6138c5565b60009182526020822060059091020180549092508290612bf1906001906138f1565b81548110612c0157612c016138c5565b90600052602060002090600d020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8a9190613eac565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613930565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d859190613eac565b9650612d92848a89613066565b15612e2f57604080516080810182526001600160a01b03808a1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff19958616179055918152600c8901909152929092208054909216179055612e34565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612e6457612e646138c5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612e9857612e986138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600d93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1b91906139c8565b5091509150826004015460001480612f4a575080158015612f4a57506000828152600284016020526040902054155b15612f5c576000945050505050612f8d565b8015612f71575050600401549150612f8d9050565b506000908152600290910160205260409020549150612f8d9050565b92915050565b6000546001600160a01b03163314612fbd5760405162461bcd60e51b81526004016108d490613c46565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61300b613322565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b6000546001600160a01b031633146130635760405162461bcd60e51b81526004016108d490613c46565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d89190613930565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b9190613aab565b61316591906138f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa1580156131a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131ce9190810190613f5c565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561322a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324e9190613eac565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa1580156132a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c9919061403d565b50509150915082816132db9190613a3d565b60045490831015955060ff16156133175784801561331457506001600160a01b0386166000908152600c8901602052604090205460ff16155b94505b505050509392505050565b61332a613349565b61334757604051631afcd79f60e31b815260040160405180910390fd5b565b6000613353612fdf565b54600160401b900460ff16919050565b60006020828403121561337557600080fd5b5035919050565b6001600160a01b038116811461306357600080fd5b600080600080608085870312156133a757600080fd5b8435935060208501356133b98161337c565b93969395505050506040820135916060013590565b600080604083850312156133e157600080fd5b82356133ec8161337c565b915060208301356133fc8161337c565b809150509250929050565b6000806040838503121561341a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561346257613462613429565b60405290565b604051601f8201601f191681016001600160401b038111828210171561349057613490613429565b604052919050565b60006001600160401b038311156134b1576134b1613429565b6134c4601f8401601f1916602001613468565b90508281528383830111156134d857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261350057600080fd5b61350f83833560208501613498565b9392505050565b6000806040838503121561352957600080fd5b82356135348161337c565b915060208301356001600160401b0381111561354f57600080fd5b61355b858286016134ef565b9150509250929050565b60005b83811015613580578181015183820152602001613568565b50506000910152565b600081518084526135a1816020860160208601613565565b601f01601f19169290920160200192915050565b60208152600061350f6020830184613589565b8381528215156020820152606060408201526000611ecf6060830184613589565b60008083601f8401126135fb57600080fd5b5081356001600160401b0381111561361257600080fd5b6020830191508360208260051b850101111561362d57600080fd5b9250929050565b6000806000806060858703121561364a57600080fd5b8435935060208501356001600160401b0381111561366757600080fd5b613673878288016135e9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156136be578351835292840192918401916001016136a2565b50909695505050505050565b600080600080600060a086880312156136e257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561371a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561374657600080fd5b83356137518161337c565b92506020840135915060408401356001600160401b0381111561377357600080fd5b61377f868287016134ef565b9150509250925092565b60008060008060008060a087890312156137a257600080fd5b8635955060208701356001600160401b03808211156137c057600080fd5b6137cc8a838b016135e9565b9097509550604089013594506060890135935060808901359150808211156137f357600080fd5b508701601f8101891361380557600080fd5b61381489823560208401613498565b9150509295509295509295565b60006020828403121561383357600080fd5b813561350f8161337c565b60008060008060006080868803121561385657600080fd5b853594506020860135935060408601356001600160401b038082111561387b57600080fd5b818801915088601f83011261388f57600080fd5b81358181111561389e57600080fd5b8960208285010111156138b057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f8d57612f8d6138db565b80516001600160601b038116811461391b57600080fd5b919050565b8051801515811461391b57600080fd5b600080600080600060a0868803121561394857600080fd5b61395186613904565b945060208601516139618161337c565b60408701519094506005811061397657600080fd5b925061398460608701613920565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156139bf57600080fd5b61350f82613920565b6000806000606084860312156139dd57600080fd5b835192506139ed60208501613920565b91506139fb60408501613920565b90509250925092565b8082028115828204841417612f8d57612f8d6138db565b600082613a3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612f8d57612f8d6138db565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60008060408385031215613a9a57600080fd5b505080516020909101519092909150565b600060208284031215613abd57600080fd5b5051919050565b600181811c90821680613ad857607f821691505b602082108103613af857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208460208401526060604084015260008454613b1f81613ac4565b8060608701526080600180841660008114613b415760018114613b5d57613b8d565b60ff19851660808a0152608084151560051b8a01019550613b8d565b89600052602060002060005b85811015613b845781548b8201860152908301908801613b69565b8a016080019650505b50939a9950505050505050505050565b60008251613baf818460208701613565565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613c0957600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613c36604083018587613bf0565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ca357600080fd5b613cac88613904565b9650613cba60208901613920565b955060408801519450606088015193506080880151925060a08801519150613ce460c08901613920565b905092959891949750929550565b604081526000613d06604083018587613bf0565b8281036020840152613d188185613589565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156118a1576000816000526020600020601f850160051c81016020861015613d8f5750805b601f850160051c820191505b81811015613dae57828155600101613d9b565b505050505050565b6001600160401b03831115613dcd57613dcd613429565b613de183613ddb8354613ac4565b83613d66565b6000601f841160018114613e155760008515613dfd5750838201355b600019600387901b1c1916600186901b178355613e6f565b600083815260209020601f19861690835b82811015613e465786850135825560209485019460019092019101613e26565b5086821015613e635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ebe57600080fd5b815161350f8161337c565b600082601f830112613eda57600080fd5b815160206001600160401b03821115613ef557613ef5613429565b8160051b613f04828201613468565b9283528481018201928281019087851115613f1e57600080fd5b83870192505b84831015613f46578251613f378161337c565b82529183019190830190613f24565b979650505050505050565b805161391b8161337c565b600060208284031215613f6e57600080fd5b81516001600160401b0380821115613f8557600080fd5b908301906101608286031215613f9a57600080fd5b613fa261343f565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613fea57600080fd5b613ff687828601613ec9565b60c08301525060e0838101519082015261010080840151908201526101209150614021828401613f51565b9181019190915261014091820151918101919091529392505050565b6000806000806080858703121561405357600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dbc0f07975f24862ef29107d65fe042a587199d6ad1f6756f0fbf8ad88bad54664736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -969,6 +1002,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -1025,6 +1063,7 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -1101,7 +1140,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createDispute(uint256,uint256,bytes,uint256)": { "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", @@ -1210,6 +1249,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "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 }, @@ -1219,18 +1267,8 @@ { "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 @@ -1238,7 +1276,7 @@ "storageLayout": { "storage": [ { - "astId": 17736, + "astId": 19346, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "governor", "offset": 0, @@ -1246,28 +1284,36 @@ "type": "t_address" }, { - "astId": 17739, + "astId": 19349, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)7051" + "type": "t_contract(KlerosCore)8475" }, { - "astId": 17743, + "astId": 19353, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "disputes", "offset": 0, "slot": "2", - "type": "t_array(t_struct(Dispute)17675_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)19281_storage)dyn_storage" }, { - "astId": 17747, + "astId": 19357, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreDisputeIDToLocal", "offset": 0, "slot": "3", "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 19359, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "singleDrawPerJuror", + "offset": 0, + "slot": "4", + "type": "t_bool" } ], "types": { @@ -1276,22 +1322,22 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Dispute)17675_storage)dyn_storage": { - "base": "t_struct(Dispute)17675_storage", + "t_array(t_struct(Dispute)19281_storage)dyn_storage": { + "base": "t_struct(Dispute)19281_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Dispute[]", + "label": "struct DisputeKitClassicBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)17713_storage)dyn_storage": { - "base": "t_struct(Round)17713_storage", + "t_array(t_struct(Round)19323_storage)dyn_storage": { + "base": "t_struct(Round)19323_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Round[]", + "label": "struct DisputeKitClassicBase.Round[]", "numberOfBytes": "32" }, - "t_array(t_struct(Vote)17722_storage)dyn_storage": { - "base": "t_struct(Vote)17722_storage", + "t_array(t_struct(Vote)19332_storage)dyn_storage": { + "base": "t_struct(Vote)19332_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Vote[]", + "label": "struct DisputeKitClassicBase.Vote[]", "numberOfBytes": "32" }, "t_array(t_uint256)dyn_storage": { @@ -1315,11 +1361,18 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(KlerosCore)7051": { + "t_contract(KlerosCore)8475": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { "encoding": "mapping", "key": "t_address", @@ -1341,20 +1394,20 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Dispute)17675_storage": { + "t_struct(Dispute)19281_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Dispute", + "label": "struct DisputeKitClassicBase.Dispute", "members": [ { - "astId": 17664, + "astId": 19270, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "rounds", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Round)17713_storage)dyn_storage" + "type": "t_array(t_struct(Round)19323_storage)dyn_storage" }, { - "astId": 17666, + "astId": 19272, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "numberOfChoices", "offset": 0, @@ -1362,7 +1415,7 @@ "type": "t_uint256" }, { - "astId": 17668, + "astId": 19274, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "jumped", "offset": 0, @@ -1370,7 +1423,7 @@ "type": "t_bool" }, { - "astId": 17672, + "astId": 19278, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreRoundIDToLocal", "offset": 0, @@ -1378,7 +1431,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 17674, + "astId": 19280, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "extraData", "offset": 0, @@ -1388,20 +1441,20 @@ ], "numberOfBytes": "160" }, - "t_struct(Round)17713_storage": { + "t_struct(Round)19323_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Round", + "label": "struct DisputeKitClassicBase.Round", "members": [ { - "astId": 17679, + "astId": 19285, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "votes", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Vote)17722_storage)dyn_storage" + "type": "t_array(t_struct(Vote)19332_storage)dyn_storage" }, { - "astId": 17681, + "astId": 19287, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "winningChoice", "offset": 0, @@ -1409,7 +1462,7 @@ "type": "t_uint256" }, { - "astId": 17685, + "astId": 19291, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "counts", "offset": 0, @@ -1417,7 +1470,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 17687, + "astId": 19293, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "tied", "offset": 0, @@ -1425,7 +1478,7 @@ "type": "t_bool" }, { - "astId": 17689, + "astId": 19295, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalVoted", "offset": 0, @@ -1433,7 +1486,7 @@ "type": "t_uint256" }, { - "astId": 17691, + "astId": 19297, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalCommitted", "offset": 0, @@ -1441,7 +1494,7 @@ "type": "t_uint256" }, { - "astId": 17695, + "astId": 19301, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "paidFees", "offset": 0, @@ -1449,7 +1502,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 17699, + "astId": 19305, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "hasPaid", "offset": 0, @@ -1457,7 +1510,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 17705, + "astId": 19311, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "contributions", "offset": 0, @@ -1465,7 +1518,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 17707, + "astId": 19313, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "feeRewards", "offset": 0, @@ -1473,7 +1526,7 @@ "type": "t_uint256" }, { - "astId": 17710, + "astId": 19316, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "fundedChoices", "offset": 0, @@ -1481,22 +1534,30 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 17712, + "astId": 19318, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "nbVotes", "offset": 0, "slot": "11", "type": "t_uint256" + }, + { + "astId": 19322, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "alreadyDrawn", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_bool)" } ], - "numberOfBytes": "384" + "numberOfBytes": "416" }, - "t_struct(Vote)17722_storage": { + "t_struct(Vote)19332_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Vote", + "label": "struct DisputeKitClassicBase.Vote", "members": [ { - "astId": 17715, + "astId": 19325, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "account", "offset": 0, @@ -1504,7 +1565,7 @@ "type": "t_address" }, { - "astId": 17717, + "astId": 19327, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "commit", "offset": 0, @@ -1512,7 +1573,7 @@ "type": "t_bytes32" }, { - "astId": 17719, + "astId": 19329, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "choice", "offset": 0, @@ -1520,7 +1581,7 @@ "type": "t_uint256" }, { - "astId": 17721, + "astId": 19331, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "voted", "offset": 0, diff --git a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json index 46c553d95..8e4718672 100644 --- a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json +++ b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry.json @@ -147,6 +147,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -220,6 +227,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -270,18 +290,16 @@ "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", + "implementation": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json index 6bd497bd8..1d584e08b 100644 --- a/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json +++ b/contracts/deployments/arbitrumSepolia/DisputeTemplateRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", + "address": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", "abi": [ { "inputs": [], @@ -144,6 +144,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -216,43 +223,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xc7a5046cc41e4ae3d3f5601fd6cbc7cd43e94882c0fc3e255936eb329a695d90", + "transactionHash": "0x81094bcb02cdfbe03abe06cff23b68361d69bf3cc27d97a6fcb11cc322c759f4", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", + "contractAddress": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", "transactionIndex": 1, - "gasUsed": "605603", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000080000000000000000000000000000000000000000", - "blockHash": "0xd9fc847013be19abe6a60a5c8626387bd1011967b93cc86bb8f386b37c8ffa89", - "transactionHash": "0xc7a5046cc41e4ae3d3f5601fd6cbc7cd43e94882c0fc3e255936eb329a695d90", + "gasUsed": "636291", + "logsBloom": "0x00000000000000000000000000000001000000000000000000000000000080000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd41f23f49bd948b47c425939bdd8fed42673bf0a54e49748aa17df3f8e45e147", + "transactionHash": "0x81094bcb02cdfbe03abe06cff23b68361d69bf3cc27d97a6fcb11cc322c759f4", "logs": [ { "transactionIndex": 1, - "blockNumber": 95251528, - "transactionHash": "0xc7a5046cc41e4ae3d3f5601fd6cbc7cd43e94882c0fc3e255936eb329a695d90", - "address": "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", + "blockNumber": 139235123, + "transactionHash": "0x81094bcb02cdfbe03abe06cff23b68361d69bf3cc27d97a6fcb11cc322c759f4", + "address": "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0xd9fc847013be19abe6a60a5c8626387bd1011967b93cc86bb8f386b37c8ffa89" + "blockHash": "0xd41f23f49bd948b47c425939bdd8fed42673bf0a54e49748aa17df3f8e45e147" } ], - "blockNumber": 95251528, - "cumulativeGasUsed": "605603", + "blockNumber": 139235123, + "cumulativeGasUsed": "636291", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"},\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0x846514453223bb0f371180dd8b08b83c0b4a794e8cb915cac3321d3e1a5a26a8\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610a146100fc600039600081816103010152818161032a01526105270152610a146000f3fe6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", "devdoc": { "details": "A contract to maintain a registry of dispute templates.", "errors": { @@ -261,6 +281,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -291,6 +316,7 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -305,7 +331,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "initialize(address)": { "details": "Initializer", @@ -338,6 +364,13 @@ }, "templates": { "details": "The number of templates." + }, + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } } }, "title": "Dispute Template Registry", @@ -349,18 +382,8 @@ { "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 @@ -368,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 6884, + "astId": 8294, "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", "label": "governor", "offset": 0, @@ -376,7 +399,7 @@ "type": "t_address" }, { - "astId": 6887, + "astId": 8297, "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", "label": "templates", "offset": 0, diff --git a/contracts/deployments/arbitrumSepolia/EvidenceModule.json b/contracts/deployments/arbitrumSepolia/EvidenceModule.json index 1b1bd135d..876d7f1ca 100644 --- a/contracts/deployments/arbitrumSepolia/EvidenceModule.json +++ b/contracts/deployments/arbitrumSepolia/EvidenceModule.json @@ -128,6 +128,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -177,6 +184,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -227,18 +247,16 @@ "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", + "implementation": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json b/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json index fcd485c46..f4d8edd0b 100644 --- a/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json +++ b/contracts/deployments/arbitrumSepolia/EvidenceModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", + "address": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", "abi": [ { "inputs": [], @@ -125,6 +125,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -173,43 +180,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0x04492d106a179b5b054adc4266d3354de61842d0440b4041dcbec73d48d578dc", + "transactionHash": "0x945c6b6b6ad6d37482c3a8ebb542ae3dbd0337b2279388ffab424d6dacd78eea", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", + "contractAddress": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", "transactionIndex": 1, - "gasUsed": "543866", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xea77bc69a33e9a122456ff2f0eab864b92e5a73cc3cf8164d2548b5667509d16", - "transactionHash": "0x04492d106a179b5b054adc4266d3354de61842d0440b4041dcbec73d48d578dc", + "gasUsed": "576517", + "logsBloom": "0x00008000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8bbf5d1c8f8eee29b8a19cc13bba4148cf03b0676bc7b699cfc9fff73ef5a66f", + "transactionHash": "0x945c6b6b6ad6d37482c3a8ebb542ae3dbd0337b2279388ffab424d6dacd78eea", "logs": [ { "transactionIndex": 1, - "blockNumber": 95247718, - "transactionHash": "0x04492d106a179b5b054adc4266d3354de61842d0440b4041dcbec73d48d578dc", - "address": "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", + "blockNumber": 139235174, + "transactionHash": "0x945c6b6b6ad6d37482c3a8ebb542ae3dbd0337b2279388ffab424d6dacd78eea", + "address": "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0xea77bc69a33e9a122456ff2f0eab864b92e5a73cc3cf8164d2548b5667509d16" + "blockHash": "0x8bbf5d1c8f8eee29b8a19cc13bba4148cf03b0676bc7b699cfc9fff73ef5a66f" } ], - "blockNumber": 95247718, - "cumulativeGasUsed": "543866", + "blockNumber": 139235174, + "cumulativeGasUsed": "576517", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Evidence Module\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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\\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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0xedf978718e5d349c5a39747e2c4da253a1d8b73588c4118b74b39c324ba471fe\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108ff6100fc6000396000818161024a01528181610273015261047001526108ff6000f3fe6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -217,6 +237,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -246,6 +271,7 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -254,7 +280,7 @@ "kind": "dev", "methods": { "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "initialize(address)": { "details": "Initializer.", @@ -280,6 +306,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "Evidence Module", "version": 1 }, @@ -289,18 +324,8 @@ { "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 @@ -308,7 +333,7 @@ "storageLayout": { "storage": [ { - "astId": 21562, + "astId": 21480, "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", "label": "governor", "offset": 0, diff --git a/contracts/deployments/arbitrumSepolia/KlerosCore.json b/contracts/deployments/arbitrumSepolia/KlerosCore.json index 2a8279a91..a39bb20fa 100644 --- a/contracts/deployments/arbitrumSepolia/KlerosCore.json +++ b/contracts/deployments/arbitrumSepolia/KlerosCore.json @@ -29,11 +29,6 @@ "name": "ArbitrationFeesNotEnough", "type": "error" }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, { "inputs": [], "name": "CannotDisableClassicDK", @@ -44,11 +39,6 @@ "name": "CommitPeriodNotPassed", "type": "error" }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, { "inputs": [], "name": "DisputeKitNotSupportedByCourt", @@ -170,6 +160,11 @@ "name": "StakingTransferFailed", "type": "error" }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", + "type": "error" + }, { "inputs": [], "name": "TokenNotAccepted", @@ -293,9 +288,9 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", + "internalType": "uint96", "name": "_courtID", - "type": "uint256" + "type": "uint96" }, { "indexed": true, @@ -1653,6 +1648,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1852,6 +1854,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1945,37 +1960,16 @@ "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c38f115d001d3b5bbec5e8d44f78c7b61a27d94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000baa5068f0bd1417046250a3ede2b1f27e31383bd00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract 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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122085e549173d7216435e32cd3998e84d15db68396e4913f125fc39ce47c0997d8764736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122085e549173d7216435e32cd3998e84d15db68396e4913f125fc39ce47c0997d8764736f6c63430008180033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x34B944D42cAcfC8266955D07A80181D2054aa225", - "0x0000000000000000000000000000000000000000", - "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", - false, - [ - "200000000000000000000", - 10000, - "100000000000000000", - 256 - ], - [ - 0, - 0, - 0, - 10 - ], - "0x05", - "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD" - ] + "methodName": "initialize3", + "args": [] }, - "implementation": "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", + "implementation": "0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json b/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json index fe6f90211..1e39b1aa4 100644 --- a/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json +++ b/contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", + "address": "0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7", "abi": [ { "inputs": [], @@ -26,11 +26,6 @@ "name": "ArbitrationFeesNotEnough", "type": "error" }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, { "inputs": [], "name": "CannotDisableClassicDK", @@ -41,11 +36,6 @@ "name": "CommitPeriodNotPassed", "type": "error" }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, { "inputs": [], "name": "DisputeKitNotSupportedByCourt", @@ -167,6 +157,11 @@ "name": "StakingTransferFailed", "type": "error" }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", + "type": "error" + }, { "inputs": [], "name": "TokenNotAccepted", @@ -290,9 +285,9 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", + "internalType": "uint96", "name": "_courtID", - "type": "uint256" + "type": "uint96" }, { "indexed": true, @@ -1650,6 +1645,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1848,43 +1850,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xe77b81f9e8cb25a61c819da5a90ef571cc507dcf64fad88aff85aca284ac3a4b", + "transactionHash": "0x4a93ddcaae18e3a3a00ac03883ff54ca81668afaaf7520f42e12e3ac24e856b0", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", + "contractAddress": "0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7", "transactionIndex": 1, - "gasUsed": "5377029", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000004000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x212b12f6689e420d365716c5fa8df4cc5f5262cab92097f7c1ddc33fe6cda50f", - "transactionHash": "0xe77b81f9e8cb25a61c819da5a90ef571cc507dcf64fad88aff85aca284ac3a4b", + "gasUsed": "5090884", + "logsBloom": "0x00000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000004000000000000000008000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x08de8e157eb520ebc7b1e8852ee120097e992e3a6acbfd07dc0bce748fcb5e14", + "transactionHash": "0x4a93ddcaae18e3a3a00ac03883ff54ca81668afaaf7520f42e12e3ac24e856b0", "logs": [ { "transactionIndex": 1, - "blockNumber": 95250335, - "transactionHash": "0xe77b81f9e8cb25a61c819da5a90ef571cc507dcf64fad88aff85aca284ac3a4b", - "address": "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", + "blockNumber": 139235245, + "transactionHash": "0x4a93ddcaae18e3a3a00ac03883ff54ca81668afaaf7520f42e12e3ac24e856b0", + "address": "0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0x212b12f6689e420d365716c5fa8df4cc5f5262cab92097f7c1ddc33fe6cda50f" + "blockHash": "0x08de8e157eb520ebc7b1e8852ee120097e992e3a6acbfd07dc0bce748fcb5e14" } ], - "blockNumber": 95250335, - "cumulativeGasUsed": "5377029", + "blockNumber": 139235245, + "cumulativeGasUsed": "5090884", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArraysLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DepthLevelMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibeInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"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\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` 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)\":{\"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.\",\"_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.\",\"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\":\"KlerosCore 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/KlerosCore.sol\":\"KlerosCore\"},\"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/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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516158b862000103600039600081816116d4015281816116fd01526118f401526158b86000f3fe60806040526004361061029d5760003560e01c806382d0223711610165578063c71f4253116100cc578063e4c0aaf411610085578063e4c0aaf4146108ac578063f6506db4146108cc578063f7434ea9146108ec578063fbb519e71461090c578063fbf405b01461092c578063fc6f8f161461094c578063fe524c391461096c57600080fd5b8063c71f4253146107f7578063cf0c38f814610817578063d07368bd14610837578063d2b8035a14610857578063d4d1d76a14610877578063d98493f61461088c57600080fd5b8063acdbf51d1161011e578063acdbf51d1461073c578063afe15cfb1461075c578063b004963714610791578063c13517e1146107b1578063c258bb19146107c4578063c3569902146107e457600080fd5b806382d022371461067a5780638456cb591461069a57806386541b24146106af5780638a9bb02a146106cf5780638bb04875146106fc578063a072b86c1461071c57600080fd5b80633cfd11841161020957806359ec827e116101c257806359ec827e146105c05780635c975abb146105e0578063751accd0146105fa5780637717a6e81461061a5780637934c0be1461063a5780637b4f3cc51461065a57600080fd5b80633cfd1184146105055780633f4ba83a14610532578063452a9320146105475780634f1ef2861461056757806352d1902d1461057a578063564a565d1461058f57600080fd5b806319b815291161025b57806319b81529146103d75780631c3db16d146104075780631f5a0dd2146104445780632d29a47b146104a55780632e1daf2f146104c55780632fcb4f04146104e557600080fd5b8062f5822c146102a25780630219da79146102c45780630b7414bc1461033c5780630c340a241461035c578063115d5376146103895780631860592b146103a9575b600080fd5b3480156102ae57600080fd5b506102c26102bd366004614a12565b61098c565b005b3480156102d057600080fd5b5061030f6102df366004614a12565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561034857600080fd5b506102c2610357366004614b25565b6109d9565b34801561036857600080fd5b5060005461037c906001600160a01b031681565b6040516103339190614b86565b34801561039557600080fd5b506102c26103a4366004614b9a565b610b10565b3480156103b557600080fd5b506103c96103c4366004614bb3565b611047565b604051908152602001610333565b3480156103e357600080fd5b506103f76103f2366004614b9a565b6110a1565b6040519015158152602001610333565b34801561041357600080fd5b50610427610422366004614b9a565b61119a565b604080519384529115156020840152151590820152606001610333565b34801561045057600080fd5b5061046461045f366004614b9a565b61129b565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610333565b3480156104b157600080fd5b506102c26104c0366004614bdf565b6112fa565b3480156104d157600080fd5b5060045461037c906001600160a01b031681565b3480156104f157600080fd5b506102c2610500366004614a12565b611586565b34801561051157600080fd5b50610525610520366004614c16565b6115d3565b6040516103339190614c54565b34801561053e57600080fd5b506102c261163d565b34801561055357600080fd5b5060015461037c906001600160a01b031681565b6102c2610575366004614cd1565b6116c0565b34801561058657600080fd5b506103c96118e7565b34801561059b57600080fd5b506105af6105aa366004614b9a565b611945565b604051610333959493929190614d58565b3480156105cc57600080fd5b506103c96105db366004614b9a565b6119a1565b3480156105ec57600080fd5b506009546103f79060ff1681565b34801561060657600080fd5b506102c2610615366004614d97565b611af6565b34801561062657600080fd5b506102c2610635366004614def565b611ba0565b34801561064657600080fd5b506102c2610655366004614e0b565b611bd2565b34801561066657600080fd5b506102c2610675366004614eb1565b611c51565b34801561068657600080fd5b506102c2610695366004614f92565b611d3f565b3480156106a657600080fd5b506102c2611dfc565b3480156106bb57600080fd5b506102c26106ca366004614fe4565b611e9c565b3480156106db57600080fd5b506106ef6106ea366004615052565b612079565b60405161033391906150b9565b34801561070857600080fd5b506102c2610717366004614b9a565b612205565b34801561072857600080fd5b506102c261073736600461515e565b612369565b34801561074857600080fd5b5061037c610757366004614b9a565b6126cb565b34801561076857600080fd5b5061077c610777366004614b9a565b6126f5565b60408051928352602083019190915201610333565b34801561079d57600080fd5b506102c26107ac366004614a12565b6127a1565b6103c96107bf36600461521e565b6127ee565b3480156107d057600080fd5b506102c26107df366004614a12565b612826565b6102c26107f236600461524e565b612873565b34801561080357600080fd5b506103c9610812366004614b9a565b612d47565b34801561082357600080fd5b5060035461037c906001600160a01b031681565b34801561084357600080fd5b506102c2610852366004614a12565b612daf565b34801561086357600080fd5b506102c2610872366004615052565b612e58565b34801561088357600080fd5b506006546103c9565b34801561089857600080fd5b506103c96108a73660046152cf565b61316d565b3480156108b857600080fd5b506102c26108c7366004614a12565b6131ba565b3480156108d857600080fd5b506103c96108e736600461531a565b613207565b3480156108f857600080fd5b506103c9610907366004615380565b6132ed565b34801561091857600080fd5b506102c26109273660046153b4565b613339565b34801561093857600080fd5b5060025461037c906001600160a01b031681565b34801561095857600080fd5b506103c9610967366004614b9a565b613379565b34801561097857600080fd5b506103f7610987366004614def565b6133a8565b6000546001600160a01b031633146109b75760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a045760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0a578115610aa357828181518110610a2857610a28615405565b602002602001015160001480610a5b57506006548351849083908110610a5057610a50615405565b602002602001015110155b15610a7957604051633d58a98960e11b815260040160405180910390fd5b610a9e84848381518110610a8f57610a8f615405565b602002602001015160016133f0565b610b02565b6001838281518110610ab757610ab7615405565b602002602001015103610add576040516356d111fd60e11b815260040160405180910390fd5b610b0284848381518110610af357610af3615405565b602002602001015160006133f0565b600101610a07565b50505050565b600060078281548110610b2557610b25615405565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610b5857610b58615405565b6000918252602082206003850154600c909202019250610b7a90600190615431565b90506000836003018281548110610b9357610b93615405565b600091825260208220600b909102019150600185015460ff166004811115610bbd57610bbd614d20565b03610c985781158015610c0c57506001840154600684019060ff166004811115610be957610be9614d20565b60048110610bf957610bf9615405565b01546002850154610c0a9042615431565b105b15610c2a57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610c52576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610c69576002610c6c565b60015b60018086018054909160ff1990911690836004811115610c8e57610c8e614d20565b0217905550610ff9565b60018085015460ff166004811115610cb257610cb2614d20565b03610dc2576001840154600684019060ff166004811115610cd557610cd5614d20565b60048110610ce557610ce5615405565b01546002850154610cf69042615431565b108015610d8d57506006816000015481548110610d1557610d15615405565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8b9190615444565b155b15610dab57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610c8e565b6002600185015460ff166004811115610ddd57610ddd614d20565b03610f2b576001840154600684019060ff166004811115610e0057610e00614d20565b60048110610e1057610e10615405565b01546002850154610e219042615431565b108015610eb857506006816000015481548110610e4057610e40615405565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610e92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb69190615444565b155b15610ed657604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610ff9565b6003600185015460ff166004811115610f4657610f46614d20565b03610fc0576001840154600684019060ff166004811115610f6957610f69614d20565b60048110610f7957610f79615405565b01546002850154610f8a9042615431565b1015610fa957604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610c8e565b6004600185015460ff166004811115610fdb57610fdb614d20565b03610ff9576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110389160ff1690615461565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061108490600160481b900460ff16600a615553565b61108e9084615562565b611098919061558f565b90505b92915050565b600080600783815481106110b7576110b7615405565b60009182526020822060036004909202019081018054919350906110dd90600190615431565b815481106110ed576110ed615405565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061112257611122615405565b90600052602060002090600c0201905080600501548260030154101561114d57506000949350505050565b80546005805490916001600160601b031690811061116d5761116d615405565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600785815481106111b3576111b3615405565b60009182526020822060036004909202019081018054919350906111d990600190615431565b815481106111e9576111e9615405565b90600052602060002090600b020190506000600682600001548154811061121257611212615405565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128b91906155a3565b9199909850909650945050505050565b600581815481106112ab57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561131e57604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061133457611334615405565b600091825260209091206004918202019150600182015460ff16600481111561135f5761135f614d20565b1461137d57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061139257611392615405565b6000918252602082206004600b909202019081015490935091506113b684836155db565b60058401546006850154600286015492935090916000906113d890839061558f565b905060008660010154905060008060068960000154815481106113fd576113fd615405565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147d91906155ee565b915050806000036114995783861115611494578395505b6114b9565b6114a4846002615562565b8611156114b9576114b6846002615562565b95505b60048801869055865b86811015611565578481101561151b576115146040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613478565b955061155d565b61155d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613949565b6001016114c2565b508488600501541461157957600588018590555b5050505050505050505050565b6000546001600160a01b031633146115b15760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6115db614952565b6005826001600160601b0316815481106115f7576115f7615405565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b81548152602001906001019080831161161e5750505050509050919050565b6000546001600160a01b031633146116685760405163c383977560e01b815260040160405180910390fd5b60095460ff1661168b5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6116c982613e81565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061174757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661173b6000805160206158638339815191525490565b6001600160a01b031614155b156117655760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156117bf575060408051601f3d908101601f191682019092526117bc918101906155ee565b60015b6117e75781604051630c76093760e01b81526004016117de9190614b86565b60405180910390fd5b600080516020615863833981519152811461181857604051632a87526960e21b8152600481018290526024016117de565b6000805160206158638339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118e1576000836001600160a01b03168360405161187f919061562b565b600060405180830381855af49150503d80600081146118ba576040519150601f19603f3d011682016040523d82523d6000602084013e6118bf565b606091505b5050905080610b0a576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146119325760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061586383398151915290565b6007818154811061195557600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600783815481106119b7576119b7615405565b60009182526020822060036004909202019081018054919350906119dd90600190615431565b815481106119ed576119ed615405565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a2257611a22615405565b90600052602060002090600c020190508060050154826003015410611ac15782546001600160601b031660001901611a63576001600160ff1b039350611aee565b6003820154611a73906002615562565b611a7e9060016155db565b81546005805490916001600160601b0316908110611a9e57611a9e615405565b90600052602060002090600c020160040154611aba9190615562565b9350611aee565b6003820154611ad1906002615562565b611adc9060016155db565b8160040154611aeb9190615562565b93505b505050919050565b6000546001600160a01b03163314611b215760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611b3c919061562b565b60006040518083038185875af1925050503d8060008114611b79576040519150601f19603f3d011682016040523d82523d6000602084013e611b7e565b606091505b5050905080610b0a576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611bc457604051636f1dac1d60e01b815260040160405180910390fd5b6118e1338383600080613eaf565b6000546001600160a01b03163314611bfd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680611c9a575080546001600160401b03808416911610155b15611cb75760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611cea8c8c8c8c8c8c8c8c8c8c614069565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611d6a5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e2257506000546001600160a01b03163314155b15611e4057604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611e6457604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611ec75760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611ee557611ee5615405565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f47575080546005805488926001600160601b0316908110611f3357611f33615405565b90600052602060002090600c020160020154115b15611f6557604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611fe057866005836001018381548110611f8c57611f8c615405565b906000526020600020015481548110611fa757611fa7615405565b90600052602060002090600c0201600201541015611fd857604051639717078960e01b815260040160405180910390fd5b600101611f68565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120239060068301908490614970565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161206796959493929190615647565b60405180910390a25050505050505050565b6120df60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106120f2576120f2615405565b9060005260206000209060040201600301828154811061211457612114615405565b90600052602060002090600b020160405180610160016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682018054806020026020016040519081016040528092919081815260200182805480156121c357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121a5575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061221a5761221a615405565b600091825260209091206004918202019150600182015460ff16600481111561224557612245614d20565b1461226357604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff161561228e5760405163c977f8d360e01b815260040160405180910390fd5b60006122998361119a565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123945760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106123b1576123b1615405565b90600052602060002090600c02016002015411156123e257604051639717078960e01b815260040160405180910390fd5b80516000036124045760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661242b57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b835181101561251a5783818151811061247e5761247e615405565b6020026020010151600014806124b1575060065484518590839081106124a6576124a6615405565b602002602001015110155b156124cf57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106124e9576124e9615405565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612463565b5060016000908152600a8201602052604090205460ff1661254e576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125869160018401916149ae565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125c99060068301908790614970565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916125fb9186918991016156a6565b600060405180830381600087803b15801561261557600080fd5b505af1158015612629573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061264957612649615405565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d906126b6908e908e908e908e908e908e908d906156bf565b60405180910390a35050505050505050505050565b600681815481106126db57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006007848154811061270d5761270d615405565b6000918252602090912060049091020190506003600182015460ff16600481111561273a5761273a614d20565b03612792576002810154815460058054929550916001600160601b0390911690811061276857612768615405565b600091825260209091206009600c909202010154600282015461278b91906155db565b915061279b565b60009250600091505b50915091565b6000546001600160a01b031633146127cc5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006127f9826132ed565b34101561281957604051630e3360f160e21b815260040160405180910390fd5b6110988383600034614324565b6000546001600160a01b031633146128515760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61287c836119a1565b34101561289c57604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128b1576128b1615405565b6000918252602090912060049091020190506003600182015460ff1660048111156128de576128de614d20565b146128fc576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061291290600190615431565b8154811061292257612922615405565b90600052602060002090600b02019050600681600001548154811061294957612949615405565b6000918252602090912001546001600160a01b0316331461297d5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129c0576129c0615405565b90600052602060002090600c020160050154846003015410612ac9576005836001600160601b0316815481106129f8576129f8615405565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a2b57612a2b615405565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a5757600191505b84546001600160601b03848116911614612ac957845460038601546001600160601b0390911690612a8a90600190615431565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b0c57612b0c615405565b90600052602060002090600c02019050806004015434612b2c919061558f565b826003018190555061271081600301548260020154612b4b9190615562565b612b55919061558f565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612b8c91615431565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bca57600080fd5b505af1158015612bde573d6000803e3d6000fd5b505086548454149150612cc490505784546003870154612c0090600190615431565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c4e57612c4e615405565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612c91918d918d918d919060040161573e565b600060405180830381600087803b158015612cab57600080fd5b505af1158015612cbf573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d349190615461565b60405180910390a2505050505050505050565b60008060078381548110612d5d57612d5d615405565b906000526020600020906004020190508060030160018260030180549050612d859190615431565b81548110612d9557612d95615405565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612dda5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e6d57612e6d615405565b90600052602060002090600402019050600060018260030180549050612e939190615431565b90506000826003018281548110612eac57612eac615405565b600091825260208220600b909102019150600184015460ff166004811115612ed657612ed6614d20565b14612ef457604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f0d57612f0d615405565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f42575060038401546006850154105b1561314a5760006001600160a01b03841663d2b8035a8a84612f638161576e565b9550612f6f90876155db565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd69190615787565b90506001600160a01b038116612fec5750612f2c565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926130229286929091016157a4565b600060405180830381600087803b15801561303c57600080fd5b505af1158015613050573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b9161309d918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036131445760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561312b57600080fd5b505af115801561313f573d6000803e3d6000fd5b505050505b50612f2c565b8084600a01600082825461315e91906155db565b90915550505050505050505050565b60006131b2826103c486868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506132ed92505050565b949350505050565b6000546001600160a01b031633146131e55760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166132405760405163e51cf7bf60e01b815260040160405180910390fd5b61324b85858561316d565b82101561326b57604051630e3360f160e21b815260040160405180910390fd5b6132806001600160a01b03841633308561460b565b61329d576040516312171d8360e31b815260040160405180910390fd5b6132e18686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506143249050565b90505b95945050505050565b60008060006132fb846146e7565b5091509150806005836001600160601b03168154811061331d5761331d615405565b90600052602060002090600c0201600401546131b29190615562565b6004546001600160a01b0316331461336457604051639d6cab9960e01b815260040160405180910390fd5b613372848484846001613eaf565b5050505050565b60006007828154811061338e5761338e615405565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106133c6576133c6615405565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b03168154811061340d5761340d615405565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061349257613492615405565b906000526020600020906004020190506000816003018460200151815481106134bd576134bd615405565b90600052602060002090600b02019050600060068260000154815481106134e6576134e6615405565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa15801561356c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061359091906155ee565b90506127108111156135a157506127105b60006127106135b08382615431565b85600101546135bf9190615562565b6135c9919061558f565b9050808760c0018181516135dd91906155db565b90525060e08701516006850180546000929081106135fd576135fd615405565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161363e9185918791016157a4565b600060405180830381600087803b15801561365857600080fd5b505af115801561366c573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c92506136a19185918791016157a4565b600060405180830381600087803b1580156136bb57600080fd5b505af11580156136cf573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e78661370f876157bd565b60098b01546040516137319392916000916001600160a01b03909116906157d9565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613798573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137bc9190615444565b613822576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916137ef91859101614b86565b600060405180830381600087803b15801561380957600080fd5b505af115801561381d573d6000803e3d6000fd5b505050505b600188606001516138339190615431565b8860e0015114801561384757506040880151155b156139385760098501546001600160a01b0316613890576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f19350505050506138b7565b600054600286015460098701546138b5926001600160a01b039182169291169061476e565b505b60005460c08901516002546138da926001600160a01b039182169291169061476e565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361392f93909290916001600160a01b03909116906157fd565b60405180910390a35b50505060c090940151949350505050565b6000600782600001518154811061396257613962615405565b9060005260206000209060040201905060008160030183602001518154811061398d5761398d615405565b90600052602060002090600b02019050600060068260000154815481106139b6576139b6615405565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f6939092916139f59161581c565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7991906155ee565b9050612710811115613a8a57506127105b60008360060186606001518760e00151613aa4919061581c565b81548110613ab457613ab4615405565b600091825260208220015460018601546001600160a01b03909116925061271090613ae0908590615562565b613aea919061558f565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613b1c9186918691016157a4565b600060405180830381600087803b158015613b3657600080fd5b505af1158015613b4a573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613b7d91869101614b86565b602060405180830381865afa158015613b9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bbe9190615444565b613bdb57600254613bd9906001600160a01b0316838361476e565b505b60006127108489604001518a60c00151613bf5919061558f565b613bff9190615562565b613c09919061558f565b905080866008016000828254613c1f91906155db565b925050819055506000612710858a604001518960020154613c40919061558f565b613c4a9190615562565b613c54919061558f565b905080876007016000828254613c6a91906155db565b9091555050600254613c86906001600160a01b0316858461476e565b5060098701546001600160a01b0316613cc4576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613cdf565b6009870154613cdd906001600160a01b0316858361476e565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613d2f928c928a928a92909116906157d9565b60405180910390a4600189606001516002613d4a9190615562565b613d549190615431565b8960e0015103613e7657600087600801548a60c00151613d749190615431565b9050600088600701548960020154613d8c9190615431565b905081151580613d9b57508015155b15611579578115613dc557600054600254613dc3916001600160a01b0391821691168461476e565b505b8015613e2c5760098901546001600160a01b0316613e0b57600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613e2c565b60005460098a0154613e2a916001600160a01b0391821691168361476e565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126b691879187916001600160a01b03909116906157fd565b505050505050505050565b6000546001600160a01b03163314613eac5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613ed157506005546001600160601b038616115b15613ee957613ee182600461483b565b5060006132e4565b8315801590613f2457506005856001600160601b031681548110613f0f57613f0f615405565b90600052602060002090600c02016002015484105b15613f3457613ee182600561483b565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015613fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fcb9190615830565b919450925090506000816007811115613fe657613fe6614d20565b1461400157613ff5858261483b565b600093505050506132e4565b821561402e5760025461401f906001600160a01b03168a308661460b565b61402e57613ff585600161483b565b811561405a5760025461404b906001600160a01b03168a8461476e565b61405a57613ff585600261483b565b50600198975050505050505050565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261415b928791016156a6565b600060405180830381600087803b15801561417557600080fd5b505af1158015614189573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516141f79160018401916020909101906149ae565b50805460ff60601b1916600160601b8715150217815584516002820155602085015160038201556040850151600480830191909155606086015160058301556142469060068301908690614970565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91614279916001918891016156a6565b600060405180830381600087803b15801561429357600080fd5b505af11580156142a7573d6000803e3d6000fd5b5050825487516020808a01516040808c015160608d0151825160008152948501928390526001600160601b039096169750600196507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d9561430f958f959094938e91906156bf565b60405180910390a361157960018060016133f0565b6000806000614332866146e7565b92505091506005826001600160601b03168154811061435357614353615405565b60009182526020808320848452600a600c90930201919091019052604090205460ff166143935760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a90910155600680549296509092918490811061441e5761441e615405565b6000918252602082200154600580546001600160a01b039092169350906001600160601b03871690811061445457614454615405565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a161561449f5761449a8a8460040154611047565b6144a5565b82600401545b90506144b1818a61558f565b6003808401919091558683558301546002840154612710916144d291615562565b6144dc919061558f565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561454f57600080fd5b505af1158015614563573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b815260040161459d949392919061573e565b600060405180830381600087803b1580156145b757600080fd5b505af11580156145cb573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251614670919061562b565b6000604051808303816000865af19150503d80600081146146ad576040519150601f19603f3d011682016040523d82523d6000602084013e6146b2565b606091505b50915091508180156146dc5750805115806146dc5750808060200190518101906146dc9190615444565b979650505050505050565b6000806000604084511061475c575050506020810151604082015160608301516001600160601b038316158061472857506005546001600160601b03841610155b1561473257600192505b8160000361473f57600391505b80158061474e57506006548110155b15614757575060015b614767565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016147909291906157a4565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516147c5919061562b565b6000604051808303816000865af19150503d8060008114614802576040519150601f19603f3d011682016040523d82523d6000602084013e614807565b606091505b50915091508180156148315750805115806148315750808060200190518101906148319190615444565b9695505050505050565b600182600181111561484f5761484f614d20565b03614858575050565b600181600781111561486c5761486c614d20565b0361488a57604051630f323ed960e11b815260040160405180910390fd5b600281600781111561489e5761489e614d20565b036148bc5760405163e45e13a360e01b815260040160405180910390fd5b60038160078111156148d0576148d0614d20565b036148ee57604051631d91d0ed60e31b815260040160405180910390fd5b600481600781111561490257614902614d20565b03614920576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561493457614934614d20565b036118e357604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b826004810192821561499e579160200282015b8281111561499e578251825591602001919060010190614983565b506149aa9291506149e8565b5090565b82805482825590600052602060002090810192821561499e579160200282018281111561499e578251825591602001919060010190614983565b5b808211156149aa57600081556001016149e9565b6001600160a01b0381168114613eac57600080fd5b600060208284031215614a2457600080fd5b8135614a2f816149fd565b9392505050565b80356001600160601b0381168114614a4d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614a9057614a90614a52565b604052919050565b600082601f830112614aa957600080fd5b813560206001600160401b03821115614ac457614ac4614a52565b8160051b614ad3828201614a68565b9283528481018201928281019087851115614aed57600080fd5b83870192505b848310156146dc57823582529183019190830190614af3565b8015158114613eac57600080fd5b8035614a4d81614b0c565b600080600060608486031215614b3a57600080fd5b614b4384614a36565b925060208401356001600160401b03811115614b5e57600080fd5b614b6a86828701614a98565b9250506040840135614b7b81614b0c565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614bac57600080fd5b5035919050565b60008060408385031215614bc657600080fd5b8235614bd1816149fd565b946020939093013593505050565b600080600060608486031215614bf457600080fd5b505081359360208301359350604090920135919050565b8035614a4d816149fd565b600060208284031215614c2857600080fd5b61109882614a36565b8060005b6004811015610b0a578151845260209384019390910190600101614c35565b6080810161109b8284614c31565b600082601f830112614c7357600080fd5b81356001600160401b03811115614c8c57614c8c614a52565b614c9f601f8201601f1916602001614a68565b818152846020838601011115614cb457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ce457600080fd5b8235614cef816149fd565b915060208301356001600160401b03811115614d0a57600080fd5b614d1685828601614c62565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614d5457634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614d846040830186614d36565b9215156060820152608001529392505050565b600080600060608486031215614dac57600080fd5b8335614db7816149fd565b92506020840135915060408401356001600160401b03811115614dd957600080fd5b614de586828701614c62565b9150509250925092565b60008060408385031215614e0257600080fd5b614bd183614a36565b60008060408385031215614e1e57600080fd5b8235614e29816149fd565b91506020830135614e3981614b0c565b809150509250929050565b600082601f830112614e5557600080fd5b604051608081018181106001600160401b0382111715614e7757614e77614a52565b604052806080840185811115614e8c57600080fd5b845b81811015614ea6578035835260209283019201614e8e565b509195945050505050565b6000806000806000806000806000806102008b8d031215614ed157600080fd5b8a35614edc816149fd565b995060208b0135614eec816149fd565b985060408b0135614efc816149fd565b975060608b0135614f0c816149fd565b965060808b0135614f1c816149fd565b9550614f2a60a08c01614b1a565b9450614f398c60c08d01614e44565b9350614f498c6101408d01614e44565b92506101c08b01356001600160401b03811115614f6557600080fd5b614f718d828e01614c62565b925050614f816101e08c01614c0b565b90509295989b9194979a5092959850565b600080600060608486031215614fa757600080fd5b8335614fb2816149fd565b925060208401356001600160401b0381168114614fce57600080fd5b9150604084013560ff81168114614b7b57600080fd5b6000806000806000806000610140888a03121561500057600080fd5b61500988614a36565b9650602088013561501981614b0c565b955060408801359450606088013593506080880135925060a088013591506150448960c08a01614e44565b905092959891949750929550565b6000806040838503121561506557600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156150ae5781516001600160a01b031687529582019590820190600101615089565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152615114610180850183615074565b60e0860151610100868101919091528601516101208087019190915286015190925061014061514d818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561517d57600080fd5b6151868a614a36565b985060208a013561519681614b0c565b975060408a0135965060608a0135955060808a0135945060a08a013593506151c18b60c08c01614e44565b92506101408a01356001600160401b03808211156151de57600080fd5b6151ea8d838e01614c62565b93506101608c013591508082111561520157600080fd5b5061520e8c828d01614a98565b9150509295985092959850929598565b6000806040838503121561523157600080fd5b8235915060208301356001600160401b03811115614d0a57600080fd5b60008060006060848603121561526357600080fd5b833592506020840135915060408401356001600160401b03811115614dd957600080fd5b60008083601f84011261529957600080fd5b5081356001600160401b038111156152b057600080fd5b6020830191508360208285010111156152c857600080fd5b9250929050565b6000806000604084860312156152e457600080fd5b83356001600160401b038111156152fa57600080fd5b61530686828701615287565b9094509250506020840135614b7b816149fd565b60008060008060006080868803121561533257600080fd5b8535945060208601356001600160401b0381111561534f57600080fd5b61535b88828901615287565b909550935050604086013561536f816149fd565b949793965091946060013592915050565b60006020828403121561539257600080fd5b81356001600160401b038111156153a857600080fd5b6131b284828501614c62565b600080600080608085870312156153ca57600080fd5b84356153d5816149fd565b93506153e360208601614a36565b92506040850135915060608501356153fa81614b0c565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561109b5761109b61541b565b60006020828403121561545657600080fd5b8151614a2f81614b0c565b6020810161109b8284614d36565b600181815b808511156154aa5781600019048211156154905761549061541b565b8085161561549d57918102915b93841c9390800290615474565b509250929050565b6000826154c15750600161109b565b816154ce5750600061109b565b81600181146154e457600281146154ee5761550a565b600191505061109b565b60ff8411156154ff576154ff61541b565b50506001821b61109b565b5060208310610133831016604e8410600b841016171561552d575081810a61109b565b615537838361546f565b806000190482111561554b5761554b61541b565b029392505050565b600061109860ff8416836154b2565b808202811582820484141761109b5761109b61541b565b634e487b7160e01b600052601260045260246000fd5b60008261559e5761559e615579565b500490565b6000806000606084860312156155b857600080fd5b8351925060208401516155ca81614b0c565b6040850151909250614b7b81614b0c565b8082018082111561109b5761109b61541b565b60006020828403121561560057600080fd5b5051919050565b60005b8381101561562257818101518382015260200161560a565b50506000910152565b6000825161563d818460208701615607565b9190910192915050565b60006101208201905087151582528660208301528560408301528460608301528360808301526146dc60a0830184614c31565b60008151808452615692816020860160208601615607565b601f01601f19169290920160200192915050565b8281526040602082015260006131b2604083018461567a565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526156f360a0860188614c31565b610120850192909252845190819052610160840191602086019160005b8181101561572c57835185529382019392820192600101615710565b50929c9b505050505050505050505050565b84815283602082015260806040820152600061575d608083018561567a565b905082606083015295945050505050565b6000600182016157805761578061541b565b5060010190565b60006020828403121561579957600080fd5b8151614a2f816149fd565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016157d2576157d261541b565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b60008261582b5761582b615579565b500690565b60008060006060848603121561584557600080fd5b8351925060208401519150604084015160088110614b7b57600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212202e38ba7d544a60694d1795236f10a584d79e2146855586c364e47aa808c37ccc64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061029d5760003560e01c806382d0223711610165578063c71f4253116100cc578063e4c0aaf411610085578063e4c0aaf4146108ac578063f6506db4146108cc578063f7434ea9146108ec578063fbb519e71461090c578063fbf405b01461092c578063fc6f8f161461094c578063fe524c391461096c57600080fd5b8063c71f4253146107f7578063cf0c38f814610817578063d07368bd14610837578063d2b8035a14610857578063d4d1d76a14610877578063d98493f61461088c57600080fd5b8063acdbf51d1161011e578063acdbf51d1461073c578063afe15cfb1461075c578063b004963714610791578063c13517e1146107b1578063c258bb19146107c4578063c3569902146107e457600080fd5b806382d022371461067a5780638456cb591461069a57806386541b24146106af5780638a9bb02a146106cf5780638bb04875146106fc578063a072b86c1461071c57600080fd5b80633cfd11841161020957806359ec827e116101c257806359ec827e146105c05780635c975abb146105e0578063751accd0146105fa5780637717a6e81461061a5780637934c0be1461063a5780637b4f3cc51461065a57600080fd5b80633cfd1184146105055780633f4ba83a14610532578063452a9320146105475780634f1ef2861461056757806352d1902d1461057a578063564a565d1461058f57600080fd5b806319b815291161025b57806319b81529146103d75780631c3db16d146104075780631f5a0dd2146104445780632d29a47b146104a55780632e1daf2f146104c55780632fcb4f04146104e557600080fd5b8062f5822c146102a25780630219da79146102c45780630b7414bc1461033c5780630c340a241461035c578063115d5376146103895780631860592b146103a9575b600080fd5b3480156102ae57600080fd5b506102c26102bd366004614a12565b61098c565b005b3480156102d057600080fd5b5061030f6102df366004614a12565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561034857600080fd5b506102c2610357366004614b25565b6109d9565b34801561036857600080fd5b5060005461037c906001600160a01b031681565b6040516103339190614b86565b34801561039557600080fd5b506102c26103a4366004614b9a565b610b10565b3480156103b557600080fd5b506103c96103c4366004614bb3565b611047565b604051908152602001610333565b3480156103e357600080fd5b506103f76103f2366004614b9a565b6110a1565b6040519015158152602001610333565b34801561041357600080fd5b50610427610422366004614b9a565b61119a565b604080519384529115156020840152151590820152606001610333565b34801561045057600080fd5b5061046461045f366004614b9a565b61129b565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610333565b3480156104b157600080fd5b506102c26104c0366004614bdf565b6112fa565b3480156104d157600080fd5b5060045461037c906001600160a01b031681565b3480156104f157600080fd5b506102c2610500366004614a12565b611586565b34801561051157600080fd5b50610525610520366004614c16565b6115d3565b6040516103339190614c54565b34801561053e57600080fd5b506102c261163d565b34801561055357600080fd5b5060015461037c906001600160a01b031681565b6102c2610575366004614cd1565b6116c0565b34801561058657600080fd5b506103c96118e7565b34801561059b57600080fd5b506105af6105aa366004614b9a565b611945565b604051610333959493929190614d58565b3480156105cc57600080fd5b506103c96105db366004614b9a565b6119a1565b3480156105ec57600080fd5b506009546103f79060ff1681565b34801561060657600080fd5b506102c2610615366004614d97565b611af6565b34801561062657600080fd5b506102c2610635366004614def565b611ba0565b34801561064657600080fd5b506102c2610655366004614e0b565b611bd2565b34801561066657600080fd5b506102c2610675366004614eb1565b611c51565b34801561068657600080fd5b506102c2610695366004614f92565b611d3f565b3480156106a657600080fd5b506102c2611dfc565b3480156106bb57600080fd5b506102c26106ca366004614fe4565b611e9c565b3480156106db57600080fd5b506106ef6106ea366004615052565b612079565b60405161033391906150b9565b34801561070857600080fd5b506102c2610717366004614b9a565b612205565b34801561072857600080fd5b506102c261073736600461515e565b612369565b34801561074857600080fd5b5061037c610757366004614b9a565b6126cb565b34801561076857600080fd5b5061077c610777366004614b9a565b6126f5565b60408051928352602083019190915201610333565b34801561079d57600080fd5b506102c26107ac366004614a12565b6127a1565b6103c96107bf36600461521e565b6127ee565b3480156107d057600080fd5b506102c26107df366004614a12565b612826565b6102c26107f236600461524e565b612873565b34801561080357600080fd5b506103c9610812366004614b9a565b612d47565b34801561082357600080fd5b5060035461037c906001600160a01b031681565b34801561084357600080fd5b506102c2610852366004614a12565b612daf565b34801561086357600080fd5b506102c2610872366004615052565b612e58565b34801561088357600080fd5b506006546103c9565b34801561089857600080fd5b506103c96108a73660046152cf565b61316d565b3480156108b857600080fd5b506102c26108c7366004614a12565b6131ba565b3480156108d857600080fd5b506103c96108e736600461531a565b613207565b3480156108f857600080fd5b506103c9610907366004615380565b6132ed565b34801561091857600080fd5b506102c26109273660046153b4565b613339565b34801561093857600080fd5b5060025461037c906001600160a01b031681565b34801561095857600080fd5b506103c9610967366004614b9a565b613379565b34801561097857600080fd5b506103f7610987366004614def565b6133a8565b6000546001600160a01b031633146109b75760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a045760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0a578115610aa357828181518110610a2857610a28615405565b602002602001015160001480610a5b57506006548351849083908110610a5057610a50615405565b602002602001015110155b15610a7957604051633d58a98960e11b815260040160405180910390fd5b610a9e84848381518110610a8f57610a8f615405565b602002602001015160016133f0565b610b02565b6001838281518110610ab757610ab7615405565b602002602001015103610add576040516356d111fd60e11b815260040160405180910390fd5b610b0284848381518110610af357610af3615405565b602002602001015160006133f0565b600101610a07565b50505050565b600060078281548110610b2557610b25615405565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610b5857610b58615405565b6000918252602082206003850154600c909202019250610b7a90600190615431565b90506000836003018281548110610b9357610b93615405565b600091825260208220600b909102019150600185015460ff166004811115610bbd57610bbd614d20565b03610c985781158015610c0c57506001840154600684019060ff166004811115610be957610be9614d20565b60048110610bf957610bf9615405565b01546002850154610c0a9042615431565b105b15610c2a57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610c52576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610c69576002610c6c565b60015b60018086018054909160ff1990911690836004811115610c8e57610c8e614d20565b0217905550610ff9565b60018085015460ff166004811115610cb257610cb2614d20565b03610dc2576001840154600684019060ff166004811115610cd557610cd5614d20565b60048110610ce557610ce5615405565b01546002850154610cf69042615431565b108015610d8d57506006816000015481548110610d1557610d15615405565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8b9190615444565b155b15610dab57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610c8e565b6002600185015460ff166004811115610ddd57610ddd614d20565b03610f2b576001840154600684019060ff166004811115610e0057610e00614d20565b60048110610e1057610e10615405565b01546002850154610e219042615431565b108015610eb857506006816000015481548110610e4057610e40615405565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610e92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb69190615444565b155b15610ed657604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610ff9565b6003600185015460ff166004811115610f4657610f46614d20565b03610fc0576001840154600684019060ff166004811115610f6957610f69614d20565b60048110610f7957610f79615405565b01546002850154610f8a9042615431565b1015610fa957604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610c8e565b6004600185015460ff166004811115610fdb57610fdb614d20565b03610ff9576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110389160ff1690615461565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061108490600160481b900460ff16600a615553565b61108e9084615562565b611098919061558f565b90505b92915050565b600080600783815481106110b7576110b7615405565b60009182526020822060036004909202019081018054919350906110dd90600190615431565b815481106110ed576110ed615405565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061112257611122615405565b90600052602060002090600c0201905080600501548260030154101561114d57506000949350505050565b80546005805490916001600160601b031690811061116d5761116d615405565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600785815481106111b3576111b3615405565b60009182526020822060036004909202019081018054919350906111d990600190615431565b815481106111e9576111e9615405565b90600052602060002090600b020190506000600682600001548154811061121257611212615405565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128b91906155a3565b9199909850909650945050505050565b600581815481106112ab57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561131e57604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061133457611334615405565b600091825260209091206004918202019150600182015460ff16600481111561135f5761135f614d20565b1461137d57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061139257611392615405565b6000918252602082206004600b909202019081015490935091506113b684836155db565b60058401546006850154600286015492935090916000906113d890839061558f565b905060008660010154905060008060068960000154815481106113fd576113fd615405565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147d91906155ee565b915050806000036114995783861115611494578395505b6114b9565b6114a4846002615562565b8611156114b9576114b6846002615562565b95505b60048801869055865b86811015611565578481101561151b576115146040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613478565b955061155d565b61155d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613949565b6001016114c2565b508488600501541461157957600588018590555b5050505050505050505050565b6000546001600160a01b031633146115b15760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6115db614952565b6005826001600160601b0316815481106115f7576115f7615405565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b81548152602001906001019080831161161e5750505050509050919050565b6000546001600160a01b031633146116685760405163c383977560e01b815260040160405180910390fd5b60095460ff1661168b5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6116c982613e81565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061174757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661173b6000805160206158638339815191525490565b6001600160a01b031614155b156117655760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156117bf575060408051601f3d908101601f191682019092526117bc918101906155ee565b60015b6117e75781604051630c76093760e01b81526004016117de9190614b86565b60405180910390fd5b600080516020615863833981519152811461181857604051632a87526960e21b8152600481018290526024016117de565b6000805160206158638339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118e1576000836001600160a01b03168360405161187f919061562b565b600060405180830381855af49150503d80600081146118ba576040519150601f19603f3d011682016040523d82523d6000602084013e6118bf565b606091505b5050905080610b0a576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146119325760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061586383398151915290565b6007818154811061195557600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600783815481106119b7576119b7615405565b60009182526020822060036004909202019081018054919350906119dd90600190615431565b815481106119ed576119ed615405565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a2257611a22615405565b90600052602060002090600c020190508060050154826003015410611ac15782546001600160601b031660001901611a63576001600160ff1b039350611aee565b6003820154611a73906002615562565b611a7e9060016155db565b81546005805490916001600160601b0316908110611a9e57611a9e615405565b90600052602060002090600c020160040154611aba9190615562565b9350611aee565b6003820154611ad1906002615562565b611adc9060016155db565b8160040154611aeb9190615562565b93505b505050919050565b6000546001600160a01b03163314611b215760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611b3c919061562b565b60006040518083038185875af1925050503d8060008114611b79576040519150601f19603f3d011682016040523d82523d6000602084013e611b7e565b606091505b5050905080610b0a576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611bc457604051636f1dac1d60e01b815260040160405180910390fd5b6118e1338383600080613eaf565b6000546001600160a01b03163314611bfd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680611c9a575080546001600160401b03808416911610155b15611cb75760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611cea8c8c8c8c8c8c8c8c8c8c614069565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611d6a5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e2257506000546001600160a01b03163314155b15611e4057604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611e6457604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611ec75760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611ee557611ee5615405565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f47575080546005805488926001600160601b0316908110611f3357611f33615405565b90600052602060002090600c020160020154115b15611f6557604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611fe057866005836001018381548110611f8c57611f8c615405565b906000526020600020015481548110611fa757611fa7615405565b90600052602060002090600c0201600201541015611fd857604051639717078960e01b815260040160405180910390fd5b600101611f68565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120239060068301908490614970565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161206796959493929190615647565b60405180910390a25050505050505050565b6120df60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106120f2576120f2615405565b9060005260206000209060040201600301828154811061211457612114615405565b90600052602060002090600b020160405180610160016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682018054806020026020016040519081016040528092919081815260200182805480156121c357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121a5575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061221a5761221a615405565b600091825260209091206004918202019150600182015460ff16600481111561224557612245614d20565b1461226357604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff161561228e5760405163c977f8d360e01b815260040160405180910390fd5b60006122998361119a565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123945760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106123b1576123b1615405565b90600052602060002090600c02016002015411156123e257604051639717078960e01b815260040160405180910390fd5b80516000036124045760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661242b57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b835181101561251a5783818151811061247e5761247e615405565b6020026020010151600014806124b1575060065484518590839081106124a6576124a6615405565b602002602001015110155b156124cf57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106124e9576124e9615405565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612463565b5060016000908152600a8201602052604090205460ff1661254e576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125869160018401916149ae565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125c99060068301908790614970565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916125fb9186918991016156a6565b600060405180830381600087803b15801561261557600080fd5b505af1158015612629573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061264957612649615405565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d906126b6908e908e908e908e908e908e908d906156bf565b60405180910390a35050505050505050505050565b600681815481106126db57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006007848154811061270d5761270d615405565b6000918252602090912060049091020190506003600182015460ff16600481111561273a5761273a614d20565b03612792576002810154815460058054929550916001600160601b0390911690811061276857612768615405565b600091825260209091206009600c909202010154600282015461278b91906155db565b915061279b565b60009250600091505b50915091565b6000546001600160a01b031633146127cc5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006127f9826132ed565b34101561281957604051630e3360f160e21b815260040160405180910390fd5b6110988383600034614324565b6000546001600160a01b031633146128515760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61287c836119a1565b34101561289c57604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128b1576128b1615405565b6000918252602090912060049091020190506003600182015460ff1660048111156128de576128de614d20565b146128fc576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061291290600190615431565b8154811061292257612922615405565b90600052602060002090600b02019050600681600001548154811061294957612949615405565b6000918252602090912001546001600160a01b0316331461297d5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129c0576129c0615405565b90600052602060002090600c020160050154846003015410612ac9576005836001600160601b0316815481106129f8576129f8615405565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a2b57612a2b615405565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a5757600191505b84546001600160601b03848116911614612ac957845460038601546001600160601b0390911690612a8a90600190615431565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b0c57612b0c615405565b90600052602060002090600c02019050806004015434612b2c919061558f565b826003018190555061271081600301548260020154612b4b9190615562565b612b55919061558f565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612b8c91615431565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bca57600080fd5b505af1158015612bde573d6000803e3d6000fd5b505086548454149150612cc490505784546003870154612c0090600190615431565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c4e57612c4e615405565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612c91918d918d918d919060040161573e565b600060405180830381600087803b158015612cab57600080fd5b505af1158015612cbf573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d349190615461565b60405180910390a2505050505050505050565b60008060078381548110612d5d57612d5d615405565b906000526020600020906004020190508060030160018260030180549050612d859190615431565b81548110612d9557612d95615405565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612dda5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e6d57612e6d615405565b90600052602060002090600402019050600060018260030180549050612e939190615431565b90506000826003018281548110612eac57612eac615405565b600091825260208220600b909102019150600184015460ff166004811115612ed657612ed6614d20565b14612ef457604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f0d57612f0d615405565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f42575060038401546006850154105b1561314a5760006001600160a01b03841663d2b8035a8a84612f638161576e565b9550612f6f90876155db565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd69190615787565b90506001600160a01b038116612fec5750612f2c565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926130229286929091016157a4565b600060405180830381600087803b15801561303c57600080fd5b505af1158015613050573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b9161309d918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036131445760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561312b57600080fd5b505af115801561313f573d6000803e3d6000fd5b505050505b50612f2c565b8084600a01600082825461315e91906155db565b90915550505050505050505050565b60006131b2826103c486868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506132ed92505050565b949350505050565b6000546001600160a01b031633146131e55760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166132405760405163e51cf7bf60e01b815260040160405180910390fd5b61324b85858561316d565b82101561326b57604051630e3360f160e21b815260040160405180910390fd5b6132806001600160a01b03841633308561460b565b61329d576040516312171d8360e31b815260040160405180910390fd5b6132e18686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506143249050565b90505b95945050505050565b60008060006132fb846146e7565b5091509150806005836001600160601b03168154811061331d5761331d615405565b90600052602060002090600c0201600401546131b29190615562565b6004546001600160a01b0316331461336457604051639d6cab9960e01b815260040160405180910390fd5b613372848484846001613eaf565b5050505050565b60006007828154811061338e5761338e615405565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106133c6576133c6615405565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b03168154811061340d5761340d615405565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061349257613492615405565b906000526020600020906004020190506000816003018460200151815481106134bd576134bd615405565b90600052602060002090600b02019050600060068260000154815481106134e6576134e6615405565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa15801561356c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061359091906155ee565b90506127108111156135a157506127105b60006127106135b08382615431565b85600101546135bf9190615562565b6135c9919061558f565b9050808760c0018181516135dd91906155db565b90525060e08701516006850180546000929081106135fd576135fd615405565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161363e9185918791016157a4565b600060405180830381600087803b15801561365857600080fd5b505af115801561366c573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c92506136a19185918791016157a4565b600060405180830381600087803b1580156136bb57600080fd5b505af11580156136cf573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e78661370f876157bd565b60098b01546040516137319392916000916001600160a01b03909116906157d9565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613798573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137bc9190615444565b613822576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916137ef91859101614b86565b600060405180830381600087803b15801561380957600080fd5b505af115801561381d573d6000803e3d6000fd5b505050505b600188606001516138339190615431565b8860e0015114801561384757506040880151155b156139385760098501546001600160a01b0316613890576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f19350505050506138b7565b600054600286015460098701546138b5926001600160a01b039182169291169061476e565b505b60005460c08901516002546138da926001600160a01b039182169291169061476e565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361392f93909290916001600160a01b03909116906157fd565b60405180910390a35b50505060c090940151949350505050565b6000600782600001518154811061396257613962615405565b9060005260206000209060040201905060008160030183602001518154811061398d5761398d615405565b90600052602060002090600b02019050600060068260000154815481106139b6576139b6615405565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f6939092916139f59161581c565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7991906155ee565b9050612710811115613a8a57506127105b60008360060186606001518760e00151613aa4919061581c565b81548110613ab457613ab4615405565b600091825260208220015460018601546001600160a01b03909116925061271090613ae0908590615562565b613aea919061558f565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613b1c9186918691016157a4565b600060405180830381600087803b158015613b3657600080fd5b505af1158015613b4a573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613b7d91869101614b86565b602060405180830381865afa158015613b9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bbe9190615444565b613bdb57600254613bd9906001600160a01b0316838361476e565b505b60006127108489604001518a60c00151613bf5919061558f565b613bff9190615562565b613c09919061558f565b905080866008016000828254613c1f91906155db565b925050819055506000612710858a604001518960020154613c40919061558f565b613c4a9190615562565b613c54919061558f565b905080876007016000828254613c6a91906155db565b9091555050600254613c86906001600160a01b0316858461476e565b5060098701546001600160a01b0316613cc4576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613cdf565b6009870154613cdd906001600160a01b0316858361476e565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613d2f928c928a928a92909116906157d9565b60405180910390a4600189606001516002613d4a9190615562565b613d549190615431565b8960e0015103613e7657600087600801548a60c00151613d749190615431565b9050600088600701548960020154613d8c9190615431565b905081151580613d9b57508015155b15611579578115613dc557600054600254613dc3916001600160a01b0391821691168461476e565b505b8015613e2c5760098901546001600160a01b0316613e0b57600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613e2c565b60005460098a0154613e2a916001600160a01b0391821691168361476e565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126b691879187916001600160a01b03909116906157fd565b505050505050505050565b6000546001600160a01b03163314613eac5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613ed157506005546001600160601b038616115b15613ee957613ee182600461483b565b5060006132e4565b8315801590613f2457506005856001600160601b031681548110613f0f57613f0f615405565b90600052602060002090600c02016002015484105b15613f3457613ee182600561483b565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015613fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fcb9190615830565b919450925090506000816007811115613fe657613fe6614d20565b1461400157613ff5858261483b565b600093505050506132e4565b821561402e5760025461401f906001600160a01b03168a308661460b565b61402e57613ff585600161483b565b811561405a5760025461404b906001600160a01b03168a8461476e565b61405a57613ff585600261483b565b50600198975050505050505050565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261415b928791016156a6565b600060405180830381600087803b15801561417557600080fd5b505af1158015614189573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516141f79160018401916020909101906149ae565b50805460ff60601b1916600160601b8715150217815584516002820155602085015160038201556040850151600480830191909155606086015160058301556142469060068301908690614970565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91614279916001918891016156a6565b600060405180830381600087803b15801561429357600080fd5b505af11580156142a7573d6000803e3d6000fd5b5050825487516020808a01516040808c015160608d0151825160008152948501928390526001600160601b039096169750600196507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d9561430f958f959094938e91906156bf565b60405180910390a361157960018060016133f0565b6000806000614332866146e7565b92505091506005826001600160601b03168154811061435357614353615405565b60009182526020808320848452600a600c90930201919091019052604090205460ff166143935760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a90910155600680549296509092918490811061441e5761441e615405565b6000918252602082200154600580546001600160a01b039092169350906001600160601b03871690811061445457614454615405565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a161561449f5761449a8a8460040154611047565b6144a5565b82600401545b90506144b1818a61558f565b6003808401919091558683558301546002840154612710916144d291615562565b6144dc919061558f565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561454f57600080fd5b505af1158015614563573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b815260040161459d949392919061573e565b600060405180830381600087803b1580156145b757600080fd5b505af11580156145cb573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251614670919061562b565b6000604051808303816000865af19150503d80600081146146ad576040519150601f19603f3d011682016040523d82523d6000602084013e6146b2565b606091505b50915091508180156146dc5750805115806146dc5750808060200190518101906146dc9190615444565b979650505050505050565b6000806000604084511061475c575050506020810151604082015160608301516001600160601b038316158061472857506005546001600160601b03841610155b1561473257600192505b8160000361473f57600391505b80158061474e57506006548110155b15614757575060015b614767565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016147909291906157a4565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516147c5919061562b565b6000604051808303816000865af19150503d8060008114614802576040519150601f19603f3d011682016040523d82523d6000602084013e614807565b606091505b50915091508180156148315750805115806148315750808060200190518101906148319190615444565b9695505050505050565b600182600181111561484f5761484f614d20565b03614858575050565b600181600781111561486c5761486c614d20565b0361488a57604051630f323ed960e11b815260040160405180910390fd5b600281600781111561489e5761489e614d20565b036148bc5760405163e45e13a360e01b815260040160405180910390fd5b60038160078111156148d0576148d0614d20565b036148ee57604051631d91d0ed60e31b815260040160405180910390fd5b600481600781111561490257614902614d20565b03614920576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561493457614934614d20565b036118e357604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b826004810192821561499e579160200282015b8281111561499e578251825591602001919060010190614983565b506149aa9291506149e8565b5090565b82805482825590600052602060002090810192821561499e579160200282018281111561499e578251825591602001919060010190614983565b5b808211156149aa57600081556001016149e9565b6001600160a01b0381168114613eac57600080fd5b600060208284031215614a2457600080fd5b8135614a2f816149fd565b9392505050565b80356001600160601b0381168114614a4d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614a9057614a90614a52565b604052919050565b600082601f830112614aa957600080fd5b813560206001600160401b03821115614ac457614ac4614a52565b8160051b614ad3828201614a68565b9283528481018201928281019087851115614aed57600080fd5b83870192505b848310156146dc57823582529183019190830190614af3565b8015158114613eac57600080fd5b8035614a4d81614b0c565b600080600060608486031215614b3a57600080fd5b614b4384614a36565b925060208401356001600160401b03811115614b5e57600080fd5b614b6a86828701614a98565b9250506040840135614b7b81614b0c565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614bac57600080fd5b5035919050565b60008060408385031215614bc657600080fd5b8235614bd1816149fd565b946020939093013593505050565b600080600060608486031215614bf457600080fd5b505081359360208301359350604090920135919050565b8035614a4d816149fd565b600060208284031215614c2857600080fd5b61109882614a36565b8060005b6004811015610b0a578151845260209384019390910190600101614c35565b6080810161109b8284614c31565b600082601f830112614c7357600080fd5b81356001600160401b03811115614c8c57614c8c614a52565b614c9f601f8201601f1916602001614a68565b818152846020838601011115614cb457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ce457600080fd5b8235614cef816149fd565b915060208301356001600160401b03811115614d0a57600080fd5b614d1685828601614c62565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614d5457634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614d846040830186614d36565b9215156060820152608001529392505050565b600080600060608486031215614dac57600080fd5b8335614db7816149fd565b92506020840135915060408401356001600160401b03811115614dd957600080fd5b614de586828701614c62565b9150509250925092565b60008060408385031215614e0257600080fd5b614bd183614a36565b60008060408385031215614e1e57600080fd5b8235614e29816149fd565b91506020830135614e3981614b0c565b809150509250929050565b600082601f830112614e5557600080fd5b604051608081018181106001600160401b0382111715614e7757614e77614a52565b604052806080840185811115614e8c57600080fd5b845b81811015614ea6578035835260209283019201614e8e565b509195945050505050565b6000806000806000806000806000806102008b8d031215614ed157600080fd5b8a35614edc816149fd565b995060208b0135614eec816149fd565b985060408b0135614efc816149fd565b975060608b0135614f0c816149fd565b965060808b0135614f1c816149fd565b9550614f2a60a08c01614b1a565b9450614f398c60c08d01614e44565b9350614f498c6101408d01614e44565b92506101c08b01356001600160401b03811115614f6557600080fd5b614f718d828e01614c62565b925050614f816101e08c01614c0b565b90509295989b9194979a5092959850565b600080600060608486031215614fa757600080fd5b8335614fb2816149fd565b925060208401356001600160401b0381168114614fce57600080fd5b9150604084013560ff81168114614b7b57600080fd5b6000806000806000806000610140888a03121561500057600080fd5b61500988614a36565b9650602088013561501981614b0c565b955060408801359450606088013593506080880135925060a088013591506150448960c08a01614e44565b905092959891949750929550565b6000806040838503121561506557600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156150ae5781516001600160a01b031687529582019590820190600101615089565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152615114610180850183615074565b60e0860151610100868101919091528601516101208087019190915286015190925061014061514d818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561517d57600080fd5b6151868a614a36565b985060208a013561519681614b0c565b975060408a0135965060608a0135955060808a0135945060a08a013593506151c18b60c08c01614e44565b92506101408a01356001600160401b03808211156151de57600080fd5b6151ea8d838e01614c62565b93506101608c013591508082111561520157600080fd5b5061520e8c828d01614a98565b9150509295985092959850929598565b6000806040838503121561523157600080fd5b8235915060208301356001600160401b03811115614d0a57600080fd5b60008060006060848603121561526357600080fd5b833592506020840135915060408401356001600160401b03811115614dd957600080fd5b60008083601f84011261529957600080fd5b5081356001600160401b038111156152b057600080fd5b6020830191508360208285010111156152c857600080fd5b9250929050565b6000806000604084860312156152e457600080fd5b83356001600160401b038111156152fa57600080fd5b61530686828701615287565b9094509250506020840135614b7b816149fd565b60008060008060006080868803121561533257600080fd5b8535945060208601356001600160401b0381111561534f57600080fd5b61535b88828901615287565b909550935050604086013561536f816149fd565b949793965091946060013592915050565b60006020828403121561539257600080fd5b81356001600160401b038111156153a857600080fd5b6131b284828501614c62565b600080600080608085870312156153ca57600080fd5b84356153d5816149fd565b93506153e360208601614a36565b92506040850135915060608501356153fa81614b0c565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561109b5761109b61541b565b60006020828403121561545657600080fd5b8151614a2f81614b0c565b6020810161109b8284614d36565b600181815b808511156154aa5781600019048211156154905761549061541b565b8085161561549d57918102915b93841c9390800290615474565b509250929050565b6000826154c15750600161109b565b816154ce5750600061109b565b81600181146154e457600281146154ee5761550a565b600191505061109b565b60ff8411156154ff576154ff61541b565b50506001821b61109b565b5060208310610133831016604e8410600b841016171561552d575081810a61109b565b615537838361546f565b806000190482111561554b5761554b61541b565b029392505050565b600061109860ff8416836154b2565b808202811582820484141761109b5761109b61541b565b634e487b7160e01b600052601260045260246000fd5b60008261559e5761559e615579565b500490565b6000806000606084860312156155b857600080fd5b8351925060208401516155ca81614b0c565b6040850151909250614b7b81614b0c565b8082018082111561109b5761109b61541b565b60006020828403121561560057600080fd5b5051919050565b60005b8381101561562257818101518382015260200161560a565b50506000910152565b6000825161563d818460208701615607565b9190910192915050565b60006101208201905087151582528660208301528560408301528460608301528360808301526146dc60a0830184614c31565b60008151808452615692816020860160208601615607565b601f01601f19169290920160200192915050565b8281526040602082015260006131b2604083018461567a565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526156f360a0860188614c31565b610120850192909252845190819052610160840191602086019160005b8181101561572c57835185529382019392820192600101615710565b50929c9b505050505050505050505050565b84815283602082015260806040820152600061575d608083018561567a565b905082606083015295945050505050565b6000600182016157805761578061541b565b5060010190565b60006020828403121561579957600080fd5b8151614a2f816149fd565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016157d2576157d261541b565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b60008261582b5761582b615579565b500690565b60008060006060848603121561584557600080fd5b8351925060208401519150604084015160088110614b7b57600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212202e38ba7d544a60694d1795236f10a584d79e2146855586c364e47aa808c37ccc64736f6c63430008180033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibeInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingZeroWhenNoStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` 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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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)\":{\"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.\",\"_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.\",\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCore 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\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/KlerosCore.sol\":\"KlerosCore\"},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615aa2620001036000396000818161173d01528181611766015261195d0152615aa26000f3fe6080604052600436106102b35760003560e01c806382d0223711610170578063cf0c38f8116100cc578063ec918b6511610085578063ec918b6514610920578063f6506db414610935578063f7434ea914610955578063fbb519e714610975578063fbf405b014610995578063fc6f8f16146109b5578063fe524c39146109d557600080fd5b8063cf0c38f81461086b578063d07368bd1461088b578063d2b8035a146108ab578063d4d1d76a146108cb578063d98493f6146108e0578063e4c0aaf41461090057600080fd5b8063acdbf51d11610129578063acdbf51d14610790578063afe15cfb146107b0578063b0049637146107e5578063c13517e114610805578063c258bb1914610818578063c356990214610838578063c71f42531461084b57600080fd5b806382d02237146106ce5780638456cb59146106ee57806386541b24146107035780638a9bb02a146107235780638bb0487514610750578063a072b86c1461077057600080fd5b80633cfd11841161021f578063564a565d116101d8578063564a565d146105e357806359ec827e146106145780635c975abb14610634578063751accd01461064e5780637717a6e81461066e5780637934c0be1461068e5780637b4f3cc5146106ae57600080fd5b80633cfd11841461051b5780633f4ba83a14610548578063452a93201461055d5780634f1ef2861461057d57806352d1902d1461059057806354fd4d50146105a557600080fd5b806319b815291161027157806319b81529146103ed5780631c3db16d1461041d5780631f5a0dd21461045a5780632d29a47b146104bb5780632e1daf2f146104db5780632fcb4f04146104fb57600080fd5b8062f5822c146102b85780630219da79146102da5780630b7414bc146103525780630c340a2414610372578063115d53761461039f5780631860592b146103bf575b600080fd5b3480156102c457600080fd5b506102d86102d3366004614be9565b6109f5565b005b3480156102e657600080fd5b506103256102f5366004614be9565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561035e57600080fd5b506102d861036d366004614cfc565b610a42565b34801561037e57600080fd5b50600054610392906001600160a01b031681565b6040516103499190614d5d565b3480156103ab57600080fd5b506102d86103ba366004614d71565b610b79565b3480156103cb57600080fd5b506103df6103da366004614d8a565b6110b0565b604051908152602001610349565b3480156103f957600080fd5b5061040d610408366004614d71565b61110a565b6040519015158152602001610349565b34801561042957600080fd5b5061043d610438366004614d71565b611203565b604080519384529115156020840152151590820152606001610349565b34801561046657600080fd5b5061047a610475366004614d71565b611304565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610349565b3480156104c757600080fd5b506102d86104d6366004614db6565b611363565b3480156104e757600080fd5b50600454610392906001600160a01b031681565b34801561050757600080fd5b506102d8610516366004614be9565b6115ef565b34801561052757600080fd5b5061053b610536366004614ded565b61163c565b6040516103499190614e2b565b34801561055457600080fd5b506102d86116a6565b34801561056957600080fd5b50600154610392906001600160a01b031681565b6102d861058b366004614ea8565b611729565b34801561059c57600080fd5b506103df611950565b3480156105b157600080fd5b506105d6604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516103499190614f47565b3480156105ef57600080fd5b506106036105fe366004614d71565b6119ae565b604051610349959493929190614f92565b34801561062057600080fd5b506103df61062f366004614d71565b611a0a565b34801561064057600080fd5b5060095461040d9060ff1681565b34801561065a57600080fd5b506102d8610669366004614fd1565b611b5f565b34801561067a57600080fd5b506102d8610689366004615029565b611c09565b34801561069a57600080fd5b506102d86106a9366004615045565b611c3b565b3480156106ba57600080fd5b506102d86106c93660046150eb565b611cba565b3480156106da57600080fd5b506102d86106e93660046151cc565b611d92565b3480156106fa57600080fd5b506102d8611e4f565b34801561070f57600080fd5b506102d861071e36600461521e565b611eef565b34801561072f57600080fd5b5061074361073e36600461528c565b6120cc565b60405161034991906152f3565b34801561075c57600080fd5b506102d861076b366004614d71565b612258565b34801561077c57600080fd5b506102d861078b366004615398565b6123bc565b34801561079c57600080fd5b506103926107ab366004614d71565b6126f4565b3480156107bc57600080fd5b506107d06107cb366004614d71565b61271e565b60408051928352602083019190915201610349565b3480156107f157600080fd5b506102d8610800366004614be9565b6127ca565b6103df610813366004615458565b612817565b34801561082457600080fd5b506102d8610833366004614be9565b61284f565b6102d8610846366004615488565b61289c565b34801561085757600080fd5b506103df610866366004614d71565b612d70565b34801561087757600080fd5b50600354610392906001600160a01b031681565b34801561089757600080fd5b506102d86108a6366004614be9565b612dd8565b3480156108b757600080fd5b506102d86108c636600461528c565b612e81565b3480156108d757600080fd5b506006546103df565b3480156108ec57600080fd5b506103df6108fb366004615509565b613196565b34801561090c57600080fd5b506102d861091b366004614be9565b6131e3565b34801561092c57600080fd5b506102d8613230565b34801561094157600080fd5b506103df610950366004615554565b6132e1565b34801561096157600080fd5b506103df6109703660046155ba565b6133c7565b34801561098157600080fd5b506102d86109903660046155ee565b613413565b3480156109a157600080fd5b50600254610392906001600160a01b031681565b3480156109c157600080fd5b506103df6109d0366004614d71565b613453565b3480156109e157600080fd5b5061040d6109f0366004615029565b613482565b6000546001600160a01b03163314610a205760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a6d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b73578115610b0c57828181518110610a9157610a9161563f565b602002602001015160001480610ac457506006548351849083908110610ab957610ab961563f565b602002602001015110155b15610ae257604051633d58a98960e11b815260040160405180910390fd5b610b0784848381518110610af857610af861563f565b602002602001015160016134ca565b610b6b565b6001838281518110610b2057610b2061563f565b602002602001015103610b46576040516356d111fd60e11b815260040160405180910390fd5b610b6b84848381518110610b5c57610b5c61563f565b602002602001015160006134ca565b600101610a70565b50505050565b600060078281548110610b8e57610b8e61563f565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610bc157610bc161563f565b6000918252602082206003850154600c909202019250610be39060019061566b565b90506000836003018281548110610bfc57610bfc61563f565b600091825260208220600b909102019150600185015460ff166004811115610c2657610c26614f5a565b03610d015781158015610c7557506001840154600684019060ff166004811115610c5257610c52614f5a565b60048110610c6257610c6261563f565b01546002850154610c73904261566b565b105b15610c9357604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610cbb576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610cd2576002610cd5565b60015b60018086018054909160ff1990911690836004811115610cf757610cf7614f5a565b0217905550611062565b60018085015460ff166004811115610d1b57610d1b614f5a565b03610e2b576001840154600684019060ff166004811115610d3e57610d3e614f5a565b60048110610d4e57610d4e61563f565b01546002850154610d5f904261566b565b108015610df657506006816000015481548110610d7e57610d7e61563f565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061567e565b155b15610e1457604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610cf7565b6002600185015460ff166004811115610e4657610e46614f5a565b03610f94576001840154600684019060ff166004811115610e6957610e69614f5a565b60048110610e7957610e7961563f565b01546002850154610e8a904261566b565b108015610f2157506006816000015481548110610ea957610ea961563f565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f919061567e565b155b15610f3f57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611062565b6003600185015460ff166004811115610faf57610faf614f5a565b03611029576001840154600684019060ff166004811115610fd257610fd2614f5a565b60048110610fe257610fe261563f565b01546002850154610ff3904261566b565b101561101257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610cf7565b6004600185015460ff16600481111561104457611044614f5a565b03611062576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110a19160ff169061569b565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b0316906110ed90600160481b900460ff16600a61578d565b6110f7908461579c565b61110191906157c9565b90505b92915050565b600080600783815481106111205761112061563f565b60009182526020822060036004909202019081018054919350906111469060019061566b565b815481106111565761115661563f565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061118b5761118b61563f565b90600052602060002090600c020190508060050154826003015410156111b657506000949350505050565b80546005805490916001600160601b03169081106111d6576111d661563f565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061121c5761121c61563f565b60009182526020822060036004909202019081018054919350906112429060019061566b565b815481106112525761125261563f565b90600052602060002090600b020190506000600682600001548154811061127b5761127b61563f565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906157dd565b9199909850909650945050505050565b6005818154811061131457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561138757604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061139d5761139d61563f565b600091825260209091206004918202019150600182015460ff1660048111156113c8576113c8614f5a565b146113e657604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106113fb576113fb61563f565b6000918252602082206004600b9092020190810154909350915061141f8483615815565b60058401546006850154600286015492935090916000906114419083906157c9565b905060008660010154905060008060068960000154815481106114665761146661563f565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190615828565b9150508060000361150257838611156114fd578395505b611522565b61150d84600261579c565b8611156115225761151f84600261579c565b95505b60048801869055865b868110156115ce57848110156115845761157d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613552565b95506115c6565b6115c66040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a23565b60010161152b565b50848860050154146115e257600588018590555b5050505050505050505050565b6000546001600160a01b0316331461161a5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611644614b29565b6005826001600160601b0316815481106116605761166061563f565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116116875750505050509050919050565b6000546001600160a01b031633146116d15760405163c383977560e01b815260040160405180910390fd5b60095460ff166116f45760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61173282613f5b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117b057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a4600080516020615a4d8339815191525490565b6001600160a01b031614155b156117ce5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611828575060408051601f3d908101601f1916820190925261182591810190615828565b60015b6118505781604051630c76093760e01b81526004016118479190614d5d565b60405180910390fd5b600080516020615a4d833981519152811461188157604051632a87526960e21b815260048101829052602401611847565b600080516020615a4d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561194a576000836001600160a01b0316836040516118e89190615841565b600060405180830381855af49150503d8060008114611923576040519150601f19603f3d011682016040523d82523d6000602084013e611928565b606091505b5050905080610b73576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461199b5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615a4d83398151915290565b600781815481106119be57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611a2057611a2061563f565b6000918252602082206003600490920201908101805491935090611a469060019061566b565b81548110611a5657611a5661563f565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a8b57611a8b61563f565b90600052602060002090600c020190508060050154826003015410611b2a5782546001600160601b031660001901611acc576001600160ff1b039350611b57565b6003820154611adc90600261579c565b611ae7906001615815565b81546005805490916001600160601b0316908110611b0757611b0761563f565b90600052602060002090600c020160040154611b23919061579c565b9350611b57565b6003820154611b3a90600261579c565b611b45906001615815565b8160040154611b54919061579c565b93505b505050919050565b6000546001600160a01b03163314611b8a5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611ba59190615841565b60006040518083038185875af1925050503d8060008114611be2576040519150601f19603f3d011682016040523d82523d6000602084013e611be7565b606091505b5050905080610b73576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611c2d57604051636f1dac1d60e01b815260040160405180910390fd5b61194a338383600080613f89565b6000546001600160a01b03163314611c665760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b60016000611cc6614144565b8054909150600160401b900460ff1680611ced575080546001600160401b03808416911610155b15611d0a5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611d3d8c8c8c8c8c8c8c8c8c8c614168565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611dbd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e7557506000546001600160a01b03163314155b15611e9357604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611eb757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611f1a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611f3857611f3861563f565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f9a575080546005805488926001600160601b0316908110611f8657611f8661563f565b90600052602060002090600c020160020154115b15611fb857604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561203357866005836001018381548110611fdf57611fdf61563f565b906000526020600020015481548110611ffa57611ffa61563f565b90600052602060002090600c020160020154101561202b57604051639717078960e01b815260040160405180910390fd5b600101611fbb565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120769060068301908490614b47565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516120ba9695949392919061585d565b60405180910390a25050505050505050565b61213260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106121455761214561563f565b906000526020600020906004020160030182815481106121675761216761563f565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561221657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121f8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061226d5761226d61563f565b600091825260209091206004918202019150600182015460ff16600481111561229857612298614f5a565b146122b657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156122e15760405163c977f8d360e01b815260040160405180910390fd5b60006122ec83611203565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123e75760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106124045761240461563f565b90600052602060002090600c020160020154111561243557604051639717078960e01b815260040160405180910390fd5b80516000036124575760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661247e57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612540578381815181106124d1576124d161563f565b602002602001015160001480612504575060065484518590839081106124f9576124f961563f565b602002602001015110155b1561252257604051633d58a98960e11b815260040160405180910390fd5b61253883858381518110610af857610af861563f565b6001016124b6565b5060016000908152600a8201602052604090205460ff16612574576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125ac916001840191614b85565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125ef9060068301908790614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612621918691899101615890565b600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061266f5761266f61563f565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906126df908e908e908e908e908e908e908d906158a9565b60405180910390a35050505050505050505050565b6006818154811061270457600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106127365761273661563f565b6000918252602090912060049091020190506003600182015460ff16600481111561276357612763614f5a565b036127bb576002810154815460058054929550916001600160601b039091169081106127915761279161563f565b600091825260209091206009600c90920201015460028201546127b49190615815565b91506127c4565b60009250600091505b50915091565b6000546001600160a01b031633146127f55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612822826133c7565b34101561284257604051630e3360f160e21b815260040160405180910390fd5b6111018383600034614488565b6000546001600160a01b0316331461287a5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6128a583611a0a565b3410156128c557604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128da576128da61563f565b6000918252602090912060049091020190506003600182015460ff16600481111561290757612907614f5a565b14612925576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061293b9060019061566b565b8154811061294b5761294b61563f565b90600052602060002090600b0201905060068160000154815481106129725761297261563f565b6000918252602090912001546001600160a01b031633146129a65760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129e9576129e961563f565b90600052602060002090600c020160050154846003015410612af2576005836001600160601b031681548110612a2157612a2161563f565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a5457612a5461563f565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a8057600191505b84546001600160601b03848116911614612af257845460038601546001600160601b0390911690612ab39060019061566b565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b3557612b3561563f565b90600052602060002090600c02019050806004015434612b5591906157c9565b826003018190555061271081600301548260020154612b74919061579c565b612b7e91906157c9565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612bb59161566b565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bf357600080fd5b505af1158015612c07573d6000803e3d6000fd5b505086548454149150612ced90505784546003870154612c299060019061566b565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c7757612c7761563f565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612cba918d918d918d9190600401615928565b600060405180830381600087803b158015612cd457600080fd5b505af1158015612ce8573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d5d919061569b565b60405180910390a2505050505050505050565b60008060078381548110612d8657612d8661563f565b906000526020600020906004020190508060030160018260030180549050612dae919061566b565b81548110612dbe57612dbe61563f565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e035760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e9657612e9661563f565b90600052602060002090600402019050600060018260030180549050612ebc919061566b565b90506000826003018281548110612ed557612ed561563f565b600091825260208220600b909102019150600184015460ff166004811115612eff57612eff614f5a565b14612f1d57604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f3657612f3661563f565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f6b575060038401546006850154105b156131735760006001600160a01b03841663d2b8035a8a84612f8c81615958565b9550612f989087615815565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fff9190615971565b90506001600160a01b0381166130155750612f55565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261304b92869290910161598e565b600060405180830381600087803b15801561306557600080fd5b505af1158015613079573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130c6918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361316d5760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561315457600080fd5b505af1158015613168573d6000803e3d6000fd5b505050505b50612f55565b8084600a0160008282546131879190615815565b90915550505050505050505050565b60006131db826103da86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133c792505050565b949350505050565b6000546001600160a01b0316331461320e5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003600061323c614144565b8054909150600160401b900460ff1680613263575080546001600160401b03808416911610155b156132805760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03821660009081526008602052604081205460ff1661331a5760405163e51cf7bf60e01b815260040160405180910390fd5b613325858585613196565b82101561334557604051630e3360f160e21b815260040160405180910390fd5b61335a6001600160a01b03841633308561476f565b613377576040516312171d8360e31b815260040160405180910390fd5b6133bb8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506144889050565b90505b95945050505050565b60008060006133d58461484b565b5091509150806005836001600160601b0316815481106133f7576133f761563f565b90600052602060002090600c0201600401546131db919061579c565b6004546001600160a01b0316331461343e57604051639d6cab9960e01b815260040160405180910390fd5b61344c848484846001613f89565b5050505050565b6000600782815481106134685761346861563f565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134a0576134a061563f565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134e7576134e761563f565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061356c5761356c61563f565b906000526020600020906004020190506000816003018460200151815481106135975761359761563f565b90600052602060002090600b02019050600060068260000154815481106135c0576135c061563f565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061366a9190615828565b905061271081111561367b57506127105b600061271061368a838261566b565b8560010154613699919061579c565b6136a391906157c9565b9050808760c0018181516136b79190615815565b90525060e08701516006850180546000929081106136d7576136d761563f565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161371891859187910161598e565b600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061377b91859187910161598e565b600060405180830381600087803b15801561379557600080fd5b505af11580156137a9573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137e9876159a7565b60098b015460405161380b9392916000916001600160a01b03909116906159c3565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613896919061567e565b6138fc576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138c991859101614d5d565b600060405180830381600087803b1580156138e357600080fd5b505af11580156138f7573d6000803e3d6000fd5b505050505b6001886060015161390d919061566b565b8860e0015114801561392157506040880151155b15613a125760098501546001600160a01b031661396a576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613991565b6000546002860154600987015461398f926001600160a01b03918216929116906148d2565b505b60005460c08901516002546139b4926001600160a01b03918216929116906148d2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a0993909290916001600160a01b03909116906159e7565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a3c57613a3c61563f565b90600052602060002090600402019050600081600301836020015181548110613a6757613a6761563f565b90600052602060002090600b0201905060006006826000015481548110613a9057613a9061563f565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613acf91615a06565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b539190615828565b9050612710811115613b6457506127105b60008360060186606001518760e00151613b7e9190615a06565b81548110613b8e57613b8e61563f565b600091825260208220015460018601546001600160a01b03909116925061271090613bba90859061579c565b613bc491906157c9565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613bf691869186910161598e565b600060405180830381600087803b158015613c1057600080fd5b505af1158015613c24573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c5791869101614d5d565b602060405180830381865afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c98919061567e565b613cb557600254613cb3906001600160a01b031683836148d2565b505b60006127108489604001518a60c00151613ccf91906157c9565b613cd9919061579c565b613ce391906157c9565b905080866008016000828254613cf99190615815565b925050819055506000612710858a604001518960020154613d1a91906157c9565b613d24919061579c565b613d2e91906157c9565b905080876007016000828254613d449190615815565b9091555050600254613d60906001600160a01b031685846148d2565b5060098701546001600160a01b0316613d9e576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613db9565b6009870154613db7906001600160a01b031685836148d2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e09928c928a928a92909116906159c3565b60405180910390a4600189606001516002613e24919061579c565b613e2e919061566b565b8960e0015103613f5057600087600801548a60c00151613e4e919061566b565b9050600088600701548960020154613e66919061566b565b905081151580613e7557508015155b156115e2578115613e9f57600054600254613e9d916001600160a01b039182169116846148d2565b505b8015613f065760098901546001600160a01b0316613ee557600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f06565b60005460098a0154613f04916001600160a01b039182169116836148d2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126df91879187916001600160a01b03909116906159e7565b505050505050505050565b6000546001600160a01b03163314613f865760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fac57506005546001600160601b03861610155b15613fc457613fbc82600461499f565b5060006133be565b8315801590613fff57506005856001600160601b031681548110613fea57613fea61563f565b90600052602060002090600c02016002015484105b1561400f57613fbc82600561499f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a69190615a1a565b9194509250905060008160088111156140c1576140c1614f5a565b146140dc576140d0858261499f565b600093505050506133be565b8215614109576002546140fa906001600160a01b03168a308661476f565b614109576140d085600161499f565b811561413557600254614126906001600160a01b03168a846148d2565b614135576140d085600261499f565b50600198975050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614170614ae8565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261426292879101615890565b600060405180830381600087803b15801561427c57600080fd5b505af1158015614290573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516142fe916001840191602090910190614b85565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561434d9060068301908690614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161438091600191889101615890565b600060405180830381600087803b15801561439a57600080fd5b505af11580156143ae573d6000803e3d6000fd5b5060009250600191506143be9050565b6040519080825280602002602001820160405280156143e7578160200160208202803683370190505b5090506001816000815181106143ff576143ff61563f565b60209081029190910181019190915282548751918801516040808a015160608b015191516001600160601b03909416946001947f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee694614465948f9491928e908b906158a9565b60405180910390a361447a60018060016134ca565b505050505050505050505050565b60008060006144968661484b565b92505091506005826001600160601b0316815481106144b7576144b761563f565b60009182526020808320848452600a600c90930201919091019052604090205460ff166144f75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106145825761458261563f565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106145b8576145b861563f565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614603576145fe8a84600401546110b0565b614609565b82600401545b9050614615818a6157c9565b6003808401919091558683558301546002840154612710916146369161579c565b61464091906157c9565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156146b357600080fd5b505af11580156146c7573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147019493929190615928565b600060405180830381600087803b15801561471b57600080fd5b505af115801561472f573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516147d49190615841565b6000604051808303816000865af19150503d8060008114614811576040519150601f19603f3d011682016040523d82523d6000602084013e614816565b606091505b5091509150818015614840575080511580614840575080806020019051810190614840919061567e565b979650505050505050565b600080600060408451106148c0575050506020810151604082015160608301516001600160601b038316158061488c57506005546001600160601b03841610155b1561489657600192505b816000036148a357600391505b8015806148b257506006548110155b156148bb575060015b6148cb565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016148f492919061598e565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516149299190615841565b6000604051808303816000865af19150503d8060008114614966576040519150601f19603f3d011682016040523d82523d6000602084013e61496b565b606091505b5091509150818015614995575080511580614995575080806020019051810190614995919061567e565b9695505050505050565b60018260018111156149b3576149b3614f5a565b036149bc575050565b60018160088111156149d0576149d0614f5a565b036149ee57604051630f323ed960e11b815260040160405180910390fd5b6002816008811115614a0257614a02614f5a565b03614a205760405163e45e13a360e01b815260040160405180910390fd5b6003816008811115614a3457614a34614f5a565b03614a5257604051631d91d0ed60e31b815260040160405180910390fd5b6004816008811115614a6657614a66614f5a565b03614a84576040516321f1774b60e11b815260040160405180910390fd5b6005816008811115614a9857614a98614f5a565b03614ab657604051630caac6b360e31b815260040160405180910390fd5b6008816008811115614aca57614aca614f5a565b0361194c57604051633e57962f60e21b815260040160405180910390fd5b614af0614b0f565b614b0d57604051631afcd79f60e31b815260040160405180910390fd5b565b6000614b19614144565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614b75579160200282015b82811115614b75578251825591602001919060010190614b5a565b50614b81929150614bbf565b5090565b828054828255906000526020600020908101928215614b755791602002820182811115614b75578251825591602001919060010190614b5a565b5b80821115614b815760008155600101614bc0565b6001600160a01b0381168114613f8657600080fd5b600060208284031215614bfb57600080fd5b8135614c0681614bd4565b9392505050565b80356001600160601b0381168114614c2457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614c6757614c67614c29565b604052919050565b600082601f830112614c8057600080fd5b813560206001600160401b03821115614c9b57614c9b614c29565b8160051b614caa828201614c3f565b9283528481018201928281019087851115614cc457600080fd5b83870192505b8483101561484057823582529183019190830190614cca565b8015158114613f8657600080fd5b8035614c2481614ce3565b600080600060608486031215614d1157600080fd5b614d1a84614c0d565b925060208401356001600160401b03811115614d3557600080fd5b614d4186828701614c6f565b9250506040840135614d5281614ce3565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614d8357600080fd5b5035919050565b60008060408385031215614d9d57600080fd5b8235614da881614bd4565b946020939093013593505050565b600080600060608486031215614dcb57600080fd5b505081359360208301359350604090920135919050565b8035614c2481614bd4565b600060208284031215614dff57600080fd5b61110182614c0d565b8060005b6004811015610b73578151845260209384019390910190600101614e0c565b608081016111048284614e08565b600082601f830112614e4a57600080fd5b81356001600160401b03811115614e6357614e63614c29565b614e76601f8201601f1916602001614c3f565b818152846020838601011115614e8b57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ebb57600080fd5b8235614ec681614bd4565b915060208301356001600160401b03811115614ee157600080fd5b614eed85828601614e39565b9150509250929050565b60005b83811015614f12578181015183820152602001614efa565b50506000910152565b60008151808452614f33816020860160208601614ef7565b601f01601f19169290920160200192915050565b6020815260006111016020830184614f1b565b634e487b7160e01b600052602160045260246000fd5b60058110614f8e57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614fbe6040830186614f70565b9215156060820152608001529392505050565b600080600060608486031215614fe657600080fd5b8335614ff181614bd4565b92506020840135915060408401356001600160401b0381111561501357600080fd5b61501f86828701614e39565b9150509250925092565b6000806040838503121561503c57600080fd5b614da883614c0d565b6000806040838503121561505857600080fd5b823561506381614bd4565b9150602083013561507381614ce3565b809150509250929050565b600082601f83011261508f57600080fd5b604051608081018181106001600160401b03821117156150b1576150b1614c29565b6040528060808401858111156150c657600080fd5b845b818110156150e05780358352602092830192016150c8565b509195945050505050565b6000806000806000806000806000806102008b8d03121561510b57600080fd5b8a3561511681614bd4565b995060208b013561512681614bd4565b985060408b013561513681614bd4565b975060608b013561514681614bd4565b965060808b013561515681614bd4565b955061516460a08c01614cf1565b94506151738c60c08d0161507e565b93506151838c6101408d0161507e565b92506101c08b01356001600160401b0381111561519f57600080fd5b6151ab8d828e01614e39565b9250506151bb6101e08c01614de2565b90509295989b9194979a5092959850565b6000806000606084860312156151e157600080fd5b83356151ec81614bd4565b925060208401356001600160401b038116811461520857600080fd5b9150604084013560ff81168114614d5257600080fd5b6000806000806000806000610140888a03121561523a57600080fd5b61524388614c0d565b9650602088013561525381614ce3565b955060408801359450606088013593506080880135925060a0880135915061527e8960c08a0161507e565b905092959891949750929550565b6000806040838503121561529f57600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156152e85781516001600160a01b0316875295820195908201906001016152c3565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261534e6101808501836152ae565b60e08601516101008681019190915286015161012080870191909152860151909250610140615387818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c0312156153b757600080fd5b6153c08a614c0d565b985060208a01356153d081614ce3565b975060408a0135965060608a0135955060808a0135945060a08a013593506153fb8b60c08c0161507e565b92506101408a01356001600160401b038082111561541857600080fd5b6154248d838e01614e39565b93506101608c013591508082111561543b57600080fd5b506154488c828d01614c6f565b9150509295985092959850929598565b6000806040838503121561546b57600080fd5b8235915060208301356001600160401b03811115614ee157600080fd5b60008060006060848603121561549d57600080fd5b833592506020840135915060408401356001600160401b0381111561501357600080fd5b60008083601f8401126154d357600080fd5b5081356001600160401b038111156154ea57600080fd5b60208301915083602082850101111561550257600080fd5b9250929050565b60008060006040848603121561551e57600080fd5b83356001600160401b0381111561553457600080fd5b615540868287016154c1565b9094509250506020840135614d5281614bd4565b60008060008060006080868803121561556c57600080fd5b8535945060208601356001600160401b0381111561558957600080fd5b615595888289016154c1565b90955093505060408601356155a981614bd4565b949793965091946060013592915050565b6000602082840312156155cc57600080fd5b81356001600160401b038111156155e257600080fd5b6131db84828501614e39565b6000806000806080858703121561560457600080fd5b843561560f81614bd4565b935061561d60208601614c0d565b925060408501359150606085013561563481614ce3565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561110457611104615655565b60006020828403121561569057600080fd5b8151614c0681614ce3565b602081016111048284614f70565b600181815b808511156156e45781600019048211156156ca576156ca615655565b808516156156d757918102915b93841c93908002906156ae565b509250929050565b6000826156fb57506001611104565b8161570857506000611104565b816001811461571e576002811461572857615744565b6001915050611104565b60ff84111561573957615739615655565b50506001821b611104565b5060208310610133831016604e8410600b8410161715615767575081810a611104565b61577183836156a9565b806000190482111561578557615785615655565b029392505050565b600061110160ff8416836156ec565b808202811582820484141761110457611104615655565b634e487b7160e01b600052601260045260246000fd5b6000826157d8576157d86157b3565b500490565b6000806000606084860312156157f257600080fd5b83519250602084015161580481614ce3565b6040850151909250614d5281614ce3565b8082018082111561110457611104615655565b60006020828403121561583a57600080fd5b5051919050565b60008251615853818460208701614ef7565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261484060a0830184614e08565b8281526040602082015260006131db6040830184614f1b565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526158dd60a0860188614e08565b610120850192909252845190819052610160840191602086019160005b81811015615916578351855293820193928201926001016158fa565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006159476080830185614f1b565b905082606083015295945050505050565b60006001820161596a5761596a615655565b5060010190565b60006020828403121561598357600080fd5b8151614c0681614bd4565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016159bc576159bc615655565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615a1557615a156157b3565b500690565b600080600060608486031215615a2f57600080fd5b8351925060208401519150604084015160098110614d5257600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209d3f5f848e5c977c06ce8a04a67787edb996e48a4f1a486ddef204a4e19f4a0664736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106102b35760003560e01c806382d0223711610170578063cf0c38f8116100cc578063ec918b6511610085578063ec918b6514610920578063f6506db414610935578063f7434ea914610955578063fbb519e714610975578063fbf405b014610995578063fc6f8f16146109b5578063fe524c39146109d557600080fd5b8063cf0c38f81461086b578063d07368bd1461088b578063d2b8035a146108ab578063d4d1d76a146108cb578063d98493f6146108e0578063e4c0aaf41461090057600080fd5b8063acdbf51d11610129578063acdbf51d14610790578063afe15cfb146107b0578063b0049637146107e5578063c13517e114610805578063c258bb1914610818578063c356990214610838578063c71f42531461084b57600080fd5b806382d02237146106ce5780638456cb59146106ee57806386541b24146107035780638a9bb02a146107235780638bb0487514610750578063a072b86c1461077057600080fd5b80633cfd11841161021f578063564a565d116101d8578063564a565d146105e357806359ec827e146106145780635c975abb14610634578063751accd01461064e5780637717a6e81461066e5780637934c0be1461068e5780637b4f3cc5146106ae57600080fd5b80633cfd11841461051b5780633f4ba83a14610548578063452a93201461055d5780634f1ef2861461057d57806352d1902d1461059057806354fd4d50146105a557600080fd5b806319b815291161027157806319b81529146103ed5780631c3db16d1461041d5780631f5a0dd21461045a5780632d29a47b146104bb5780632e1daf2f146104db5780632fcb4f04146104fb57600080fd5b8062f5822c146102b85780630219da79146102da5780630b7414bc146103525780630c340a2414610372578063115d53761461039f5780631860592b146103bf575b600080fd5b3480156102c457600080fd5b506102d86102d3366004614be9565b6109f5565b005b3480156102e657600080fd5b506103256102f5366004614be9565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561035e57600080fd5b506102d861036d366004614cfc565b610a42565b34801561037e57600080fd5b50600054610392906001600160a01b031681565b6040516103499190614d5d565b3480156103ab57600080fd5b506102d86103ba366004614d71565b610b79565b3480156103cb57600080fd5b506103df6103da366004614d8a565b6110b0565b604051908152602001610349565b3480156103f957600080fd5b5061040d610408366004614d71565b61110a565b6040519015158152602001610349565b34801561042957600080fd5b5061043d610438366004614d71565b611203565b604080519384529115156020840152151590820152606001610349565b34801561046657600080fd5b5061047a610475366004614d71565b611304565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610349565b3480156104c757600080fd5b506102d86104d6366004614db6565b611363565b3480156104e757600080fd5b50600454610392906001600160a01b031681565b34801561050757600080fd5b506102d8610516366004614be9565b6115ef565b34801561052757600080fd5b5061053b610536366004614ded565b61163c565b6040516103499190614e2b565b34801561055457600080fd5b506102d86116a6565b34801561056957600080fd5b50600154610392906001600160a01b031681565b6102d861058b366004614ea8565b611729565b34801561059c57600080fd5b506103df611950565b3480156105b157600080fd5b506105d6604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516103499190614f47565b3480156105ef57600080fd5b506106036105fe366004614d71565b6119ae565b604051610349959493929190614f92565b34801561062057600080fd5b506103df61062f366004614d71565b611a0a565b34801561064057600080fd5b5060095461040d9060ff1681565b34801561065a57600080fd5b506102d8610669366004614fd1565b611b5f565b34801561067a57600080fd5b506102d8610689366004615029565b611c09565b34801561069a57600080fd5b506102d86106a9366004615045565b611c3b565b3480156106ba57600080fd5b506102d86106c93660046150eb565b611cba565b3480156106da57600080fd5b506102d86106e93660046151cc565b611d92565b3480156106fa57600080fd5b506102d8611e4f565b34801561070f57600080fd5b506102d861071e36600461521e565b611eef565b34801561072f57600080fd5b5061074361073e36600461528c565b6120cc565b60405161034991906152f3565b34801561075c57600080fd5b506102d861076b366004614d71565b612258565b34801561077c57600080fd5b506102d861078b366004615398565b6123bc565b34801561079c57600080fd5b506103926107ab366004614d71565b6126f4565b3480156107bc57600080fd5b506107d06107cb366004614d71565b61271e565b60408051928352602083019190915201610349565b3480156107f157600080fd5b506102d8610800366004614be9565b6127ca565b6103df610813366004615458565b612817565b34801561082457600080fd5b506102d8610833366004614be9565b61284f565b6102d8610846366004615488565b61289c565b34801561085757600080fd5b506103df610866366004614d71565b612d70565b34801561087757600080fd5b50600354610392906001600160a01b031681565b34801561089757600080fd5b506102d86108a6366004614be9565b612dd8565b3480156108b757600080fd5b506102d86108c636600461528c565b612e81565b3480156108d757600080fd5b506006546103df565b3480156108ec57600080fd5b506103df6108fb366004615509565b613196565b34801561090c57600080fd5b506102d861091b366004614be9565b6131e3565b34801561092c57600080fd5b506102d8613230565b34801561094157600080fd5b506103df610950366004615554565b6132e1565b34801561096157600080fd5b506103df6109703660046155ba565b6133c7565b34801561098157600080fd5b506102d86109903660046155ee565b613413565b3480156109a157600080fd5b50600254610392906001600160a01b031681565b3480156109c157600080fd5b506103df6109d0366004614d71565b613453565b3480156109e157600080fd5b5061040d6109f0366004615029565b613482565b6000546001600160a01b03163314610a205760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a6d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b73578115610b0c57828181518110610a9157610a9161563f565b602002602001015160001480610ac457506006548351849083908110610ab957610ab961563f565b602002602001015110155b15610ae257604051633d58a98960e11b815260040160405180910390fd5b610b0784848381518110610af857610af861563f565b602002602001015160016134ca565b610b6b565b6001838281518110610b2057610b2061563f565b602002602001015103610b46576040516356d111fd60e11b815260040160405180910390fd5b610b6b84848381518110610b5c57610b5c61563f565b602002602001015160006134ca565b600101610a70565b50505050565b600060078281548110610b8e57610b8e61563f565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610bc157610bc161563f565b6000918252602082206003850154600c909202019250610be39060019061566b565b90506000836003018281548110610bfc57610bfc61563f565b600091825260208220600b909102019150600185015460ff166004811115610c2657610c26614f5a565b03610d015781158015610c7557506001840154600684019060ff166004811115610c5257610c52614f5a565b60048110610c6257610c6261563f565b01546002850154610c73904261566b565b105b15610c9357604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610cbb576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610cd2576002610cd5565b60015b60018086018054909160ff1990911690836004811115610cf757610cf7614f5a565b0217905550611062565b60018085015460ff166004811115610d1b57610d1b614f5a565b03610e2b576001840154600684019060ff166004811115610d3e57610d3e614f5a565b60048110610d4e57610d4e61563f565b01546002850154610d5f904261566b565b108015610df657506006816000015481548110610d7e57610d7e61563f565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061567e565b155b15610e1457604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610cf7565b6002600185015460ff166004811115610e4657610e46614f5a565b03610f94576001840154600684019060ff166004811115610e6957610e69614f5a565b60048110610e7957610e7961563f565b01546002850154610e8a904261566b565b108015610f2157506006816000015481548110610ea957610ea961563f565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f919061567e565b155b15610f3f57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611062565b6003600185015460ff166004811115610faf57610faf614f5a565b03611029576001840154600684019060ff166004811115610fd257610fd2614f5a565b60048110610fe257610fe261563f565b01546002850154610ff3904261566b565b101561101257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610cf7565b6004600185015460ff16600481111561104457611044614f5a565b03611062576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110a19160ff169061569b565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b0316906110ed90600160481b900460ff16600a61578d565b6110f7908461579c565b61110191906157c9565b90505b92915050565b600080600783815481106111205761112061563f565b60009182526020822060036004909202019081018054919350906111469060019061566b565b815481106111565761115661563f565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061118b5761118b61563f565b90600052602060002090600c020190508060050154826003015410156111b657506000949350505050565b80546005805490916001600160601b03169081106111d6576111d661563f565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061121c5761121c61563f565b60009182526020822060036004909202019081018054919350906112429060019061566b565b815481106112525761125261563f565b90600052602060002090600b020190506000600682600001548154811061127b5761127b61563f565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906157dd565b9199909850909650945050505050565b6005818154811061131457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561138757604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061139d5761139d61563f565b600091825260209091206004918202019150600182015460ff1660048111156113c8576113c8614f5a565b146113e657604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106113fb576113fb61563f565b6000918252602082206004600b9092020190810154909350915061141f8483615815565b60058401546006850154600286015492935090916000906114419083906157c9565b905060008660010154905060008060068960000154815481106114665761146661563f565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190615828565b9150508060000361150257838611156114fd578395505b611522565b61150d84600261579c565b8611156115225761151f84600261579c565b95505b60048801869055865b868110156115ce57848110156115845761157d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613552565b95506115c6565b6115c66040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a23565b60010161152b565b50848860050154146115e257600588018590555b5050505050505050505050565b6000546001600160a01b0316331461161a5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611644614b29565b6005826001600160601b0316815481106116605761166061563f565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116116875750505050509050919050565b6000546001600160a01b031633146116d15760405163c383977560e01b815260040160405180910390fd5b60095460ff166116f45760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61173282613f5b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117b057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a4600080516020615a4d8339815191525490565b6001600160a01b031614155b156117ce5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611828575060408051601f3d908101601f1916820190925261182591810190615828565b60015b6118505781604051630c76093760e01b81526004016118479190614d5d565b60405180910390fd5b600080516020615a4d833981519152811461188157604051632a87526960e21b815260048101829052602401611847565b600080516020615a4d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561194a576000836001600160a01b0316836040516118e89190615841565b600060405180830381855af49150503d8060008114611923576040519150601f19603f3d011682016040523d82523d6000602084013e611928565b606091505b5050905080610b73576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461199b5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615a4d83398151915290565b600781815481106119be57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611a2057611a2061563f565b6000918252602082206003600490920201908101805491935090611a469060019061566b565b81548110611a5657611a5661563f565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a8b57611a8b61563f565b90600052602060002090600c020190508060050154826003015410611b2a5782546001600160601b031660001901611acc576001600160ff1b039350611b57565b6003820154611adc90600261579c565b611ae7906001615815565b81546005805490916001600160601b0316908110611b0757611b0761563f565b90600052602060002090600c020160040154611b23919061579c565b9350611b57565b6003820154611b3a90600261579c565b611b45906001615815565b8160040154611b54919061579c565b93505b505050919050565b6000546001600160a01b03163314611b8a5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611ba59190615841565b60006040518083038185875af1925050503d8060008114611be2576040519150601f19603f3d011682016040523d82523d6000602084013e611be7565b606091505b5050905080610b73576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611c2d57604051636f1dac1d60e01b815260040160405180910390fd5b61194a338383600080613f89565b6000546001600160a01b03163314611c665760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b60016000611cc6614144565b8054909150600160401b900460ff1680611ced575080546001600160401b03808416911610155b15611d0a5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611d3d8c8c8c8c8c8c8c8c8c8c614168565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611dbd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e7557506000546001600160a01b03163314155b15611e9357604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611eb757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611f1a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611f3857611f3861563f565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f9a575080546005805488926001600160601b0316908110611f8657611f8661563f565b90600052602060002090600c020160020154115b15611fb857604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561203357866005836001018381548110611fdf57611fdf61563f565b906000526020600020015481548110611ffa57611ffa61563f565b90600052602060002090600c020160020154101561202b57604051639717078960e01b815260040160405180910390fd5b600101611fbb565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120769060068301908490614b47565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516120ba9695949392919061585d565b60405180910390a25050505050505050565b61213260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106121455761214561563f565b906000526020600020906004020160030182815481106121675761216761563f565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561221657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121f8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061226d5761226d61563f565b600091825260209091206004918202019150600182015460ff16600481111561229857612298614f5a565b146122b657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156122e15760405163c977f8d360e01b815260040160405180910390fd5b60006122ec83611203565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123e75760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106124045761240461563f565b90600052602060002090600c020160020154111561243557604051639717078960e01b815260040160405180910390fd5b80516000036124575760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661247e57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612540578381815181106124d1576124d161563f565b602002602001015160001480612504575060065484518590839081106124f9576124f961563f565b602002602001015110155b1561252257604051633d58a98960e11b815260040160405180910390fd5b61253883858381518110610af857610af861563f565b6001016124b6565b5060016000908152600a8201602052604090205460ff16612574576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125ac916001840191614b85565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125ef9060068301908790614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612621918691899101615890565b600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061266f5761266f61563f565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906126df908e908e908e908e908e908e908d906158a9565b60405180910390a35050505050505050505050565b6006818154811061270457600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106127365761273661563f565b6000918252602090912060049091020190506003600182015460ff16600481111561276357612763614f5a565b036127bb576002810154815460058054929550916001600160601b039091169081106127915761279161563f565b600091825260209091206009600c90920201015460028201546127b49190615815565b91506127c4565b60009250600091505b50915091565b6000546001600160a01b031633146127f55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612822826133c7565b34101561284257604051630e3360f160e21b815260040160405180910390fd5b6111018383600034614488565b6000546001600160a01b0316331461287a5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6128a583611a0a565b3410156128c557604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128da576128da61563f565b6000918252602090912060049091020190506003600182015460ff16600481111561290757612907614f5a565b14612925576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061293b9060019061566b565b8154811061294b5761294b61563f565b90600052602060002090600b0201905060068160000154815481106129725761297261563f565b6000918252602090912001546001600160a01b031633146129a65760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129e9576129e961563f565b90600052602060002090600c020160050154846003015410612af2576005836001600160601b031681548110612a2157612a2161563f565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a5457612a5461563f565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a8057600191505b84546001600160601b03848116911614612af257845460038601546001600160601b0390911690612ab39060019061566b565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b3557612b3561563f565b90600052602060002090600c02019050806004015434612b5591906157c9565b826003018190555061271081600301548260020154612b74919061579c565b612b7e91906157c9565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612bb59161566b565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bf357600080fd5b505af1158015612c07573d6000803e3d6000fd5b505086548454149150612ced90505784546003870154612c299060019061566b565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c7757612c7761563f565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612cba918d918d918d9190600401615928565b600060405180830381600087803b158015612cd457600080fd5b505af1158015612ce8573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d5d919061569b565b60405180910390a2505050505050505050565b60008060078381548110612d8657612d8661563f565b906000526020600020906004020190508060030160018260030180549050612dae919061566b565b81548110612dbe57612dbe61563f565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e035760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e9657612e9661563f565b90600052602060002090600402019050600060018260030180549050612ebc919061566b565b90506000826003018281548110612ed557612ed561563f565b600091825260208220600b909102019150600184015460ff166004811115612eff57612eff614f5a565b14612f1d57604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f3657612f3661563f565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f6b575060038401546006850154105b156131735760006001600160a01b03841663d2b8035a8a84612f8c81615958565b9550612f989087615815565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fff9190615971565b90506001600160a01b0381166130155750612f55565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261304b92869290910161598e565b600060405180830381600087803b15801561306557600080fd5b505af1158015613079573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130c6918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361316d5760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561315457600080fd5b505af1158015613168573d6000803e3d6000fd5b505050505b50612f55565b8084600a0160008282546131879190615815565b90915550505050505050505050565b60006131db826103da86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133c792505050565b949350505050565b6000546001600160a01b0316331461320e5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003600061323c614144565b8054909150600160401b900460ff1680613263575080546001600160401b03808416911610155b156132805760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03821660009081526008602052604081205460ff1661331a5760405163e51cf7bf60e01b815260040160405180910390fd5b613325858585613196565b82101561334557604051630e3360f160e21b815260040160405180910390fd5b61335a6001600160a01b03841633308561476f565b613377576040516312171d8360e31b815260040160405180910390fd5b6133bb8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506144889050565b90505b95945050505050565b60008060006133d58461484b565b5091509150806005836001600160601b0316815481106133f7576133f761563f565b90600052602060002090600c0201600401546131db919061579c565b6004546001600160a01b0316331461343e57604051639d6cab9960e01b815260040160405180910390fd5b61344c848484846001613f89565b5050505050565b6000600782815481106134685761346861563f565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134a0576134a061563f565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134e7576134e761563f565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061356c5761356c61563f565b906000526020600020906004020190506000816003018460200151815481106135975761359761563f565b90600052602060002090600b02019050600060068260000154815481106135c0576135c061563f565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061366a9190615828565b905061271081111561367b57506127105b600061271061368a838261566b565b8560010154613699919061579c565b6136a391906157c9565b9050808760c0018181516136b79190615815565b90525060e08701516006850180546000929081106136d7576136d761563f565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161371891859187910161598e565b600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061377b91859187910161598e565b600060405180830381600087803b15801561379557600080fd5b505af11580156137a9573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137e9876159a7565b60098b015460405161380b9392916000916001600160a01b03909116906159c3565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613896919061567e565b6138fc576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138c991859101614d5d565b600060405180830381600087803b1580156138e357600080fd5b505af11580156138f7573d6000803e3d6000fd5b505050505b6001886060015161390d919061566b565b8860e0015114801561392157506040880151155b15613a125760098501546001600160a01b031661396a576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613991565b6000546002860154600987015461398f926001600160a01b03918216929116906148d2565b505b60005460c08901516002546139b4926001600160a01b03918216929116906148d2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a0993909290916001600160a01b03909116906159e7565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a3c57613a3c61563f565b90600052602060002090600402019050600081600301836020015181548110613a6757613a6761563f565b90600052602060002090600b0201905060006006826000015481548110613a9057613a9061563f565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613acf91615a06565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b539190615828565b9050612710811115613b6457506127105b60008360060186606001518760e00151613b7e9190615a06565b81548110613b8e57613b8e61563f565b600091825260208220015460018601546001600160a01b03909116925061271090613bba90859061579c565b613bc491906157c9565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613bf691869186910161598e565b600060405180830381600087803b158015613c1057600080fd5b505af1158015613c24573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c5791869101614d5d565b602060405180830381865afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c98919061567e565b613cb557600254613cb3906001600160a01b031683836148d2565b505b60006127108489604001518a60c00151613ccf91906157c9565b613cd9919061579c565b613ce391906157c9565b905080866008016000828254613cf99190615815565b925050819055506000612710858a604001518960020154613d1a91906157c9565b613d24919061579c565b613d2e91906157c9565b905080876007016000828254613d449190615815565b9091555050600254613d60906001600160a01b031685846148d2565b5060098701546001600160a01b0316613d9e576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613db9565b6009870154613db7906001600160a01b031685836148d2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e09928c928a928a92909116906159c3565b60405180910390a4600189606001516002613e24919061579c565b613e2e919061566b565b8960e0015103613f5057600087600801548a60c00151613e4e919061566b565b9050600088600701548960020154613e66919061566b565b905081151580613e7557508015155b156115e2578115613e9f57600054600254613e9d916001600160a01b039182169116846148d2565b505b8015613f065760098901546001600160a01b0316613ee557600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f06565b60005460098a0154613f04916001600160a01b039182169116836148d2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126df91879187916001600160a01b03909116906159e7565b505050505050505050565b6000546001600160a01b03163314613f865760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fac57506005546001600160601b03861610155b15613fc457613fbc82600461499f565b5060006133be565b8315801590613fff57506005856001600160601b031681548110613fea57613fea61563f565b90600052602060002090600c02016002015484105b1561400f57613fbc82600561499f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a69190615a1a565b9194509250905060008160088111156140c1576140c1614f5a565b146140dc576140d0858261499f565b600093505050506133be565b8215614109576002546140fa906001600160a01b03168a308661476f565b614109576140d085600161499f565b811561413557600254614126906001600160a01b03168a846148d2565b614135576140d085600261499f565b50600198975050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614170614ae8565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261426292879101615890565b600060405180830381600087803b15801561427c57600080fd5b505af1158015614290573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516142fe916001840191602090910190614b85565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561434d9060068301908690614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161438091600191889101615890565b600060405180830381600087803b15801561439a57600080fd5b505af11580156143ae573d6000803e3d6000fd5b5060009250600191506143be9050565b6040519080825280602002602001820160405280156143e7578160200160208202803683370190505b5090506001816000815181106143ff576143ff61563f565b60209081029190910181019190915282548751918801516040808a015160608b015191516001600160601b03909416946001947f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee694614465948f9491928e908b906158a9565b60405180910390a361447a60018060016134ca565b505050505050505050505050565b60008060006144968661484b565b92505091506005826001600160601b0316815481106144b7576144b761563f565b60009182526020808320848452600a600c90930201919091019052604090205460ff166144f75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106145825761458261563f565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106145b8576145b861563f565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614603576145fe8a84600401546110b0565b614609565b82600401545b9050614615818a6157c9565b6003808401919091558683558301546002840154612710916146369161579c565b61464091906157c9565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156146b357600080fd5b505af11580156146c7573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147019493929190615928565b600060405180830381600087803b15801561471b57600080fd5b505af115801561472f573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516147d49190615841565b6000604051808303816000865af19150503d8060008114614811576040519150601f19603f3d011682016040523d82523d6000602084013e614816565b606091505b5091509150818015614840575080511580614840575080806020019051810190614840919061567e565b979650505050505050565b600080600060408451106148c0575050506020810151604082015160608301516001600160601b038316158061488c57506005546001600160601b03841610155b1561489657600192505b816000036148a357600391505b8015806148b257506006548110155b156148bb575060015b6148cb565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016148f492919061598e565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516149299190615841565b6000604051808303816000865af19150503d8060008114614966576040519150601f19603f3d011682016040523d82523d6000602084013e61496b565b606091505b5091509150818015614995575080511580614995575080806020019051810190614995919061567e565b9695505050505050565b60018260018111156149b3576149b3614f5a565b036149bc575050565b60018160088111156149d0576149d0614f5a565b036149ee57604051630f323ed960e11b815260040160405180910390fd5b6002816008811115614a0257614a02614f5a565b03614a205760405163e45e13a360e01b815260040160405180910390fd5b6003816008811115614a3457614a34614f5a565b03614a5257604051631d91d0ed60e31b815260040160405180910390fd5b6004816008811115614a6657614a66614f5a565b03614a84576040516321f1774b60e11b815260040160405180910390fd5b6005816008811115614a9857614a98614f5a565b03614ab657604051630caac6b360e31b815260040160405180910390fd5b6008816008811115614aca57614aca614f5a565b0361194c57604051633e57962f60e21b815260040160405180910390fd5b614af0614b0f565b614b0d57604051631afcd79f60e31b815260040160405180910390fd5b565b6000614b19614144565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614b75579160200282015b82811115614b75578251825591602001919060010190614b5a565b50614b81929150614bbf565b5090565b828054828255906000526020600020908101928215614b755791602002820182811115614b75578251825591602001919060010190614b5a565b5b80821115614b815760008155600101614bc0565b6001600160a01b0381168114613f8657600080fd5b600060208284031215614bfb57600080fd5b8135614c0681614bd4565b9392505050565b80356001600160601b0381168114614c2457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614c6757614c67614c29565b604052919050565b600082601f830112614c8057600080fd5b813560206001600160401b03821115614c9b57614c9b614c29565b8160051b614caa828201614c3f565b9283528481018201928281019087851115614cc457600080fd5b83870192505b8483101561484057823582529183019190830190614cca565b8015158114613f8657600080fd5b8035614c2481614ce3565b600080600060608486031215614d1157600080fd5b614d1a84614c0d565b925060208401356001600160401b03811115614d3557600080fd5b614d4186828701614c6f565b9250506040840135614d5281614ce3565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614d8357600080fd5b5035919050565b60008060408385031215614d9d57600080fd5b8235614da881614bd4565b946020939093013593505050565b600080600060608486031215614dcb57600080fd5b505081359360208301359350604090920135919050565b8035614c2481614bd4565b600060208284031215614dff57600080fd5b61110182614c0d565b8060005b6004811015610b73578151845260209384019390910190600101614e0c565b608081016111048284614e08565b600082601f830112614e4a57600080fd5b81356001600160401b03811115614e6357614e63614c29565b614e76601f8201601f1916602001614c3f565b818152846020838601011115614e8b57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ebb57600080fd5b8235614ec681614bd4565b915060208301356001600160401b03811115614ee157600080fd5b614eed85828601614e39565b9150509250929050565b60005b83811015614f12578181015183820152602001614efa565b50506000910152565b60008151808452614f33816020860160208601614ef7565b601f01601f19169290920160200192915050565b6020815260006111016020830184614f1b565b634e487b7160e01b600052602160045260246000fd5b60058110614f8e57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614fbe6040830186614f70565b9215156060820152608001529392505050565b600080600060608486031215614fe657600080fd5b8335614ff181614bd4565b92506020840135915060408401356001600160401b0381111561501357600080fd5b61501f86828701614e39565b9150509250925092565b6000806040838503121561503c57600080fd5b614da883614c0d565b6000806040838503121561505857600080fd5b823561506381614bd4565b9150602083013561507381614ce3565b809150509250929050565b600082601f83011261508f57600080fd5b604051608081018181106001600160401b03821117156150b1576150b1614c29565b6040528060808401858111156150c657600080fd5b845b818110156150e05780358352602092830192016150c8565b509195945050505050565b6000806000806000806000806000806102008b8d03121561510b57600080fd5b8a3561511681614bd4565b995060208b013561512681614bd4565b985060408b013561513681614bd4565b975060608b013561514681614bd4565b965060808b013561515681614bd4565b955061516460a08c01614cf1565b94506151738c60c08d0161507e565b93506151838c6101408d0161507e565b92506101c08b01356001600160401b0381111561519f57600080fd5b6151ab8d828e01614e39565b9250506151bb6101e08c01614de2565b90509295989b9194979a5092959850565b6000806000606084860312156151e157600080fd5b83356151ec81614bd4565b925060208401356001600160401b038116811461520857600080fd5b9150604084013560ff81168114614d5257600080fd5b6000806000806000806000610140888a03121561523a57600080fd5b61524388614c0d565b9650602088013561525381614ce3565b955060408801359450606088013593506080880135925060a0880135915061527e8960c08a0161507e565b905092959891949750929550565b6000806040838503121561529f57600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156152e85781516001600160a01b0316875295820195908201906001016152c3565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261534e6101808501836152ae565b60e08601516101008681019190915286015161012080870191909152860151909250610140615387818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c0312156153b757600080fd5b6153c08a614c0d565b985060208a01356153d081614ce3565b975060408a0135965060608a0135955060808a0135945060a08a013593506153fb8b60c08c0161507e565b92506101408a01356001600160401b038082111561541857600080fd5b6154248d838e01614e39565b93506101608c013591508082111561543b57600080fd5b506154488c828d01614c6f565b9150509295985092959850929598565b6000806040838503121561546b57600080fd5b8235915060208301356001600160401b03811115614ee157600080fd5b60008060006060848603121561549d57600080fd5b833592506020840135915060408401356001600160401b0381111561501357600080fd5b60008083601f8401126154d357600080fd5b5081356001600160401b038111156154ea57600080fd5b60208301915083602082850101111561550257600080fd5b9250929050565b60008060006040848603121561551e57600080fd5b83356001600160401b0381111561553457600080fd5b615540868287016154c1565b9094509250506020840135614d5281614bd4565b60008060008060006080868803121561556c57600080fd5b8535945060208601356001600160401b0381111561558957600080fd5b615595888289016154c1565b90955093505060408601356155a981614bd4565b949793965091946060013592915050565b6000602082840312156155cc57600080fd5b81356001600160401b038111156155e257600080fd5b6131db84828501614e39565b6000806000806080858703121561560457600080fd5b843561560f81614bd4565b935061561d60208601614c0d565b925060408501359150606085013561563481614ce3565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561110457611104615655565b60006020828403121561569057600080fd5b8151614c0681614ce3565b602081016111048284614f70565b600181815b808511156156e45781600019048211156156ca576156ca615655565b808516156156d757918102915b93841c93908002906156ae565b509250929050565b6000826156fb57506001611104565b8161570857506000611104565b816001811461571e576002811461572857615744565b6001915050611104565b60ff84111561573957615739615655565b50506001821b611104565b5060208310610133831016604e8410600b8410161715615767575081810a611104565b61577183836156a9565b806000190482111561578557615785615655565b029392505050565b600061110160ff8416836156ec565b808202811582820484141761110457611104615655565b634e487b7160e01b600052601260045260246000fd5b6000826157d8576157d86157b3565b500490565b6000806000606084860312156157f257600080fd5b83519250602084015161580481614ce3565b6040850151909250614d5281614ce3565b8082018082111561110457611104615655565b60006020828403121561583a57600080fd5b5051919050565b60008251615853818460208701614ef7565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261484060a0830184614e08565b8281526040602082015260006131db6040830184614f1b565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526158dd60a0860188614e08565b610120850192909252845190819052610160840191602086019160005b81811015615916578351855293820193928201926001016158fa565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006159476080830185614f1b565b905082606083015295945050505050565b60006001820161596a5761596a615655565b5060010190565b60006020828403121561598357600080fd5b8151614c0681614bd4565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016159bc576159bc615655565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615a1557615a156157b3565b500690565b600080600060608486031215615a2f57600080fd5b8351925060208401519150604084015160098110614d5257600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209d3f5f848e5c977c06ce8a04a67787edb996e48a4f1a486ddef204a4e19f4a0664736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -1892,6 +1907,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -1943,6 +1963,7 @@ } }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -2048,7 +2069,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])": { "details": "Creates a court under a specified parent court.", @@ -2212,6 +2233,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "KlerosCore Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.", "version": 1 }, @@ -2221,18 +2251,8 @@ { "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 @@ -2240,7 +2260,7 @@ "storageLayout": { "storage": [ { - "astId": 7184, + "astId": 8616, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "governor", "offset": 0, @@ -2248,7 +2268,7 @@ "type": "t_address" }, { - "astId": 7186, + "astId": 8618, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "guardian", "offset": 0, @@ -2256,15 +2276,15 @@ "type": "t_address" }, { - "astId": 7189, + "astId": 8621, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "pinakion", "offset": 0, "slot": "2", - "type": "t_contract(IERC20)1229" + "type": "t_contract(IERC20)1755" }, { - "astId": 7191, + "astId": 8623, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "jurorProsecutionModule", "offset": 0, @@ -2272,47 +2292,47 @@ "type": "t_address" }, { - "astId": 7194, + "astId": 8626, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "sortitionModule", "offset": 0, "slot": "4", - "type": "t_contract(ISortitionModule)23352" + "type": "t_contract(ISortitionModule)23277" }, { - "astId": 7198, + "astId": 8630, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "courts", "offset": 0, "slot": "5", - "type": "t_array(t_struct(Court)7103_storage)dyn_storage" + "type": "t_array(t_struct(Court)8535_storage)dyn_storage" }, { - "astId": 7202, + "astId": 8634, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disputeKits", "offset": 0, "slot": "6", - "type": "t_array(t_contract(IDisputeKit)23189)dyn_storage" + "type": "t_array(t_contract(IDisputeKit)23114)dyn_storage" }, { - "astId": 7206, + "astId": 8638, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disputes", "offset": 0, "slot": "7", - "type": "t_array(t_struct(Dispute)7120_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)8552_storage)dyn_storage" }, { - "astId": 7212, + "astId": 8644, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "currencyRates", "offset": 0, "slot": "8", - "type": "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)7169_storage)" + "type": "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)8601_storage)" }, { - "astId": 7214, + "astId": 8646, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "paused", "offset": 0, @@ -2332,26 +2352,26 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_contract(IDisputeKit)23189)dyn_storage": { - "base": "t_contract(IDisputeKit)23189", + "t_array(t_contract(IDisputeKit)23114)dyn_storage": { + "base": "t_contract(IDisputeKit)23114", "encoding": "dynamic_array", "label": "contract IDisputeKit[]", "numberOfBytes": "32" }, - "t_array(t_struct(Court)7103_storage)dyn_storage": { - "base": "t_struct(Court)7103_storage", + "t_array(t_struct(Court)8535_storage)dyn_storage": { + "base": "t_struct(Court)8535_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreBase.Court[]", "numberOfBytes": "32" }, - "t_array(t_struct(Dispute)7120_storage)dyn_storage": { - "base": "t_struct(Dispute)7120_storage", + "t_array(t_struct(Dispute)8552_storage)dyn_storage": { + "base": "t_struct(Dispute)8552_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)7145_storage)dyn_storage": { - "base": "t_struct(Round)7145_storage", + "t_array(t_struct(Round)8577_storage)dyn_storage": { + "base": "t_struct(Round)8577_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreBase.Round[]", "numberOfBytes": "32" @@ -2373,37 +2393,37 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IArbitrableV2)22946": { + "t_contract(IArbitrableV2)22871": { "encoding": "inplace", "label": "contract IArbitrableV2", "numberOfBytes": "20" }, - "t_contract(IDisputeKit)23189": { + "t_contract(IDisputeKit)23114": { "encoding": "inplace", "label": "contract IDisputeKit", "numberOfBytes": "20" }, - "t_contract(IERC20)1229": { + "t_contract(IERC20)1755": { "encoding": "inplace", "label": "contract IERC20", "numberOfBytes": "20" }, - "t_contract(ISortitionModule)23352": { + "t_contract(ISortitionModule)23277": { "encoding": "inplace", "label": "contract ISortitionModule", "numberOfBytes": "20" }, - "t_enum(Period)7077": { + "t_enum(Period)8509": { "encoding": "inplace", "label": "enum KlerosCoreBase.Period", "numberOfBytes": "1" }, - "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)7169_storage)": { + "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)8601_storage)": { "encoding": "mapping", - "key": "t_contract(IERC20)1229", + "key": "t_contract(IERC20)1755", "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)7169_storage" + "value": "t_struct(CurrencyRate)8601_storage" }, "t_mapping(t_uint256,t_bool)": { "encoding": "mapping", @@ -2412,12 +2432,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_struct(Court)7103_storage": { + "t_struct(Court)8535_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.Court", "members": [ { - "astId": 7079, + "astId": 8511, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "parent", "offset": 0, @@ -2425,7 +2445,7 @@ "type": "t_uint96" }, { - "astId": 7081, + "astId": 8513, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "hiddenVotes", "offset": 12, @@ -2433,7 +2453,7 @@ "type": "t_bool" }, { - "astId": 7084, + "astId": 8516, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "children", "offset": 0, @@ -2441,7 +2461,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 7086, + "astId": 8518, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "minStake", "offset": 0, @@ -2449,7 +2469,7 @@ "type": "t_uint256" }, { - "astId": 7088, + "astId": 8520, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "alpha", "offset": 0, @@ -2457,7 +2477,7 @@ "type": "t_uint256" }, { - "astId": 7090, + "astId": 8522, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "feeForJuror", "offset": 0, @@ -2465,7 +2485,7 @@ "type": "t_uint256" }, { - "astId": 7092, + "astId": 8524, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "jurorsForCourtJump", "offset": 0, @@ -2473,7 +2493,7 @@ "type": "t_uint256" }, { - "astId": 7096, + "astId": 8528, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "timesPerPeriod", "offset": 0, @@ -2481,7 +2501,7 @@ "type": "t_array(t_uint256)4_storage" }, { - "astId": 7100, + "astId": 8532, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "supportedDisputeKits", "offset": 0, @@ -2489,7 +2509,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 7102, + "astId": 8534, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disabled", "offset": 0, @@ -2499,12 +2519,12 @@ ], "numberOfBytes": "384" }, - "t_struct(CurrencyRate)7169_storage": { + "t_struct(CurrencyRate)8601_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.CurrencyRate", "members": [ { - "astId": 7164, + "astId": 8596, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "feePaymentAccepted", "offset": 0, @@ -2512,7 +2532,7 @@ "type": "t_bool" }, { - "astId": 7166, + "astId": 8598, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "rateInEth", "offset": 1, @@ -2520,7 +2540,7 @@ "type": "t_uint64" }, { - "astId": 7168, + "astId": 8600, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "rateDecimals", "offset": 9, @@ -2530,12 +2550,12 @@ ], "numberOfBytes": "32" }, - "t_struct(Dispute)7120_storage": { + "t_struct(Dispute)8552_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.Dispute", "members": [ { - "astId": 7105, + "astId": 8537, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "courtID", "offset": 0, @@ -2543,23 +2563,23 @@ "type": "t_uint96" }, { - "astId": 7108, + "astId": 8540, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "arbitrated", "offset": 12, "slot": "0", - "type": "t_contract(IArbitrableV2)22946" + "type": "t_contract(IArbitrableV2)22871" }, { - "astId": 7111, + "astId": 8543, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "period", "offset": 0, "slot": "1", - "type": "t_enum(Period)7077" + "type": "t_enum(Period)8509" }, { - "astId": 7113, + "astId": 8545, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "ruled", "offset": 1, @@ -2567,7 +2587,7 @@ "type": "t_bool" }, { - "astId": 7115, + "astId": 8547, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "lastPeriodChange", "offset": 0, @@ -2575,22 +2595,22 @@ "type": "t_uint256" }, { - "astId": 7119, + "astId": 8551, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "rounds", "offset": 0, "slot": "3", - "type": "t_array(t_struct(Round)7145_storage)dyn_storage" + "type": "t_array(t_struct(Round)8577_storage)dyn_storage" } ], "numberOfBytes": "128" }, - "t_struct(Round)7145_storage": { + "t_struct(Round)8577_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.Round", "members": [ { - "astId": 7122, + "astId": 8554, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disputeKitID", "offset": 0, @@ -2598,7 +2618,7 @@ "type": "t_uint256" }, { - "astId": 7124, + "astId": 8556, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "pnkAtStakePerJuror", "offset": 0, @@ -2606,7 +2626,7 @@ "type": "t_uint256" }, { - "astId": 7126, + "astId": 8558, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "totalFeesForJurors", "offset": 0, @@ -2614,7 +2634,7 @@ "type": "t_uint256" }, { - "astId": 7128, + "astId": 8560, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "nbVotes", "offset": 0, @@ -2622,7 +2642,7 @@ "type": "t_uint256" }, { - "astId": 7130, + "astId": 8562, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "repartitions", "offset": 0, @@ -2630,7 +2650,7 @@ "type": "t_uint256" }, { - "astId": 7132, + "astId": 8564, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "pnkPenalties", "offset": 0, @@ -2638,7 +2658,7 @@ "type": "t_uint256" }, { - "astId": 7135, + "astId": 8567, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "drawnJurors", "offset": 0, @@ -2646,7 +2666,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 7137, + "astId": 8569, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "sumFeeRewardPaid", "offset": 0, @@ -2654,7 +2674,7 @@ "type": "t_uint256" }, { - "astId": 7139, + "astId": 8571, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "sumPnkRewardPaid", "offset": 0, @@ -2662,15 +2682,15 @@ "type": "t_uint256" }, { - "astId": 7142, + "astId": 8574, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "feeToken", "offset": 0, "slot": "9", - "type": "t_contract(IERC20)1229" + "type": "t_contract(IERC20)1755" }, { - "astId": 7144, + "astId": 8576, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "drawIterations", "offset": 0, diff --git a/contracts/deployments/arbitrumSepolia/PolicyRegistry.json b/contracts/deployments/arbitrumSepolia/PolicyRegistry.json index a4b7d247e..746d5e0e0 100644 --- a/contracts/deployments/arbitrumSepolia/PolicyRegistry.json +++ b/contracts/deployments/arbitrumSepolia/PolicyRegistry.json @@ -141,6 +141,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -214,6 +221,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -264,18 +284,16 @@ "0xB958113f96950C7806d584eFBed964288d46a0B8", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0xB958113f96950C7806d584eFBed964288d46a0B8", + "implementation": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json index 225db998a..483b4129e 100644 --- a/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json +++ b/contracts/deployments/arbitrumSepolia/PolicyRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xB958113f96950C7806d584eFBed964288d46a0B8", + "address": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", "abi": [ { "inputs": [], @@ -138,6 +138,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -210,43 +217,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xca2e08484cdc272840badb35e8d7a25566f310af3827b2f469acd449ac1e924a", + "transactionHash": "0x10f4c35a7b899fe6fadba9e18904d277cc224474e541b59906421066c66e7bb4", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xB958113f96950C7806d584eFBed964288d46a0B8", - "transactionIndex": 2, - "gasUsed": "777872", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000004000000000000000000000000000000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x1470275094c7fccedeb7dace225d6c0938f109d5072fe373974ffe86cc1150b0", - "transactionHash": "0xca2e08484cdc272840badb35e8d7a25566f310af3827b2f469acd449ac1e924a", + "contractAddress": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", + "transactionIndex": 3, + "gasUsed": "781799", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000800000000000000000000040080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000400000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x506689bf6b2c3385573a3d4c686989191a63f562f9dfbf18a00089afffdeaeb6", + "transactionHash": "0x10f4c35a7b899fe6fadba9e18904d277cc224474e541b59906421066c66e7bb4", "logs": [ { - "transactionIndex": 2, - "blockNumber": 95247680, - "transactionHash": "0xca2e08484cdc272840badb35e8d7a25566f310af3827b2f469acd449ac1e924a", - "address": "0xB958113f96950C7806d584eFBed964288d46a0B8", + "transactionIndex": 3, + "blockNumber": 139235279, + "transactionHash": "0x10f4c35a7b899fe6fadba9e18904d277cc224474e541b59906421066c66e7bb4", + "address": "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 23, - "blockHash": "0x1470275094c7fccedeb7dace225d6c0938f109d5072fe373974ffe86cc1150b0" + "logIndex": 3, + "blockHash": "0x506689bf6b2c3385573a3d4c686989191a63f562f9dfbf18a00089afffdeaeb6" } ], - "blockNumber": 95247680, - "cumulativeGasUsed": "1690246", + "blockNumber": 139235279, + "cumulativeGasUsed": "998041", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":[],\"name\":\"initialize2\",\"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\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a policy for each court.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"PolicyRegistry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0x3616d00a695cf960373d73a56d727fba4988a6c67f4e9084d1aab18f6db72e73\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610cb66100fc6000396000818161029e015281816102c701526104c40152610cb66000f3fe6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", "devdoc": { "details": "A contract to maintain a policy for each court.", "errors": { @@ -255,6 +275,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -284,6 +309,7 @@ } }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -298,7 +324,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "initialize(address)": { "details": "Constructs the `PolicyRegistry` contract.", @@ -325,6 +351,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "PolicyRegistry", "version": 1 }, @@ -334,18 +369,8 @@ { "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 @@ -353,7 +378,7 @@ "storageLayout": { "storage": [ { - "astId": 12203, + "astId": 13671, "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", "label": "governor", "offset": 0, @@ -361,7 +386,7 @@ "type": "t_address" }, { - "astId": 12207, + "astId": 13675, "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", "label": "policies", "offset": 0, diff --git a/contracts/deployments/arbitrumSepolia/SortitionModule.json b/contracts/deployments/arbitrumSepolia/SortitionModule.json index 2229fd634..b306aea3e 100644 --- a/contracts/deployments/arbitrumSepolia/SortitionModule.json +++ b/contracts/deployments/arbitrumSepolia/SortitionModule.json @@ -99,7 +99,7 @@ "type": "uint256" } ], - "name": "StakeDelayedAlreadyTransferred", + "name": "StakeDelayedAlreadyTransferredDeposited", "type": "event" }, { @@ -197,6 +197,12 @@ "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" } ], "name": "StakeSet", @@ -215,6 +221,19 @@ "name": "Upgraded", "type": "event" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -532,6 +551,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -931,6 +957,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -981,23 +1020,16 @@ "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000e8442307d36e9bf6ab27f1a009f95ce8e11c3479000000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000000007080000000000000000000000000298a3efa6faf90865725e2b48cf0f66e5d527540000000000000000000000000000000000000000000000000000000000000014" ], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract 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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220ceae34f8d0c3a8d9cda469aa0dab2c6865b82430654b42fa98d22bcc1559e71964736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220ceae34f8d0c3a8d9cda469aa0dab2c6865b82430654b42fa98d22bcc1559e71964736f6c63430008180033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479", - 1800, - 1800, - "0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754", - 20 - ] + "methodName": "initialize3", + "args": [] }, - "implementation": "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", + "implementation": "0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json b/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json index 3810a7781..3512683d0 100644 --- a/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json +++ b/contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", + "address": "0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b", "abi": [ { "inputs": [], @@ -96,7 +96,7 @@ "type": "uint256" } ], - "name": "StakeDelayedAlreadyTransferred", + "name": "StakeDelayedAlreadyTransferredDeposited", "type": "event" }, { @@ -194,6 +194,12 @@ "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" } ], "name": "StakeSet", @@ -212,6 +218,19 @@ "name": "Upgraded", "type": "event" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -529,6 +548,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -927,43 +953,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0x82c77e2f23ed02c05ec660d88dbf1999a432382d40d82f9a778862d8653a0aae", + "transactionHash": "0xfc8d26dc7e10c243ff6344b5875ed4b5ada2e5d7fc8bd81864bbe8606c2095be", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", - "transactionIndex": 2, - "gasUsed": "2885530", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1fc2413e5a80ee4dcfeebaf29ecbfff793cde45e990547448a6740276afb029a", - "transactionHash": "0x82c77e2f23ed02c05ec660d88dbf1999a432382d40d82f9a778862d8653a0aae", + "contractAddress": "0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b", + "transactionIndex": 7, + "gasUsed": "2793212", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000100000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3f10f4735f9442bcf7c59299cce65298f2d7e476cfc1b6080e5f9ecb7fe25840", + "transactionHash": "0xfc8d26dc7e10c243ff6344b5875ed4b5ada2e5d7fc8bd81864bbe8606c2095be", "logs": [ { - "transactionIndex": 2, - "blockNumber": 95250301, - "transactionHash": "0x82c77e2f23ed02c05ec660d88dbf1999a432382d40d82f9a778862d8653a0aae", - "address": "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", + "transactionIndex": 7, + "blockNumber": 139235306, + "transactionHash": "0xfc8d26dc7e10c243ff6344b5875ed4b5ada2e5d7fc8bd81864bbe8606c2095be", + "address": "0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x1fc2413e5a80ee4dcfeebaf29ecbfff793cde45e990547448a6740276afb029a" + "logIndex": 14, + "blockHash": "0x3f10f4735f9442bcf7c59299cce65298f2d7e476cfc1b6080e5f9ecb7fe25840" } ], - "blockNumber": 95250301, - "cumulativeGasUsed": "2924163", + "blockNumber": 139235306, + "cumulativeGasUsed": "3428818", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_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\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"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)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_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\":\"SortitionModule\",\"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/SortitionModule.sol\":\"SortitionModule\"},\"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/SortitionModule.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 \\\"./SortitionModuleBase.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is SortitionModuleBase, 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.\\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 function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\n super._initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\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 virtual override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x0e66dcf797fdf493986513d2c148adac962fea393f0d16c6e89df8f0fc048d8f\",\"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/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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051612eb062000103600039600081816112410152818161126a01526114620152612eb06000f3fe6080604052600436106102205760003560e01c80637dc38f141161012e578063ccbac9f5116100ab578063dd5e5cb51161006f578063dd5e5cb5146106b4578063e534710d146106d4578063f216de4c1461070c578063f2f4eb261461072c578063f6b4d82d1461074c57600080fd5b8063ccbac9f5146105d2578063d09f392d146105e8578063d1c1df4814610608578063d605787b14610648578063dca5f6b01461066857600080fd5b8063b1c9fe6e116100f2578063b1c9fe6e14610542578063b5d69e9914610570578063b888adfa14610590578063c057eca7146105a6578063c1572618146105bc57600080fd5b80637dc38f141461049d578063823cfd70146104b3578063965af6c7146104d3578063a2473cc1146104f3578063a5861b901461051357600080fd5b80634c70a0d6116101bc57806354812d171161018057806354812d17146103dc57806356acb050146103fc5780635d2d7846146104125780636624192f1461043257806376fa9fc51461047d57600080fd5b80634c70a0d6146103475780634dbbebbc146103675780634f1ef2861461038757806352d1902d1461039a578063543f8a36146103af57600080fd5b806303432744146102255780630b274f2e1461024e5780630c340a24146102655780630e083ec91461029d5780631b92bbbe146102b357806321e1625e146102c957806321ea9b3f146102e957806335975f4a14610307578063477a655c14610327575b600080fd5b34801561023157600080fd5b5061023b60065481565b6040519081526020015b60405180910390f35b34801561025a57600080fd5b506102636107b6565b005b34801561027157600080fd5b50600054610285906001600160a01b031681565b6040516001600160a01b039091168152602001610245565b3480156102a957600080fd5b5061023b600a5481565b3480156102bf57600080fd5b5061023b60035481565b3480156102d557600080fd5b506102636102e4366004612866565b610b8e565b3480156102f557600080fd5b50610263610304366004612892565b50565b34801561031357600080fd5b50610263610322366004612892565b610c31565b34801561033357600080fd5b5061026361034236600461294e565b610e69565b34801561035357600080fd5b50610285610362366004612995565b610f60565b34801561037357600080fd5b50610263610382366004612866565b611144565b6102636103953660046129c1565b61122d565b3480156103a657600080fd5b5061023b611455565b3480156103bb57600080fd5b506103cf6103ca3660046129fb565b6114b3565b6040516102459190612a18565b3480156103e857600080fd5b506102636103f7366004612a65565b611551565b34801561040857600080fd5b5061023b600b5481565b34801561041e57600080fd5b5061026361042d366004612acc565b61167f565b34801561043e57600080fd5b5061046d61044d3660046129fb565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610245565b34801561048957600080fd5b5061023b610498366004612acc565b6116c2565b3480156104a957600080fd5b5061023b60095481565b3480156104bf57600080fd5b506102636104ce366004612892565b61171d565b3480156104df57600080fd5b506102636104ee366004612866565b61174c565b3480156104ff57600080fd5b5061023b61050e366004612b03565b6117e7565b34801561051f57600080fd5b5061053361052e366004612b4a565b611811565b60405161024593929190612bb3565b34801561054e57600080fd5b5060015461056390600160a01b900460ff1681565b6040516102459190612bdf565b34801561057c57600080fd5b5061026361058b3660046129fb565b61185e565b34801561059c57600080fd5b5061023b60045481565b3480156105b257600080fd5b5061023b60025481565b3480156105c857600080fd5b5061023b60055481565b3480156105de57600080fd5b5061023b60085481565b3480156105f457600080fd5b50610263610603366004612acc565b611940565b34801561061457600080fd5b50610628610623366004612b03565b61197a565b604080519485526020850193909352918301526060820152608001610245565b34801561065457600080fd5b50600754610285906001600160a01b031681565b34801561067457600080fd5b5061069f6106833660046129fb565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610245565b3480156106c057600080fd5b506102636106cf366004612892565b6119b9565b3480156106e057600080fd5b5061023b6106ef366004612b03565b600f60209081526000928352604080842090915290825290205481565b34801561071857600080fd5b50610263610727366004612866565b6119e8565b34801561073857600080fd5b50600154610285906001600160a01b031681565b34801561075857600080fd5b506107a6610767366004612892565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102459493929190612bf9565b6000600154600160a01b900460ff1660028111156107d6576107d6612b9d565b03610949576002546004546107eb9042612c40565b10156108535760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116108b55760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b606482015260840161084a565b6007546009546001600160a01b0390911690637363ae1f906108d79043612c53565b6040518263ffffffff1660e01b81526004016108f591815260200190565b600060405180830381600087803b15801561090f57600080fd5b505af1158015610923573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610b43565b60018054600160a01b900460ff16600281111561096857610968612b9d565b03610a60576007546009546005546001600160a01b03909216916313cf90549161099191612c53565b6040518263ffffffff1660e01b81526004016109af91815260200190565b6020604051808303816000875af11580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f29190612c66565b6008819055600003610a465760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f74207265616479207965740000604482015260640161084a565b600180546002919060ff60a01b1916600160a01b8361093f565b6002600154600160a01b900460ff166002811115610a8057610a80612b9d565b03610b43576006541580610aa25750600354600454610a9f9042612c40565b10155b610b355760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a40161084a565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610b8491600160a01b90910460ff1690612bdf565b60405180910390a1565b6001546001600160a01b03163314610bb85760405162461bcd60e51b815260040161084a90612c7f565b6001600160a01b0382166000908152600d602052604081206002018054839290610be3908490612c53565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610c5157610c51612b9d565b14610c9e5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e0000000000604482015260640161084a565b600b54600a541015610cf25760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e00000000604482015260640161084a565b6000600a54600183600b54610d079190612c53565b610d119190612c40565b11610d1c5781610d37565b600b54600a54610d2c9190612c40565b610d37906001612c53565b9050600081600b54610d499190612c53565b600b549091505b81811015610e61576000818152600e6020526040902080546001600160a01b031615610e585760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610dcc9490821693600160a01b9092046001600160601b031692909160ff1690600401612bf9565b600060405180830381600087803b158015610de657600080fd5b505af1158015610dfa573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b50600101610d50565b50600b555050565b6001546001600160a01b03163314610e935760405162461bcd60e51b815260040161084a90612c7f565b6000828152600c6020526040812090610eab83611a60565b825490915015610ef45760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b604482015260640161084a565b60018111610f445760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e0000000000604482015260640161084a565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff166002811115610f8257610f82612b9d565b14610fbe5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b604482015260640161084a565b6000848152600c6020526040812060028101805491929091610fe257610fe2612cc3565b9060005260206000200154600003610ffe57600091505061113d565b60008160020160008154811061101657611016612cc3565b90600052602060002001546008548686604051602001611049939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c61106c9190612cef565b905060005b60028301548354611083908390612d03565b61108e906001612c53565b101561111d5760015b83548111611117576000818386600001546110b29190612d03565b6110bc9190612c53565b905060008560020182815481106110d5576110d5612cc3565b906000526020600020015490508085106110fa576110f38186612c40565b9450611102565b509150611117565b5050808061110f90612d1a565b915050611097565b50611071565b600081815260048401602052604090205461113790611a7b565b93505050505b9392505050565b6000546001600160a01b0316331461116e5760405162461bcd60e51b815260040161084a90612d33565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156111ad576111ad612b9d565b03611229576007546009546001600160a01b0390911690637363ae1f906111d49043612c53565b6040518263ffffffff1660e01b81526004016111f291815260200190565b600060405180830381600087803b15801561120c57600080fd5b505af1158015611220573d6000803e3d6000fd5b50504360055550505b5050565b61123682611aa6565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806112b457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166112a8600080516020612e5b8339815191525490565b6001600160a01b031614155b156112d25760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561132c575060408051601f3d908101601f1916820190925261132991810190612c66565b60015b61135457604051630c76093760e01b81526001600160a01b038316600482015260240161084a565b600080516020612e5b833981519152811461138557604051632a87526960e21b81526004810182905260240161084a565b600080516020612e5b8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611450576000836001600160a01b0316836040516113ec9190612d75565b600060405180830381855af49150503d8060008114611427576040519150601f19603f3d011682016040523d82523d6000602084013e61142c565b606091505b505090508061144e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114a05760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612e5b83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561154557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116115025790505b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061159b5750805467ffffffffffffffff808416911610155b156115b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038a81166001600160a01b031992831617909255600180548a8416908316178155600289905560038890554260045560078054938816939092169290921790556009849055600b55805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116a95760405162461bcd60e51b815260040161084a90612c7f565b600680549060006116b983612da4565b91905055505050565b6000828152600c60209081526040808320848452600381019092528220548083036116f257600092505050611717565b81600201818154811061170757611707612cc3565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117475760405162461bcd60e51b815260040161084a90612d33565b600255565b6001546001600160a01b031633146117765760405162461bcd60e51b815260040161084a90612c7f565b6001600160a01b0382166000908152600d6020526040812060020180548392906117a1908490612c40565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610c25565b6000806117f48484611ad0565b90506118096001600160601b038416826116c2565b949350505050565b600154600090819081906001600160a01b031633146118425760405162461bcd60e51b815260040161084a90612c7f565b61184e87878787611b18565b9199909850909650945050505050565b6001546001600160a01b031633146118885760405162461bcd60e51b815260040161084a90612c7f565b6000611893826114b3565b80519091505b801561145057600180546001600160a01b03169063fbb519e790859085906118c19086612c40565b815181106118d1576118d1612cc3565b60200260200101516000806040518563ffffffff1660e01b81526004016118fb9493929190612bf9565b600060405180830381600087803b15801561191557600080fd5b505af1158015611929573d6000803e3d6000fd5b50505050808061193890612da4565b915050611899565b6001546001600160a01b0316331461196a5760405162461bcd60e51b815260040161084a90612c7f565b600680549060006116b983612d1a565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119ac87876117e7565b9054949793965094505050565b6000546001600160a01b031633146119e35760405162461bcd60e51b815260040161084a90612d33565b600355565b6001546001600160a01b03163314611a125760405162461bcd60e51b815260040161084a90612c7f565b6001600160a01b0382166000908152600d6020526040902060018101548211611a545781816001016000828254611a499190612c40565b909155506114509050565b60006001820155505050565b60006020825110611a7357506020015190565b506006919050565b600060405160005b6014811015611a9e5783811a81600c84010153600101611a83565b505192915050565b6000546001600160a01b031633146103045760405162461bcd60e51b815260040161084a90612d33565b600060405160005b6014811015611af3578481600c011a81830153600101611ad8565b5060145b6020811015611b0f5783811a81830153600101611af7565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611b3f89896117e7565b825490915087158015611b5b5750600481101580611b5b575081155b15611b73576000806003955095509550505050611ea8565b6000600154600160a01b900460ff166002811115611b9357611b93612b9d565b14611d4d57611ba2898b611eb2565b94506000600e6000600a60008154611bb990612d1a565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611cf15760028101805460ff19166001179055611c9c848b8b86612169565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611d3f565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611ea892505050565b818810611d6d5786611d6857611d65838a8a85612169565b95505b611d86565b611d79838a8a85612249565b611d839086612c53565b94505b6000611d928b8b611ad0565b905060008a5b81611e5057611db16001600160601b0382168c85612440565b6000196001600160601b03821601611dcc5760019150611d98565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e419190612dbb565b50949550611d98945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050505b9450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b03861684529091528120548015612162576000818152600e60205260409020600281015460ff1615612115576000611f0c85876117e7565b90506000818360010154611f209190612c40565b6001600160a01b0387166000908152600d602052604090206001810154919650869250908210611f5257806001015495505b85816001016000828254611f669190612c40565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036121115780545b801561210f576001600160601b03891682611fdb600184612c40565b81548110611feb57611feb612cc3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036120fd578154829061202790600190612c40565b8154811061203757612037612cc3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b031690839061206b9084612c40565b8154811061207b5761207b612cc3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806120c7576120c7612e30565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561210f565b8061210781612da4565b915050611fbf565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b600080856001015486600201541015612183576000612197565b856001015486600201546121979190612c40565b90506121a38184612c53565b8410156121b15760006121c6565b806121bc8486612c40565b6121c69190612c40565b91508260000361220b578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b828660010154101561221d5783612238565b8383876001015461222e9190612c40565b6122389190612c53565b866001018190555050949350505050565b600284015460009061225b8484612c40565b6122659190612c53565b856001015410612280576122798383612c40565b90506122a6565b84600201548560010154106122a657846002015485600101546122a39190612c40565b90505b826000036124035784545b8015612401576001600160601b038516866122cd600184612c40565b815481106122dd576122dd612cc3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123ef578554869061231990600190612c40565b8154811061232957612329612cc3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b031690879061235d9084612c40565b8154811061236d5761236d612cc3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806123b9576123b9612e30565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a02191690559055612401565b806123f981612da4565b9150506122b1565b505b81856001015410156124155782612430565b828286600101546124269190612c40565b6124309190612c53565b8560010181905550949350505050565b6000838152600c6020908152604080832084845260038101909252822054909181900361260d57831561260857600182015460000361255b5750600281018054600180820183556000928352602090922081018590559081148015906124ba575081546124ae600183612c40565b6124b89190612cef565b155b156125565781546000906124ce9083612e46565b60008181526004850160205260408120549192506124ed846001612c53565b90508460020185600201848154811061250857612508612cc3565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125d6565b60018083018054909161256d91612c40565b8154811061257d5761257d612cc3565b906000526020600020015490508160010180548061259d5761259d612e30565b60019003818190600052602060002001600090559055838260020182815481106125c9576125c9612cc3565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556126088582600187612794565b61278d565b836000036126ab57600082600201828154811061262c5761262c612cc3565b90600052602060002001549050600083600201838154811061265057612650612cc3565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556126a5908790849084612794565b5061278d565b8160020181815481106126c0576126c0612cc3565b9060005260206000200154841461278d576000848360020183815481106126e9576126e9612cc3565b90600052602060002001541115905060008161272f578584600201848154811061271557612715612cc3565b906000526020600020015461272a9190612c40565b61275a565b83600201838154811061274457612744612cc3565b90600052602060002001548661275a9190612c40565b90508584600201848154811061277257612772612cc3565b60009182526020909120015561278a87848484612794565b50505b5050505050565b6000848152600c60205260409020835b80156128495781546127b7600183612c40565b6127c19190612e46565b9050836127f857828260020182815481106127de576127de612cc3565b90600052602060002001546127f39190612c40565b612823565b8282600201828154811061280e5761280e612cc3565b90600052602060002001546128239190612c53565b82600201828154811061283857612838612cc3565b6000918252602090912001556127a4565b505050505050565b6001600160a01b038116811461030457600080fd5b6000806040838503121561287957600080fd5b823561288481612851565b946020939093013593505050565b6000602082840312156128a457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126128d257600080fd5b813567ffffffffffffffff808211156128ed576128ed6128ab565b604051601f8301601f19908116603f01168101908282118183101715612915576129156128ab565b8160405283815286602085880101111561292e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561296157600080fd5b82359150602083013567ffffffffffffffff81111561297f57600080fd5b61298b858286016128c1565b9150509250929050565b6000806000606084860312156129aa57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156129d457600080fd5b82356129df81612851565b9150602083013567ffffffffffffffff81111561297f57600080fd5b600060208284031215612a0d57600080fd5b813561113d81612851565b6020808252825182820181905260009190848201906040850190845b81811015612a595783516001600160601b031683529284019291840191600101612a34565b50909695505050505050565b60008060008060008060c08789031215612a7e57600080fd5b8635612a8981612851565b95506020870135612a9981612851565b945060408701359350606087013592506080870135612ab781612851565b8092505060a087013590509295509295509295565b60008060408385031215612adf57600080fd5b50508035926020909101359150565b6001600160601b038116811461030457600080fd5b60008060408385031215612b1657600080fd5b8235612b2181612851565b91506020830135612b3181612aee565b809150509250929050565b801515811461030457600080fd5b60008060008060808587031215612b6057600080fd5b8435612b6b81612851565b93506020850135612b7b81612aee565b9250604085013591506060850135612b9281612b3c565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612bd157612bd1612b9d565b826040830152949350505050565b6020810160038310612bf357612bf3612b9d565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561171757611717612c2a565b8082018082111561171757611717612c2a565b600060208284031215612c7857600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612cfe57612cfe612cd9565b500690565b808202811582820484141761171757611717612c2a565b600060018201612d2c57612d2c612c2a565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b6000825160005b81811015612d965760208186018101518583015201612d7c565b506000920191825250919050565b600081612db357612db3612c2a565b506000190190565b600080600080600080600060e0888a031215612dd657600080fd5b8751612de181612aee565b6020890151909750612df281612b3c565b8096505060408801519450606088015193506080880151925060a0880151915060c0880151612e2081612b3c565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b600082612e5557612e55612cd9565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201f59327c8f892ad7dd4afa3ac5ff8a721db63e5be10bb9f0da3bdf61022f215264736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106102205760003560e01c80637dc38f141161012e578063ccbac9f5116100ab578063dd5e5cb51161006f578063dd5e5cb5146106b4578063e534710d146106d4578063f216de4c1461070c578063f2f4eb261461072c578063f6b4d82d1461074c57600080fd5b8063ccbac9f5146105d2578063d09f392d146105e8578063d1c1df4814610608578063d605787b14610648578063dca5f6b01461066857600080fd5b8063b1c9fe6e116100f2578063b1c9fe6e14610542578063b5d69e9914610570578063b888adfa14610590578063c057eca7146105a6578063c1572618146105bc57600080fd5b80637dc38f141461049d578063823cfd70146104b3578063965af6c7146104d3578063a2473cc1146104f3578063a5861b901461051357600080fd5b80634c70a0d6116101bc57806354812d171161018057806354812d17146103dc57806356acb050146103fc5780635d2d7846146104125780636624192f1461043257806376fa9fc51461047d57600080fd5b80634c70a0d6146103475780634dbbebbc146103675780634f1ef2861461038757806352d1902d1461039a578063543f8a36146103af57600080fd5b806303432744146102255780630b274f2e1461024e5780630c340a24146102655780630e083ec91461029d5780631b92bbbe146102b357806321e1625e146102c957806321ea9b3f146102e957806335975f4a14610307578063477a655c14610327575b600080fd5b34801561023157600080fd5b5061023b60065481565b6040519081526020015b60405180910390f35b34801561025a57600080fd5b506102636107b6565b005b34801561027157600080fd5b50600054610285906001600160a01b031681565b6040516001600160a01b039091168152602001610245565b3480156102a957600080fd5b5061023b600a5481565b3480156102bf57600080fd5b5061023b60035481565b3480156102d557600080fd5b506102636102e4366004612866565b610b8e565b3480156102f557600080fd5b50610263610304366004612892565b50565b34801561031357600080fd5b50610263610322366004612892565b610c31565b34801561033357600080fd5b5061026361034236600461294e565b610e69565b34801561035357600080fd5b50610285610362366004612995565b610f60565b34801561037357600080fd5b50610263610382366004612866565b611144565b6102636103953660046129c1565b61122d565b3480156103a657600080fd5b5061023b611455565b3480156103bb57600080fd5b506103cf6103ca3660046129fb565b6114b3565b6040516102459190612a18565b3480156103e857600080fd5b506102636103f7366004612a65565b611551565b34801561040857600080fd5b5061023b600b5481565b34801561041e57600080fd5b5061026361042d366004612acc565b61167f565b34801561043e57600080fd5b5061046d61044d3660046129fb565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610245565b34801561048957600080fd5b5061023b610498366004612acc565b6116c2565b3480156104a957600080fd5b5061023b60095481565b3480156104bf57600080fd5b506102636104ce366004612892565b61171d565b3480156104df57600080fd5b506102636104ee366004612866565b61174c565b3480156104ff57600080fd5b5061023b61050e366004612b03565b6117e7565b34801561051f57600080fd5b5061053361052e366004612b4a565b611811565b60405161024593929190612bb3565b34801561054e57600080fd5b5060015461056390600160a01b900460ff1681565b6040516102459190612bdf565b34801561057c57600080fd5b5061026361058b3660046129fb565b61185e565b34801561059c57600080fd5b5061023b60045481565b3480156105b257600080fd5b5061023b60025481565b3480156105c857600080fd5b5061023b60055481565b3480156105de57600080fd5b5061023b60085481565b3480156105f457600080fd5b50610263610603366004612acc565b611940565b34801561061457600080fd5b50610628610623366004612b03565b61197a565b604080519485526020850193909352918301526060820152608001610245565b34801561065457600080fd5b50600754610285906001600160a01b031681565b34801561067457600080fd5b5061069f6106833660046129fb565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610245565b3480156106c057600080fd5b506102636106cf366004612892565b6119b9565b3480156106e057600080fd5b5061023b6106ef366004612b03565b600f60209081526000928352604080842090915290825290205481565b34801561071857600080fd5b50610263610727366004612866565b6119e8565b34801561073857600080fd5b50600154610285906001600160a01b031681565b34801561075857600080fd5b506107a6610767366004612892565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102459493929190612bf9565b6000600154600160a01b900460ff1660028111156107d6576107d6612b9d565b03610949576002546004546107eb9042612c40565b10156108535760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116108b55760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b606482015260840161084a565b6007546009546001600160a01b0390911690637363ae1f906108d79043612c53565b6040518263ffffffff1660e01b81526004016108f591815260200190565b600060405180830381600087803b15801561090f57600080fd5b505af1158015610923573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610b43565b60018054600160a01b900460ff16600281111561096857610968612b9d565b03610a60576007546009546005546001600160a01b03909216916313cf90549161099191612c53565b6040518263ffffffff1660e01b81526004016109af91815260200190565b6020604051808303816000875af11580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f29190612c66565b6008819055600003610a465760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f74207265616479207965740000604482015260640161084a565b600180546002919060ff60a01b1916600160a01b8361093f565b6002600154600160a01b900460ff166002811115610a8057610a80612b9d565b03610b43576006541580610aa25750600354600454610a9f9042612c40565b10155b610b355760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a40161084a565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610b8491600160a01b90910460ff1690612bdf565b60405180910390a1565b6001546001600160a01b03163314610bb85760405162461bcd60e51b815260040161084a90612c7f565b6001600160a01b0382166000908152600d602052604081206002018054839290610be3908490612c53565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610c5157610c51612b9d565b14610c9e5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e0000000000604482015260640161084a565b600b54600a541015610cf25760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e00000000604482015260640161084a565b6000600a54600183600b54610d079190612c53565b610d119190612c40565b11610d1c5781610d37565b600b54600a54610d2c9190612c40565b610d37906001612c53565b9050600081600b54610d499190612c53565b600b549091505b81811015610e61576000818152600e6020526040902080546001600160a01b031615610e585760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610dcc9490821693600160a01b9092046001600160601b031692909160ff1690600401612bf9565b600060405180830381600087803b158015610de657600080fd5b505af1158015610dfa573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b50600101610d50565b50600b555050565b6001546001600160a01b03163314610e935760405162461bcd60e51b815260040161084a90612c7f565b6000828152600c6020526040812090610eab83611a60565b825490915015610ef45760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b604482015260640161084a565b60018111610f445760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e0000000000604482015260640161084a565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff166002811115610f8257610f82612b9d565b14610fbe5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b604482015260640161084a565b6000848152600c6020526040812060028101805491929091610fe257610fe2612cc3565b9060005260206000200154600003610ffe57600091505061113d565b60008160020160008154811061101657611016612cc3565b90600052602060002001546008548686604051602001611049939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c61106c9190612cef565b905060005b60028301548354611083908390612d03565b61108e906001612c53565b101561111d5760015b83548111611117576000818386600001546110b29190612d03565b6110bc9190612c53565b905060008560020182815481106110d5576110d5612cc3565b906000526020600020015490508085106110fa576110f38186612c40565b9450611102565b509150611117565b5050808061110f90612d1a565b915050611097565b50611071565b600081815260048401602052604090205461113790611a7b565b93505050505b9392505050565b6000546001600160a01b0316331461116e5760405162461bcd60e51b815260040161084a90612d33565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156111ad576111ad612b9d565b03611229576007546009546001600160a01b0390911690637363ae1f906111d49043612c53565b6040518263ffffffff1660e01b81526004016111f291815260200190565b600060405180830381600087803b15801561120c57600080fd5b505af1158015611220573d6000803e3d6000fd5b50504360055550505b5050565b61123682611aa6565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806112b457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166112a8600080516020612e5b8339815191525490565b6001600160a01b031614155b156112d25760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561132c575060408051601f3d908101601f1916820190925261132991810190612c66565b60015b61135457604051630c76093760e01b81526001600160a01b038316600482015260240161084a565b600080516020612e5b833981519152811461138557604051632a87526960e21b81526004810182905260240161084a565b600080516020612e5b8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611450576000836001600160a01b0316836040516113ec9190612d75565b600060405180830381855af49150503d8060008114611427576040519150601f19603f3d011682016040523d82523d6000602084013e61142c565b606091505b505090508061144e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114a05760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612e5b83398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561154557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116115025790505b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061159b5750805467ffffffffffffffff808416911610155b156115b85760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038a81166001600160a01b031992831617909255600180548a8416908316178155600289905560038890554260045560078054938816939092169290921790556009849055600b55805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116a95760405162461bcd60e51b815260040161084a90612c7f565b600680549060006116b983612da4565b91905055505050565b6000828152600c60209081526040808320848452600381019092528220548083036116f257600092505050611717565b81600201818154811061170757611707612cc3565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117475760405162461bcd60e51b815260040161084a90612d33565b600255565b6001546001600160a01b031633146117765760405162461bcd60e51b815260040161084a90612c7f565b6001600160a01b0382166000908152600d6020526040812060020180548392906117a1908490612c40565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610c25565b6000806117f48484611ad0565b90506118096001600160601b038416826116c2565b949350505050565b600154600090819081906001600160a01b031633146118425760405162461bcd60e51b815260040161084a90612c7f565b61184e87878787611b18565b9199909850909650945050505050565b6001546001600160a01b031633146118885760405162461bcd60e51b815260040161084a90612c7f565b6000611893826114b3565b80519091505b801561145057600180546001600160a01b03169063fbb519e790859085906118c19086612c40565b815181106118d1576118d1612cc3565b60200260200101516000806040518563ffffffff1660e01b81526004016118fb9493929190612bf9565b600060405180830381600087803b15801561191557600080fd5b505af1158015611929573d6000803e3d6000fd5b50505050808061193890612da4565b915050611899565b6001546001600160a01b0316331461196a5760405162461bcd60e51b815260040161084a90612c7f565b600680549060006116b983612d1a565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119ac87876117e7565b9054949793965094505050565b6000546001600160a01b031633146119e35760405162461bcd60e51b815260040161084a90612d33565b600355565b6001546001600160a01b03163314611a125760405162461bcd60e51b815260040161084a90612c7f565b6001600160a01b0382166000908152600d6020526040902060018101548211611a545781816001016000828254611a499190612c40565b909155506114509050565b60006001820155505050565b60006020825110611a7357506020015190565b506006919050565b600060405160005b6014811015611a9e5783811a81600c84010153600101611a83565b505192915050565b6000546001600160a01b031633146103045760405162461bcd60e51b815260040161084a90612d33565b600060405160005b6014811015611af3578481600c011a81830153600101611ad8565b5060145b6020811015611b0f5783811a81830153600101611af7565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611b3f89896117e7565b825490915087158015611b5b5750600481101580611b5b575081155b15611b73576000806003955095509550505050611ea8565b6000600154600160a01b900460ff166002811115611b9357611b93612b9d565b14611d4d57611ba2898b611eb2565b94506000600e6000600a60008154611bb990612d1a565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611cf15760028101805460ff19166001179055611c9c848b8b86612169565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611d3f565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611ea892505050565b818810611d6d5786611d6857611d65838a8a85612169565b95505b611d86565b611d79838a8a85612249565b611d839086612c53565b94505b6000611d928b8b611ad0565b905060008a5b81611e5057611db16001600160601b0382168c85612440565b6000196001600160601b03821601611dcc5760019150611d98565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e419190612dbb565b50949550611d98945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050505b9450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b03861684529091528120548015612162576000818152600e60205260409020600281015460ff1615612115576000611f0c85876117e7565b90506000818360010154611f209190612c40565b6001600160a01b0387166000908152600d602052604090206001810154919650869250908210611f5257806001015495505b85816001016000828254611f669190612c40565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036121115780545b801561210f576001600160601b03891682611fdb600184612c40565b81548110611feb57611feb612cc3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036120fd578154829061202790600190612c40565b8154811061203757612037612cc3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b031690839061206b9084612c40565b8154811061207b5761207b612cc3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806120c7576120c7612e30565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561210f565b8061210781612da4565b915050611fbf565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b600080856001015486600201541015612183576000612197565b856001015486600201546121979190612c40565b90506121a38184612c53565b8410156121b15760006121c6565b806121bc8486612c40565b6121c69190612c40565b91508260000361220b578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b828660010154101561221d5783612238565b8383876001015461222e9190612c40565b6122389190612c53565b866001018190555050949350505050565b600284015460009061225b8484612c40565b6122659190612c53565b856001015410612280576122798383612c40565b90506122a6565b84600201548560010154106122a657846002015485600101546122a39190612c40565b90505b826000036124035784545b8015612401576001600160601b038516866122cd600184612c40565b815481106122dd576122dd612cc3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123ef578554869061231990600190612c40565b8154811061232957612329612cc3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b031690879061235d9084612c40565b8154811061236d5761236d612cc3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806123b9576123b9612e30565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a02191690559055612401565b806123f981612da4565b9150506122b1565b505b81856001015410156124155782612430565b828286600101546124269190612c40565b6124309190612c53565b8560010181905550949350505050565b6000838152600c6020908152604080832084845260038101909252822054909181900361260d57831561260857600182015460000361255b5750600281018054600180820183556000928352602090922081018590559081148015906124ba575081546124ae600183612c40565b6124b89190612cef565b155b156125565781546000906124ce9083612e46565b60008181526004850160205260408120549192506124ed846001612c53565b90508460020185600201848154811061250857612508612cc3565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125d6565b60018083018054909161256d91612c40565b8154811061257d5761257d612cc3565b906000526020600020015490508160010180548061259d5761259d612e30565b60019003818190600052602060002001600090559055838260020182815481106125c9576125c9612cc3565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556126088582600187612794565b61278d565b836000036126ab57600082600201828154811061262c5761262c612cc3565b90600052602060002001549050600083600201838154811061265057612650612cc3565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556126a5908790849084612794565b5061278d565b8160020181815481106126c0576126c0612cc3565b9060005260206000200154841461278d576000848360020183815481106126e9576126e9612cc3565b90600052602060002001541115905060008161272f578584600201848154811061271557612715612cc3565b906000526020600020015461272a9190612c40565b61275a565b83600201838154811061274457612744612cc3565b90600052602060002001548661275a9190612c40565b90508584600201848154811061277257612772612cc3565b60009182526020909120015561278a87848484612794565b50505b5050505050565b6000848152600c60205260409020835b80156128495781546127b7600183612c40565b6127c19190612e46565b9050836127f857828260020182815481106127de576127de612cc3565b90600052602060002001546127f39190612c40565b612823565b8282600201828154811061280e5761280e612cc3565b90600052602060002001546128239190612c53565b82600201828154811061283857612838612cc3565b6000918252602090912001556127a4565b505050505050565b6001600160a01b038116811461030457600080fd5b6000806040838503121561287957600080fd5b823561288481612851565b946020939093013593505050565b6000602082840312156128a457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126128d257600080fd5b813567ffffffffffffffff808211156128ed576128ed6128ab565b604051601f8301601f19908116603f01168101908282118183101715612915576129156128ab565b8160405283815286602085880101111561292e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561296157600080fd5b82359150602083013567ffffffffffffffff81111561297f57600080fd5b61298b858286016128c1565b9150509250929050565b6000806000606084860312156129aa57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156129d457600080fd5b82356129df81612851565b9150602083013567ffffffffffffffff81111561297f57600080fd5b600060208284031215612a0d57600080fd5b813561113d81612851565b6020808252825182820181905260009190848201906040850190845b81811015612a595783516001600160601b031683529284019291840191600101612a34565b50909695505050505050565b60008060008060008060c08789031215612a7e57600080fd5b8635612a8981612851565b95506020870135612a9981612851565b945060408701359350606087013592506080870135612ab781612851565b8092505060a087013590509295509295509295565b60008060408385031215612adf57600080fd5b50508035926020909101359150565b6001600160601b038116811461030457600080fd5b60008060408385031215612b1657600080fd5b8235612b2181612851565b91506020830135612b3181612aee565b809150509250929050565b801515811461030457600080fd5b60008060008060808587031215612b6057600080fd5b8435612b6b81612851565b93506020850135612b7b81612aee565b9250604085013591506060850135612b9281612b3c565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612bd157612bd1612b9d565b826040830152949350505050565b6020810160038310612bf357612bf3612b9d565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561171757611717612c2a565b8082018082111561171757611717612c2a565b600060208284031215612c7857600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612cfe57612cfe612cd9565b500690565b808202811582820484141761171757611717612c2a565b600060018201612d2c57612d2c612c2a565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b6000825160005b81811015612d965760208186018101518583015201612d7c565b506000920191825250919050565b600081612db357612db3612c2a565b506000190190565b600080600080600080600060e0888a031215612dd657600080fd5b8751612de181612aee565b6020890151909750612df281612b3c565b8096505060408801519450606088015193506080880151925060a0880151915060c0880151612e2081612b3c565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b600082612e5557612e55612cd9565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201f59327c8f892ad7dd4afa3ac5ff8a721db63e5be10bb9f0da3bdf61022f215264736f6c63430008180033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"StakeDelayedAlreadyTransferredDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferredWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedNotTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountAllCourts\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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.\"},\"StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens withdrawn.\",\"_courtID\":\"The ID of the court.\"}},\"StakeDelayedNotTransferred(address,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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.\"}},\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModule\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"events\":{\"StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are already deposited.\"},\"StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are already withdrawn.\"},\"StakeDelayedNotTransferred(address,uint256,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are not transferred yet.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/SortitionModule.sol\":\"SortitionModule\"},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"license\":\"MIT\"},\"src/arbitration/SortitionModule.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 {SortitionModuleBase, KlerosCore, RNG} from \\\"./SortitionModuleBase.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is SortitionModuleBase {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\n __SortitionModuleBase_initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n }\\n\\n function initialize3() external reinitializer(3) {\\n // NOP\\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 virtual override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x895d41c99597957e112739427d8bed728f2ebf2f6a69bc913c037d654d171c40\",\"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} from \\\"./KlerosCore.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {RNG} from \\\"../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, Initializable, UUPSProxiable {\\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 /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are not transferred yet.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayedNotTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are already deposited.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayedAlreadyTransferredDeposited(address indexed _address, uint256 _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are already withdrawn.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens withdrawn.\\n event StakeDelayedAlreadyTransferredWithdrawn(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __SortitionModuleBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal onlyInitializing {\\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 governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\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 // Nullify the index so the delayed stake won't get deleted before its own execution.\\n delete latestDelayedStakeIndex[delayedStake.account][delayedStake.courtID];\\n core.setStakeBySortitionModule(\\n delayedStake.account,\\n delayedStake.courtID,\\n delayedStake.stake,\\n delayedStake.alreadyTransferred\\n );\\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 (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n pnkWithdrawal = _deleteDelayedStake(_courtID, _account);\\n if (phase != Phase.staking) {\\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 StakeDelayedAlreadyTransferredDeposited(_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, juror.stakedPnk);\\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\":\"0xc5ebae59558c74b41b8a45d4705115cbe9fac373e1828d0589b6cc71ffd9011c\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161311762000103600039600081816112d90152818161130201526114fa01526131176000f3fe6080604052600436106102515760003560e01c8063823cfd7011610139578063d09f392d116100b6578063e4c0aaf41161007a578063e4c0aaf414610743578063e534710d14610763578063ec918b651461079b578063f216de4c146107b0578063f2f4eb26146107d0578063f6b4d82d146107f057600080fd5b8063d09f392d14610657578063d1c1df4814610677578063d605787b146106b7578063dca5f6b0146106d7578063dd5e5cb51461072357600080fd5b8063b5d69e99116100fd578063b5d69e99146105df578063b888adfa146105ff578063c057eca714610615578063c15726181461062b578063ccbac9f51461064157600080fd5b8063823cfd7014610522578063965af6c714610542578063a2473cc114610562578063a5861b9014610582578063b1c9fe6e146105b157600080fd5b80634dbbebbc116101d257806354fd4d501161019657806354fd4d501461042d57806356acb0501461046b5780635d2d7846146104815780636624192f146104a157806376fa9fc5146104ec5780637dc38f141461050c57600080fd5b80634dbbebbc146103985780634f1ef286146103b857806352d1902d146103cb578063543f8a36146103e057806354812d171461040d57600080fd5b806321e1625e1161021957806321e1625e146102fa57806321ea9b3f1461031a57806335975f4a14610338578063477a655c146103585780634c70a0d61461037857600080fd5b806303432744146102565780630b274f2e1461027f5780630c340a24146102965780630e083ec9146102ce5780631b92bbbe146102e4575b600080fd5b34801561026257600080fd5b5061026c60065481565b6040519081526020015b60405180910390f35b34801561028b57600080fd5b5061029461085a565b005b3480156102a257600080fd5b506000546102b6906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b3480156102da57600080fd5b5061026c600a5481565b3480156102f057600080fd5b5061026c60035481565b34801561030657600080fd5b50610294610315366004612a8c565b610c32565b34801561032657600080fd5b50610294610335366004612ab8565b50565b34801561034457600080fd5b50610294610353366004612ab8565b610cd5565b34801561036457600080fd5b50610294610373366004612b73565b610f01565b34801561038457600080fd5b506102b6610393366004612bb9565b610ff8565b3480156103a457600080fd5b506102946103b3366004612a8c565b6111dc565b6102946103c6366004612be5565b6112c5565b3480156103d757600080fd5b5061026c6114ed565b3480156103ec57600080fd5b506104006103fb366004612c1e565b61154b565b6040516102769190612c3b565b34801561041957600080fd5b50610294610428366004612c88565b6115e9565b34801561043957600080fd5b5061045e604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102769190612d13565b34801561047757600080fd5b5061026c600b5481565b34801561048d57600080fd5b5061029461049c366004612d46565b6116b9565b3480156104ad57600080fd5b506104dc6104bc366004612c1e565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610276565b3480156104f857600080fd5b5061026c610507366004612d46565b6116fc565b34801561051857600080fd5b5061026c60095481565b34801561052e57600080fd5b5061029461053d366004612ab8565b611757565b34801561054e57600080fd5b5061029461055d366004612a8c565b611786565b34801561056e57600080fd5b5061026c61057d366004612d7d565b611821565b34801561058e57600080fd5b506105a261059d366004612dc4565b61184b565b60405161027693929190612e2d565b3480156105bd57600080fd5b506001546105d290600160a01b900460ff1681565b6040516102769190612e59565b3480156105eb57600080fd5b506102946105fa366004612c1e565b611898565b34801561060b57600080fd5b5061026c60045481565b34801561062157600080fd5b5061026c60025481565b34801561063757600080fd5b5061026c60055481565b34801561064d57600080fd5b5061026c60085481565b34801561066357600080fd5b50610294610672366004612d46565b61197a565b34801561068357600080fd5b50610697610692366004612d7d565b6119b4565b604080519485526020850193909352918301526060820152608001610276565b3480156106c357600080fd5b506007546102b6906001600160a01b031681565b3480156106e357600080fd5b5061070e6106f2366004612c1e565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610276565b34801561072f57600080fd5b5061029461073e366004612ab8565b6119f3565b34801561074f57600080fd5b5061029461075e366004612c1e565b611a22565b34801561076f57600080fd5b5061026c61077e366004612d7d565b600f60209081526000928352604080842090915290825290205481565b3480156107a757600080fd5b50610294611a6e565b3480156107bc57600080fd5b506102946107cb366004612a8c565b611b1f565b3480156107dc57600080fd5b506001546102b6906001600160a01b031681565b3480156107fc57600080fd5b5061084a61080b366004612ab8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102769493929190612e73565b6000600154600160a01b900460ff16600281111561087a5761087a612e17565b036109ed5760025460045461088f9042612eba565b10156108f75760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109595760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108ee565b6007546009546001600160a01b0390911690637363ae1f9061097b9043612ecd565b6040518263ffffffff1660e01b815260040161099991815260200190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610be7565b60018054600160a01b900460ff166002811115610a0c57610a0c612e17565b03610b04576007546009546005546001600160a01b03909216916313cf905491610a3591612ecd565b6040518263ffffffff1660e01b8152600401610a5391815260200190565b6020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190612ee0565b6008819055600003610aea5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108ee565b600180546002919060ff60a01b1916600160a01b836109e3565b6002600154600160a01b900460ff166002811115610b2457610b24612e17565b03610be7576006541580610b465750600354600454610b439042612eba565b10155b610bd95760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108ee565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c2891600160a01b90910460ff1690612e59565b60405180910390a1565b6001546001600160a01b03163314610c5c5760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d602052604081206002018054839290610c87908490612ecd565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610cf557610cf5612e17565b14610d425760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108ee565b600b54600a541015610d965760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108ee565b6000600a54600183600b54610dab9190612ecd565b610db59190612eba565b11610dc05781610ddb565b600b54600a54610dd09190612eba565b610ddb906001612ecd565b9050600081600b54610ded9190612ecd565b600b549091505b81811015610ef9576000818152600e6020526040902080546001600160a01b031615610ef05780546001600160a01b038082166000908152600f602090815260408083206001600160601b03600160a01b9687900481168552925280832092909255600180548654918701546002880154945163fbb519e760e01b81529186169663fbb519e796610e999690851695919094041692909160ff90911690600401612e73565b600060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050506000838152600e602052604081208181556001810191909155600201805460ff19169055505b50600101610df4565b50600b555050565b6001546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016108ee90612ef9565b6000828152600c6020526040812090610f4383611b97565b825490915015610f8c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108ee565b60018111610fdc5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108ee565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff16600281111561101a5761101a612e17565b146110565760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108ee565b6000848152600c602052604081206002810180549192909161107a5761107a612f3d565b90600052602060002001546000036110965760009150506111d5565b6000816002016000815481106110ae576110ae612f3d565b906000526020600020015460085486866040516020016110e1939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111049190612f69565b905060005b6002830154835461111b908390612f7d565b611126906001612ecd565b10156111b55760015b835481116111af5760008183866000015461114a9190612f7d565b6111549190612ecd565b9050600085600201828154811061116d5761116d612f3d565b906000526020600020015490508085106111925761118b8186612eba565b945061119a565b5091506111af565b505080806111a790612f94565b91505061112f565b50611109565b60008181526004840160205260409020546111cf90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146112065760405162461bcd60e51b81526004016108ee90612fad565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff16600281111561124557611245612e17565b036112c1576007546009546001600160a01b0390911690637363ae1f9061126c9043612ecd565b6040518263ffffffff1660e01b815260040161128a91815260200190565b600060405180830381600087803b1580156112a457600080fd5b505af11580156112b8573d6000803e3d6000fd5b50504360055550505b5050565b6112ce82611bdd565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061134c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113406000805160206130c28339815191525490565b6001600160a01b031614155b1561136a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c4575060408051601f3d908101601f191682019092526113c191810190612ee0565b60015b6113ec57604051630c76093760e01b81526001600160a01b03831660048201526024016108ee565b6000805160206130c2833981519152811461141d57604051632a87526960e21b8152600481018290526024016108ee565b6000805160206130c28339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156114e8576000836001600160a01b0316836040516114849190612fef565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114e6576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115385760405163703e46dd60e11b815260040160405180910390fd5b506000805160206130c283398151915290565b6001600160a01b0381166000908152600d60209081526040918290208054835181840281018401909452808452606093928301828280156115dd57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161159a5790505b50505050509050919050565b600160006115f5611c07565b8054909150600160401b900460ff168061161c575080546001600160401b03808416911610155b156116395760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611668888888888888611c2b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116e35760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f38361300b565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361172c57600092505050611751565b81600201818154811061174157611741612f3d565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117815760405162461bcd60e51b81526004016108ee90612fad565b600255565b6001546001600160a01b031633146117b05760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040812060020180548392906117db908490612eba565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610cc9565b60008061182e8484611c8b565b90506118436001600160601b038416826116fc565b949350505050565b600154600090819081906001600160a01b0316331461187c5760405162461bcd60e51b81526004016108ee90612ef9565b61188887878787611cd3565b9199909850909650945050505050565b6001546001600160a01b031633146118c25760405162461bcd60e51b81526004016108ee90612ef9565b60006118cd8261154b565b80519091505b80156114e857600180546001600160a01b03169063fbb519e790859085906118fb9086612eba565b8151811061190b5761190b612f3d565b60200260200101516000806040518563ffffffff1660e01b81526004016119359493929190612e73565b600060405180830381600087803b15801561194f57600080fd5b505af1158015611963573d6000803e3d6000fd5b5050505080806119729061300b565b9150506118d3565b6001546001600160a01b031633146119a45760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f383612f94565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119e68787611821565b9054949793965094505050565b6000546001600160a01b03163314611a1d5760405162461bcd60e51b81526004016108ee90612fad565b600355565b6000546001600160a01b03163314611a4c5760405162461bcd60e51b81526004016108ee90612fad565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036000611a7a611c07565b8054909150600160401b900460ff1680611aa1575080546001600160401b03808416911610155b15611abe5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612eba565b909155506114e89050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b031633146103355760405162461bcd60e51b81526004016108ee90612fad565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b611c33612097565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b6014811015611cae578481600c011a81830153600101611c93565b5060145b6020811015611cca5783811a81830153600101611cb2565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611cfa8989611821565b825490915081158015611d0e575060048110155b15611d2657600080600395509550955050505061208d565b81158015611d32575087155b15611d4a57600080600895509550955050505061208d565b611d54898b6120be565b94506000600154600160a01b900460ff166002811115611d7657611d76612e17565b14611f24576000600e6000600a60008154611d9090612f94565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611ec85760028101805460ff19166001179055611e73848b8b86612375565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f040c97ed4ca4c864eb1463d1115e1ff278ce453e2e100ed2f5d45ab06f3d579d910160405180910390a2611f16565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b506000935061208d92505050565b818810611f445786611f3f57611f3c838a8a85612375565b95505b611f5d565b611f50838a8a85612455565b611f5a9086612ecd565b94505b6000611f698b8b611c8b565b905060008a5b8161202757611f886001600160601b0382168c8561264c565b6000196001600160601b03821601611fa35760019150611f6f565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120189190613022565b50949550611f6f945050505050565b6001860154604080516001600160601b038f168152602081018e9052908101919091526001600160a01b038e16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2506000955050505050505b9450945094915050565b61209f6129a0565b6120bc57604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561236e576000818152600e60205260409020600281015460ff16156123215760006121188587611821565b9050600081836001015461212c9190612eba565b6001600160a01b0387166000908152600d60205260409020600181015491965086925090821061215e57806001015495505b858160010160008282546121729190612eba565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a38260000361231d5780545b801561231b576001600160601b038916826121e7600184612eba565b815481106121f7576121f7612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603612309578154829061223390600190612eba565b8154811061224357612243612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122779084612eba565b8154811061228757612287612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122d3576122d3613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561231b565b806123138161300b565b9150506121cb565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561238f5760006123a3565b856001015486600201546123a39190612eba565b90506123af8184612ecd565b8410156123bd5760006123d2565b806123c88486612eba565b6123d29190612eba565b915082600003612417578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124295783612444565b8383876001015461243a9190612eba565b6124449190612ecd565b866001018190555050949350505050565b60028401546000906124678484612eba565b6124719190612ecd565b85600101541061248c576124858383612eba565b90506124b2565b84600201548560010154106124b257846002015485600101546124af9190612eba565b90505b8260000361260f5784545b801561260d576001600160601b038516866124d9600184612eba565b815481106124e9576124e9612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036125fb578554869061252590600190612eba565b8154811061253557612535612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125699084612eba565b8154811061257957612579612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806125c5576125c5613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561260d565b806126058161300b565b9150506124bd565b505b8185600101541015612621578261263c565b828286600101546126329190612eba565b61263c9190612ecd565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128195783156128145760018201546000036127675750600281018054600180820183556000928352602090922081018590559081148015906126c6575081546126ba600183612eba565b6126c49190612f69565b155b156127625781546000906126da90836130ad565b60008181526004850160205260408120549192506126f9846001612ecd565b90508460020185600201848154811061271457612714612f3d565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6127e2565b60018083018054909161277991612eba565b8154811061278957612789612f3d565b90600052602060002001549050816001018054806127a9576127a9613097565b60019003818190600052602060002001600090559055838260020182815481106127d5576127d5612f3d565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561281485826001876129ba565b612999565b836000036128b757600082600201828154811061283857612838612f3d565b90600052602060002001549050600083600201838154811061285c5761285c612f3d565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556128b19087908490846129ba565b50612999565b8160020181815481106128cc576128cc612f3d565b90600052602060002001548414612999576000848360020183815481106128f5576128f5612f3d565b90600052602060002001541115905060008161293b578584600201848154811061292157612921612f3d565b90600052602060002001546129369190612eba565b612966565b83600201838154811061295057612950612f3d565b9060005260206000200154866129669190612eba565b90508584600201848154811061297e5761297e612f3d565b600091825260209091200155612996878484846129ba565b50505b5050505050565b60006129aa611c07565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612a6f5781546129dd600183612eba565b6129e791906130ad565b905083612a1e5782826002018281548110612a0457612a04612f3d565b9060005260206000200154612a199190612eba565b612a49565b82826002018281548110612a3457612a34612f3d565b9060005260206000200154612a499190612ecd565b826002018281548110612a5e57612a5e612f3d565b6000918252602090912001556129ca565b505050505050565b6001600160a01b038116811461033557600080fd5b60008060408385031215612a9f57600080fd5b8235612aaa81612a77565b946020939093013593505050565b600060208284031215612aca57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612af857600080fd5b81356001600160401b0380821115612b1257612b12612ad1565b604051601f8301601f19908116603f01168101908282118183101715612b3a57612b3a612ad1565b81604052838152866020858801011115612b5357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612b8657600080fd5b8235915060208301356001600160401b03811115612ba357600080fd5b612baf85828601612ae7565b9150509250929050565b600080600060608486031215612bce57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612bf857600080fd5b8235612c0381612a77565b915060208301356001600160401b03811115612ba357600080fd5b600060208284031215612c3057600080fd5b81356111d581612a77565b6020808252825182820181905260009190848201906040850190845b81811015612c7c5783516001600160601b031683529284019291840191600101612c57565b50909695505050505050565b60008060008060008060c08789031215612ca157600080fd5b8635612cac81612a77565b95506020870135612cbc81612a77565b945060408701359350606087013592506080870135612cda81612a77565b8092505060a087013590509295509295509295565b60005b83811015612d0a578181015183820152602001612cf2565b50506000910152565b6020815260008251806020840152612d32816040850160208701612cef565b601f01601f19169190910160400192915050565b60008060408385031215612d5957600080fd5b50508035926020909101359150565b6001600160601b038116811461033557600080fd5b60008060408385031215612d9057600080fd5b8235612d9b81612a77565b91506020830135612dab81612d68565b809150509250929050565b801515811461033557600080fd5b60008060008060808587031215612dda57600080fd5b8435612de581612a77565b93506020850135612df581612d68565b9250604085013591506060850135612e0c81612db6565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160098310612e4b57612e4b612e17565b826040830152949350505050565b6020810160038310612e6d57612e6d612e17565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561175157611751612ea4565b8082018082111561175157611751612ea4565b600060208284031215612ef257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500690565b808202811582820484141761175157611751612ea4565b600060018201612fa657612fa6612ea4565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251613001818460208701612cef565b9190910192915050565b60008161301a5761301a612ea4565b506000190190565b600080600080600080600060e0888a03121561303d57600080fd5b875161304881612d68565b602089015190975061305981612db6565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161308781612db6565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b6000826130bc576130bc612f53565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205df31a379a3344b7416d4590b65130aa7a2e941ece6783087fde76eddcdc9dd064736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106102515760003560e01c8063823cfd7011610139578063d09f392d116100b6578063e4c0aaf41161007a578063e4c0aaf414610743578063e534710d14610763578063ec918b651461079b578063f216de4c146107b0578063f2f4eb26146107d0578063f6b4d82d146107f057600080fd5b8063d09f392d14610657578063d1c1df4814610677578063d605787b146106b7578063dca5f6b0146106d7578063dd5e5cb51461072357600080fd5b8063b5d69e99116100fd578063b5d69e99146105df578063b888adfa146105ff578063c057eca714610615578063c15726181461062b578063ccbac9f51461064157600080fd5b8063823cfd7014610522578063965af6c714610542578063a2473cc114610562578063a5861b9014610582578063b1c9fe6e146105b157600080fd5b80634dbbebbc116101d257806354fd4d501161019657806354fd4d501461042d57806356acb0501461046b5780635d2d7846146104815780636624192f146104a157806376fa9fc5146104ec5780637dc38f141461050c57600080fd5b80634dbbebbc146103985780634f1ef286146103b857806352d1902d146103cb578063543f8a36146103e057806354812d171461040d57600080fd5b806321e1625e1161021957806321e1625e146102fa57806321ea9b3f1461031a57806335975f4a14610338578063477a655c146103585780634c70a0d61461037857600080fd5b806303432744146102565780630b274f2e1461027f5780630c340a24146102965780630e083ec9146102ce5780631b92bbbe146102e4575b600080fd5b34801561026257600080fd5b5061026c60065481565b6040519081526020015b60405180910390f35b34801561028b57600080fd5b5061029461085a565b005b3480156102a257600080fd5b506000546102b6906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b3480156102da57600080fd5b5061026c600a5481565b3480156102f057600080fd5b5061026c60035481565b34801561030657600080fd5b50610294610315366004612a8c565b610c32565b34801561032657600080fd5b50610294610335366004612ab8565b50565b34801561034457600080fd5b50610294610353366004612ab8565b610cd5565b34801561036457600080fd5b50610294610373366004612b73565b610f01565b34801561038457600080fd5b506102b6610393366004612bb9565b610ff8565b3480156103a457600080fd5b506102946103b3366004612a8c565b6111dc565b6102946103c6366004612be5565b6112c5565b3480156103d757600080fd5b5061026c6114ed565b3480156103ec57600080fd5b506104006103fb366004612c1e565b61154b565b6040516102769190612c3b565b34801561041957600080fd5b50610294610428366004612c88565b6115e9565b34801561043957600080fd5b5061045e604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102769190612d13565b34801561047757600080fd5b5061026c600b5481565b34801561048d57600080fd5b5061029461049c366004612d46565b6116b9565b3480156104ad57600080fd5b506104dc6104bc366004612c1e565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610276565b3480156104f857600080fd5b5061026c610507366004612d46565b6116fc565b34801561051857600080fd5b5061026c60095481565b34801561052e57600080fd5b5061029461053d366004612ab8565b611757565b34801561054e57600080fd5b5061029461055d366004612a8c565b611786565b34801561056e57600080fd5b5061026c61057d366004612d7d565b611821565b34801561058e57600080fd5b506105a261059d366004612dc4565b61184b565b60405161027693929190612e2d565b3480156105bd57600080fd5b506001546105d290600160a01b900460ff1681565b6040516102769190612e59565b3480156105eb57600080fd5b506102946105fa366004612c1e565b611898565b34801561060b57600080fd5b5061026c60045481565b34801561062157600080fd5b5061026c60025481565b34801561063757600080fd5b5061026c60055481565b34801561064d57600080fd5b5061026c60085481565b34801561066357600080fd5b50610294610672366004612d46565b61197a565b34801561068357600080fd5b50610697610692366004612d7d565b6119b4565b604080519485526020850193909352918301526060820152608001610276565b3480156106c357600080fd5b506007546102b6906001600160a01b031681565b3480156106e357600080fd5b5061070e6106f2366004612c1e565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610276565b34801561072f57600080fd5b5061029461073e366004612ab8565b6119f3565b34801561074f57600080fd5b5061029461075e366004612c1e565b611a22565b34801561076f57600080fd5b5061026c61077e366004612d7d565b600f60209081526000928352604080842090915290825290205481565b3480156107a757600080fd5b50610294611a6e565b3480156107bc57600080fd5b506102946107cb366004612a8c565b611b1f565b3480156107dc57600080fd5b506001546102b6906001600160a01b031681565b3480156107fc57600080fd5b5061084a61080b366004612ab8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102769493929190612e73565b6000600154600160a01b900460ff16600281111561087a5761087a612e17565b036109ed5760025460045461088f9042612eba565b10156108f75760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109595760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108ee565b6007546009546001600160a01b0390911690637363ae1f9061097b9043612ecd565b6040518263ffffffff1660e01b815260040161099991815260200190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610be7565b60018054600160a01b900460ff166002811115610a0c57610a0c612e17565b03610b04576007546009546005546001600160a01b03909216916313cf905491610a3591612ecd565b6040518263ffffffff1660e01b8152600401610a5391815260200190565b6020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190612ee0565b6008819055600003610aea5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108ee565b600180546002919060ff60a01b1916600160a01b836109e3565b6002600154600160a01b900460ff166002811115610b2457610b24612e17565b03610be7576006541580610b465750600354600454610b439042612eba565b10155b610bd95760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108ee565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c2891600160a01b90910460ff1690612e59565b60405180910390a1565b6001546001600160a01b03163314610c5c5760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d602052604081206002018054839290610c87908490612ecd565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610cf557610cf5612e17565b14610d425760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108ee565b600b54600a541015610d965760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108ee565b6000600a54600183600b54610dab9190612ecd565b610db59190612eba565b11610dc05781610ddb565b600b54600a54610dd09190612eba565b610ddb906001612ecd565b9050600081600b54610ded9190612ecd565b600b549091505b81811015610ef9576000818152600e6020526040902080546001600160a01b031615610ef05780546001600160a01b038082166000908152600f602090815260408083206001600160601b03600160a01b9687900481168552925280832092909255600180548654918701546002880154945163fbb519e760e01b81529186169663fbb519e796610e999690851695919094041692909160ff90911690600401612e73565b600060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050506000838152600e602052604081208181556001810191909155600201805460ff19169055505b50600101610df4565b50600b555050565b6001546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016108ee90612ef9565b6000828152600c6020526040812090610f4383611b97565b825490915015610f8c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108ee565b60018111610fdc5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108ee565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff16600281111561101a5761101a612e17565b146110565760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108ee565b6000848152600c602052604081206002810180549192909161107a5761107a612f3d565b90600052602060002001546000036110965760009150506111d5565b6000816002016000815481106110ae576110ae612f3d565b906000526020600020015460085486866040516020016110e1939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111049190612f69565b905060005b6002830154835461111b908390612f7d565b611126906001612ecd565b10156111b55760015b835481116111af5760008183866000015461114a9190612f7d565b6111549190612ecd565b9050600085600201828154811061116d5761116d612f3d565b906000526020600020015490508085106111925761118b8186612eba565b945061119a565b5091506111af565b505080806111a790612f94565b91505061112f565b50611109565b60008181526004840160205260409020546111cf90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146112065760405162461bcd60e51b81526004016108ee90612fad565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff16600281111561124557611245612e17565b036112c1576007546009546001600160a01b0390911690637363ae1f9061126c9043612ecd565b6040518263ffffffff1660e01b815260040161128a91815260200190565b600060405180830381600087803b1580156112a457600080fd5b505af11580156112b8573d6000803e3d6000fd5b50504360055550505b5050565b6112ce82611bdd565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061134c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113406000805160206130c28339815191525490565b6001600160a01b031614155b1561136a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c4575060408051601f3d908101601f191682019092526113c191810190612ee0565b60015b6113ec57604051630c76093760e01b81526001600160a01b03831660048201526024016108ee565b6000805160206130c2833981519152811461141d57604051632a87526960e21b8152600481018290526024016108ee565b6000805160206130c28339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156114e8576000836001600160a01b0316836040516114849190612fef565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114e6576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115385760405163703e46dd60e11b815260040160405180910390fd5b506000805160206130c283398151915290565b6001600160a01b0381166000908152600d60209081526040918290208054835181840281018401909452808452606093928301828280156115dd57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161159a5790505b50505050509050919050565b600160006115f5611c07565b8054909150600160401b900460ff168061161c575080546001600160401b03808416911610155b156116395760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611668888888888888611c2b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116e35760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f38361300b565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361172c57600092505050611751565b81600201818154811061174157611741612f3d565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117815760405162461bcd60e51b81526004016108ee90612fad565b600255565b6001546001600160a01b031633146117b05760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040812060020180548392906117db908490612eba565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610cc9565b60008061182e8484611c8b565b90506118436001600160601b038416826116fc565b949350505050565b600154600090819081906001600160a01b0316331461187c5760405162461bcd60e51b81526004016108ee90612ef9565b61188887878787611cd3565b9199909850909650945050505050565b6001546001600160a01b031633146118c25760405162461bcd60e51b81526004016108ee90612ef9565b60006118cd8261154b565b80519091505b80156114e857600180546001600160a01b03169063fbb519e790859085906118fb9086612eba565b8151811061190b5761190b612f3d565b60200260200101516000806040518563ffffffff1660e01b81526004016119359493929190612e73565b600060405180830381600087803b15801561194f57600080fd5b505af1158015611963573d6000803e3d6000fd5b5050505080806119729061300b565b9150506118d3565b6001546001600160a01b031633146119a45760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f383612f94565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119e68787611821565b9054949793965094505050565b6000546001600160a01b03163314611a1d5760405162461bcd60e51b81526004016108ee90612fad565b600355565b6000546001600160a01b03163314611a4c5760405162461bcd60e51b81526004016108ee90612fad565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036000611a7a611c07565b8054909150600160401b900460ff1680611aa1575080546001600160401b03808416911610155b15611abe5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612eba565b909155506114e89050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b031633146103355760405162461bcd60e51b81526004016108ee90612fad565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b611c33612097565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b6014811015611cae578481600c011a81830153600101611c93565b5060145b6020811015611cca5783811a81830153600101611cb2565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611cfa8989611821565b825490915081158015611d0e575060048110155b15611d2657600080600395509550955050505061208d565b81158015611d32575087155b15611d4a57600080600895509550955050505061208d565b611d54898b6120be565b94506000600154600160a01b900460ff166002811115611d7657611d76612e17565b14611f24576000600e6000600a60008154611d9090612f94565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611ec85760028101805460ff19166001179055611e73848b8b86612375565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f040c97ed4ca4c864eb1463d1115e1ff278ce453e2e100ed2f5d45ab06f3d579d910160405180910390a2611f16565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b506000935061208d92505050565b818810611f445786611f3f57611f3c838a8a85612375565b95505b611f5d565b611f50838a8a85612455565b611f5a9086612ecd565b94505b6000611f698b8b611c8b565b905060008a5b8161202757611f886001600160601b0382168c8561264c565b6000196001600160601b03821601611fa35760019150611f6f565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120189190613022565b50949550611f6f945050505050565b6001860154604080516001600160601b038f168152602081018e9052908101919091526001600160a01b038e16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2506000955050505050505b9450945094915050565b61209f6129a0565b6120bc57604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561236e576000818152600e60205260409020600281015460ff16156123215760006121188587611821565b9050600081836001015461212c9190612eba565b6001600160a01b0387166000908152600d60205260409020600181015491965086925090821061215e57806001015495505b858160010160008282546121729190612eba565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a38260000361231d5780545b801561231b576001600160601b038916826121e7600184612eba565b815481106121f7576121f7612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603612309578154829061223390600190612eba565b8154811061224357612243612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122779084612eba565b8154811061228757612287612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122d3576122d3613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561231b565b806123138161300b565b9150506121cb565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561238f5760006123a3565b856001015486600201546123a39190612eba565b90506123af8184612ecd565b8410156123bd5760006123d2565b806123c88486612eba565b6123d29190612eba565b915082600003612417578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124295783612444565b8383876001015461243a9190612eba565b6124449190612ecd565b866001018190555050949350505050565b60028401546000906124678484612eba565b6124719190612ecd565b85600101541061248c576124858383612eba565b90506124b2565b84600201548560010154106124b257846002015485600101546124af9190612eba565b90505b8260000361260f5784545b801561260d576001600160601b038516866124d9600184612eba565b815481106124e9576124e9612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036125fb578554869061252590600190612eba565b8154811061253557612535612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125699084612eba565b8154811061257957612579612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806125c5576125c5613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561260d565b806126058161300b565b9150506124bd565b505b8185600101541015612621578261263c565b828286600101546126329190612eba565b61263c9190612ecd565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128195783156128145760018201546000036127675750600281018054600180820183556000928352602090922081018590559081148015906126c6575081546126ba600183612eba565b6126c49190612f69565b155b156127625781546000906126da90836130ad565b60008181526004850160205260408120549192506126f9846001612ecd565b90508460020185600201848154811061271457612714612f3d565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6127e2565b60018083018054909161277991612eba565b8154811061278957612789612f3d565b90600052602060002001549050816001018054806127a9576127a9613097565b60019003818190600052602060002001600090559055838260020182815481106127d5576127d5612f3d565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561281485826001876129ba565b612999565b836000036128b757600082600201828154811061283857612838612f3d565b90600052602060002001549050600083600201838154811061285c5761285c612f3d565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556128b19087908490846129ba565b50612999565b8160020181815481106128cc576128cc612f3d565b90600052602060002001548414612999576000848360020183815481106128f5576128f5612f3d565b90600052602060002001541115905060008161293b578584600201848154811061292157612921612f3d565b90600052602060002001546129369190612eba565b612966565b83600201838154811061295057612950612f3d565b9060005260206000200154866129669190612eba565b90508584600201848154811061297e5761297e612f3d565b600091825260209091200155612996878484846129ba565b50505b5050505050565b60006129aa611c07565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612a6f5781546129dd600183612eba565b6129e791906130ad565b905083612a1e5782826002018281548110612a0457612a04612f3d565b9060005260206000200154612a199190612eba565b612a49565b82826002018281548110612a3457612a34612f3d565b9060005260206000200154612a499190612ecd565b826002018281548110612a5e57612a5e612f3d565b6000918252602090912001556129ca565b505050505050565b6001600160a01b038116811461033557600080fd5b60008060408385031215612a9f57600080fd5b8235612aaa81612a77565b946020939093013593505050565b600060208284031215612aca57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612af857600080fd5b81356001600160401b0380821115612b1257612b12612ad1565b604051601f8301601f19908116603f01168101908282118183101715612b3a57612b3a612ad1565b81604052838152866020858801011115612b5357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612b8657600080fd5b8235915060208301356001600160401b03811115612ba357600080fd5b612baf85828601612ae7565b9150509250929050565b600080600060608486031215612bce57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612bf857600080fd5b8235612c0381612a77565b915060208301356001600160401b03811115612ba357600080fd5b600060208284031215612c3057600080fd5b81356111d581612a77565b6020808252825182820181905260009190848201906040850190845b81811015612c7c5783516001600160601b031683529284019291840191600101612c57565b50909695505050505050565b60008060008060008060c08789031215612ca157600080fd5b8635612cac81612a77565b95506020870135612cbc81612a77565b945060408701359350606087013592506080870135612cda81612a77565b8092505060a087013590509295509295509295565b60005b83811015612d0a578181015183820152602001612cf2565b50506000910152565b6020815260008251806020840152612d32816040850160208701612cef565b601f01601f19169190910160400192915050565b60008060408385031215612d5957600080fd5b50508035926020909101359150565b6001600160601b038116811461033557600080fd5b60008060408385031215612d9057600080fd5b8235612d9b81612a77565b91506020830135612dab81612d68565b809150509250929050565b801515811461033557600080fd5b60008060008060808587031215612dda57600080fd5b8435612de581612a77565b93506020850135612df581612d68565b9250604085013591506060850135612e0c81612db6565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160098310612e4b57612e4b612e17565b826040830152949350505050565b6020810160038310612e6d57612e6d612e17565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561175157611751612ea4565b8082018082111561175157611751612ea4565b600060208284031215612ef257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500690565b808202811582820484141761175157611751612ea4565b600060018201612fa657612fa6612ea4565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251613001818460208701612cef565b9190910192915050565b60008161301a5761301a612ea4565b506000190190565b600080600080600080600060e0888a03121561303d57600080fd5b875161304881612d68565b602089015190975061305981612db6565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161308781612db6565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b6000826130bc576130bc612f53565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205df31a379a3344b7416d4590b65130aa7a2e941ece6783087fde76eddcdc9dd064736f6c63430008180033", "devdoc": { "details": "A factory of trees that keeps track of staked values for sortition.", "errors": { @@ -972,6 +1011,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -992,7 +1036,44 @@ "Initialized(uint64)": { "details": "Triggered when the contract has been initialized or reinitialized." }, + "StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_courtID": "The ID of the court." + } + }, + "StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens withdrawn.", + "_courtID": "The ID of the court." + } + }, + "StakeDelayedNotTransferred(address,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_courtID": "The ID of the court." + } + }, + "StakeLocked(address,uint256,bool)": { + "params": { + "_address": "The address of the juror.", + "_relativeAmount": "The amount of tokens locked.", + "_unlock": "Whether the stake is locked or unlocked." + } + }, + "StakeSet(address,uint256,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_amountAllCourts": "The amount of tokens staked in all courts.", + "_courtID": "The ID of the court." + } + }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -1000,6 +1081,12 @@ }, "kind": "dev", "methods": { + "changeGovernor(address)": { + "details": "Changes the governor of the contract.", + "params": { + "_governor": "The new governor." + } + }, "changeMaxDrawingTime(uint256)": { "details": "Changes the `maxDrawingTime` storage variable.", "params": { @@ -1020,7 +1107,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createTree(bytes32,bytes)": { "details": "Create a sortition sum tree at the specified key.", @@ -1120,6 +1207,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "SortitionModule", "version": 1 }, @@ -1129,16 +1225,23 @@ { "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." + "StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)": { + "notice": "Emitted when a juror's stake is delayed and tokens are already deposited." + }, + "StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)": { + "notice": "Emitted when a juror's stake is delayed and tokens are already withdrawn." + }, + "StakeDelayedNotTransferred(address,uint256,uint256)": { + "notice": "Emitted when a juror's stake is delayed and tokens are not transferred yet." + }, + "StakeLocked(address,uint256,bool)": { + "notice": "Emitted when a juror's stake is locked." + }, + "StakeSet(address,uint256,uint256,uint256)": { + "notice": "Emitted when a juror stakes in a court." } }, "kind": "user", @@ -1148,7 +1251,7 @@ "storageLayout": { "storage": [ { - "astId": 12408, + "astId": 13901, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "governor", "offset": 0, @@ -1156,23 +1259,23 @@ "type": "t_address" }, { - "astId": 12411, + "astId": 13904, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)7051" + "type": "t_contract(KlerosCore)8475" }, { - "astId": 12414, + "astId": 13907, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "phase", "offset": 20, "slot": "1", - "type": "t_enum(Phase)23235" + "type": "t_enum(Phase)23160" }, { - "astId": 12416, + "astId": 13909, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "minStakingTime", "offset": 0, @@ -1180,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 12418, + "astId": 13911, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "maxDrawingTime", "offset": 0, @@ -1188,7 +1291,7 @@ "type": "t_uint256" }, { - "astId": 12420, + "astId": 13913, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "lastPhaseChange", "offset": 0, @@ -1196,7 +1299,7 @@ "type": "t_uint256" }, { - "astId": 12422, + "astId": 13915, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "randomNumberRequestBlock", "offset": 0, @@ -1204,7 +1307,7 @@ "type": "t_uint256" }, { - "astId": 12424, + "astId": 13917, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "disputesWithoutJurors", "offset": 0, @@ -1212,15 +1315,15 @@ "type": "t_uint256" }, { - "astId": 12427, + "astId": 13920, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "rng", "offset": 0, "slot": "7", - "type": "t_contract(RNG)34937" + "type": "t_contract(RNG)35312" }, { - "astId": 12429, + "astId": 13922, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "randomNumber", "offset": 0, @@ -1228,7 +1331,7 @@ "type": "t_uint256" }, { - "astId": 12431, + "astId": 13924, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "rngLookahead", "offset": 0, @@ -1236,7 +1339,7 @@ "type": "t_uint256" }, { - "astId": 12433, + "astId": 13926, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "delayedStakeWriteIndex", "offset": 0, @@ -1244,7 +1347,7 @@ "type": "t_uint256" }, { - "astId": 12435, + "astId": 13928, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "delayedStakeReadIndex", "offset": 0, @@ -1252,31 +1355,31 @@ "type": "t_uint256" }, { - "astId": 12440, + "astId": 13933, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "sortitionSumTrees", "offset": 0, "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)12389_storage)" + "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)13882_storage)" }, { - "astId": 12445, + "astId": 13938, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "jurors", "offset": 0, "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)12406_storage)" + "type": "t_mapping(t_address,t_struct(Juror)13899_storage)" }, { - "astId": 12450, + "astId": 13943, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "delayedStakes", "offset": 0, "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)12398_storage)" + "type": "t_mapping(t_uint256,t_struct(DelayedStake)13891_storage)" }, { - "astId": 12456, + "astId": 13949, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "latestDelayedStakeIndex", "offset": 0, @@ -1312,17 +1415,17 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(KlerosCore)7051": { + "t_contract(KlerosCore)8475": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" }, - "t_contract(RNG)34937": { + "t_contract(RNG)35312": { "encoding": "inplace", "label": "contract RNG", "numberOfBytes": "20" }, - "t_enum(Phase)23235": { + "t_enum(Phase)23160": { "encoding": "inplace", "label": "enum ISortitionModule.Phase", "numberOfBytes": "1" @@ -1334,19 +1437,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_uint96,t_uint256)" }, - "t_mapping(t_address,t_struct(Juror)12406_storage)": { + "t_mapping(t_address,t_struct(Juror)13899_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct SortitionModuleBase.Juror)", "numberOfBytes": "32", - "value": "t_struct(Juror)12406_storage" + "value": "t_struct(Juror)13899_storage" }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)12389_storage)": { + "t_mapping(t_bytes32,t_struct(SortitionSumTree)13882_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)12389_storage" + "value": "t_struct(SortitionSumTree)13882_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -1362,12 +1465,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(DelayedStake)12398_storage)": { + "t_mapping(t_uint256,t_struct(DelayedStake)13891_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", "numberOfBytes": "32", - "value": "t_struct(DelayedStake)12398_storage" + "value": "t_struct(DelayedStake)13891_storage" }, "t_mapping(t_uint96,t_uint256)": { "encoding": "mapping", @@ -1376,12 +1479,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(DelayedStake)12398_storage": { + "t_struct(DelayedStake)13891_storage": { "encoding": "inplace", "label": "struct SortitionModuleBase.DelayedStake", "members": [ { - "astId": 12391, + "astId": 13884, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "account", "offset": 0, @@ -1389,7 +1492,7 @@ "type": "t_address" }, { - "astId": 12393, + "astId": 13886, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "courtID", "offset": 20, @@ -1397,7 +1500,7 @@ "type": "t_uint96" }, { - "astId": 12395, + "astId": 13888, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "stake", "offset": 0, @@ -1405,7 +1508,7 @@ "type": "t_uint256" }, { - "astId": 12397, + "astId": 13890, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "alreadyTransferred", "offset": 0, @@ -1415,12 +1518,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Juror)12406_storage": { + "t_struct(Juror)13899_storage": { "encoding": "inplace", "label": "struct SortitionModuleBase.Juror", "members": [ { - "astId": 12401, + "astId": 13894, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "courtIDs", "offset": 0, @@ -1428,7 +1531,7 @@ "type": "t_array(t_uint96)dyn_storage" }, { - "astId": 12403, + "astId": 13896, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "stakedPnk", "offset": 0, @@ -1436,7 +1539,7 @@ "type": "t_uint256" }, { - "astId": 12405, + "astId": 13898, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "lockedPnk", "offset": 0, @@ -1446,12 +1549,12 @@ ], "numberOfBytes": "96" }, - "t_struct(SortitionSumTree)12389_storage": { + "t_struct(SortitionSumTree)13882_storage": { "encoding": "inplace", "label": "struct SortitionModuleBase.SortitionSumTree", "members": [ { - "astId": 12374, + "astId": 13867, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "K", "offset": 0, @@ -1459,7 +1562,7 @@ "type": "t_uint256" }, { - "astId": 12377, + "astId": 13870, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "stack", "offset": 0, @@ -1467,7 +1570,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 12380, + "astId": 13873, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "nodes", "offset": 0, @@ -1475,7 +1578,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 12384, + "astId": 13877, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "IDsToNodeIndexes", "offset": 0, @@ -1483,7 +1586,7 @@ "type": "t_mapping(t_bytes32,t_uint256)" }, { - "astId": 12388, + "astId": 13881, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "nodeIndexesToIDs", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json index 90834a879..6b1b5d45c 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json @@ -664,6 +664,16 @@ "internalType": "uint256", "name": "_voteID", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "name": "getDegreeOfCoherence", @@ -825,6 +835,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -867,6 +884,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "singleDrawPerJuror", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -885,6 +915,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -969,34 +1012,19 @@ "0x692CC78F2570181FFB99297965FeAA8352ab12E8", "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x0000000000000000000000000000000000000000" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + "implementation": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", "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/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json index 072ba4a7c..68fdf95ff 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + "address": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", "abi": [ { "inputs": [], @@ -661,6 +661,16 @@ "internalType": "uint256", "name": "_voteID", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "name": "getDegreeOfCoherence", @@ -822,6 +832,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -864,6 +881,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "singleDrawPerJuror", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -882,6 +912,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -917,41 +960,41 @@ "type": "function" } ], - "transactionHash": "0x94bdfd10ea04ecb57b76acbdce19b6d0cd72bde1173b32284dbcf3e2fbb24b68", + "transactionHash": "0x694b22a1b80c1dc5e8ff7de0a5770ffbc0ae17f5fd57481a08e8bdd6363b2d06", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x692CC78F2570181FFB99297965FeAA8352ab12E8", - "transactionIndex": 1, - "gasUsed": "41447396", - "logsBloom": "0x00000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000004000000000", - "blockHash": "0xec8815e83c51323930215add9ffb246d3da398d8fd9c9d84c5280d380017da7d", - "transactionHash": "0x94bdfd10ea04ecb57b76acbdce19b6d0cd72bde1173b32284dbcf3e2fbb24b68", + "contractAddress": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", + "transactionIndex": 2, + "gasUsed": "3660965", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000800000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x15baaf1da26c5f27fd94ad24668550a178ecabce4ba7ea3472083d7eaaf289dc", + "transactionHash": "0x694b22a1b80c1dc5e8ff7de0a5770ffbc0ae17f5fd57481a08e8bdd6363b2d06", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3638827, - "transactionHash": "0x94bdfd10ea04ecb57b76acbdce19b6d0cd72bde1173b32284dbcf3e2fbb24b68", - "address": "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + "transactionIndex": 2, + "blockNumber": 139231012, + "transactionHash": "0x694b22a1b80c1dc5e8ff7de0a5770ffbc0ae17f5fd57481a08e8bdd6363b2d06", + "address": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0xec8815e83c51323930215add9ffb246d3da398d8fd9c9d84c5280d380017da7d" + "blockHash": "0x15baaf1da26c5f27fd94ad24668550a178ecabce4ba7ea3472083d7eaaf289dc" } ], - "blockNumber": 3638827, - "cumulativeGasUsed": "41447396", + "blockNumber": 139231012, + "cumulativeGasUsed": "3707601", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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\"}],\"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)\":{\"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.\",\"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 {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 {Constants} from \\\"../libraries/Constants.sol\\\";\\nimport {OnError} from \\\"../libraries/Types.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 IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 => 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 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 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\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\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 _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 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 governor = _governor;\\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(Constants.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(Constants.FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = Constants.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(Constants.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(Constants.GENERAL_COURT, Constants.DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `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 == Constants.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[Constants.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 != Constants.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] == Constants.DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, Constants.NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[dispute.courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == Constants.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 = Constants.DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n Round storage round = dispute.rounds[_round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRoundCache = round.pnkPenalties; // For saving gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\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 pnkPenaltiesInRoundCache = _executePenalties(\\n ExecuteParams(_disputeID, _round, coherentCount, numberOfVotesInRound, pnkPenaltiesInRoundCache, i)\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams(_disputeID, _round, coherentCount, numberOfVotesInRound, pnkPenaltiesInRoundCache, i)\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRoundCache) {\\n round.pnkPenalties = pnkPenaltiesInRoundCache; // 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 );\\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 == Constants.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 );\\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 == Constants.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 == Constants.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 == Constants.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 == Constants.FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, bool sortitionSuccess) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (!sortitionSuccess) {\\n _stakingFailed(_onError);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError);\\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) internal pure {\\n if (_onError == OnError.Return) return;\\n revert StakingFailed();\\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 == Constants.FORKING_COURT || courtID >= courts.length) {\\n courtID = Constants.GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = Constants.DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == Constants.NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = Constants.DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = Constants.GENERAL_COURT;\\n minJurors = Constants.DEFAULT_NB_OF_JURORS;\\n disputeKitID = Constants.DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\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 StakingFailed();\\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}\\n\",\"keccak256\":\"0x43205bc90f6965b5c1380effd2c29994f6dfea074696e39d5df037343a768d6b\",\"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 /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n 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 == KlerosCore.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 == KlerosCore.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 /// @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\\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 == KlerosCore.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @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 ) 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\":\"0xdf2e2e6aacabe3323dad6e8d7bbae2d749ebf0d84c3f71f84ec8d8ed918387e1\",\"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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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 /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\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\":\"0x7fe6b1d9b991cc327cc5895f34208a7b1e3b6ebf8efb20fcb9f3ff0f40d2d209\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\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, bool succeeded);\\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\":\"0xa6d79053edfe04f7d3c8ad9b9ce3f182e45f2f74be40a77a304a93168549c474\",\"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/// @title Constants\\nlibrary Constants {\\n // Courts\\n uint96 public constant FORKING_COURT = 0; // Index of the forking court.\\n uint96 public constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n // Dispute Kits\\n uint256 public constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\n uint256 public constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n // Defaults\\n uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\n IERC20 public constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n}\\n\",\"keccak256\":\"0xde8fd28a18669261b052aebb00bf09ec592bb9298fa5efc76ca8606e0c7dbb25\",\"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/libraries/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\",\"keccak256\":\"0xc7deebd8227dfaa46a36ae8d2c24fe1b5d5c776ab963b44943829ab4058b5701\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613dfb62000103600039600081816114d3015281816114fc01526118370152613dfb6000f3fe6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c15780634fe264fb146102d457806352d1902d146102f4578063564a565d146103095780635c92e2f61461033857806365540b961461035857806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a23660046130cf565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f3660046130cf565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a3660046130cf565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046130fd565b610785565b34801561029857600080fd5b506102ac6102a736600461313a565b610b5b565b005b6102ac6102bc366004613173565b610c58565b6102ac6102cf36600461327b565b6114bf565b3480156102e057600080fd5b506102216102ef3660046132ca565b6116e7565b34801561030057600080fd5b5061022161182a565b34801561031557600080fd5b506103296103243660046130cf565b611888565b6040516101b393929190613346565b34801561034457600080fd5b506102ac6103533660046133bb565b61194e565b34801561036457600080fd5b506103786103733660046130cf565b611c5b565b6040516101b3919061340d565b34801561039157600080fd5b506103a56103a03660046132ca565b611d1f565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed3660046130cf565b611dd7565b3480156103fe57600080fd5b506102ac61040d366004613451565b611e4e565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac6104433660046134a9565b611f1a565b34801561045457600080fd5b506102ac610463366004613541565b6125f5565b34801561047457600080fd5b506104886104833660046132ca565b612641565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461355e565b612707565b3480156104f657600080fd5b506101a76105053660046132ca565b6128dc565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613173565b612977565b34801561054c57600080fd5b5061022161055b366004613173565b612c80565b34801561056c57600080fd5b506102ac61057b366004613541565b612dd3565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46135e5565b600091825260208220600590910201805490925082906105e690600190613611565b815481106105f6576105f66135e5565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436135e5565b6000918252602082206005909102018054909250829061066590600190613611565b81548110610675576106756135e5565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107169190613650565b5090935060049250610726915050565b816004811115610738576107386136b7565b0361077b57600061074888611c5b565b905080516001036107795780600081518110610766576107666135e5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190613650565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600086815260036020526040812054600280549091908110610873576108736135e5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106108a7576108a76135e5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610902573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092691906136cd565b5050600087815260078401602052604090205490915060ff16610970576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ab5565b8086036109e55760008681526006830160205260409020546109935760006109de565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b86529093529220546109d49190613709565b6109de9190613720565b9450610ab5565b600081815260078301602052604090205460ff16610ab55781600601600083600a01600181548110610a1957610a196135e5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610a4f57610a4f6135e5565b9060005260206000200154815260200190815260200160002054610a739190613742565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610aa89190613709565b610ab29190613720565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610b4f576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610ba4575080546001600160401b03808416911610155b15610bc15760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610c7c57610c7c6135e5565b600091825260209091206002600590920201015460ff1615610cb05760405162461bcd60e51b815260040161084690613755565b600083815260036020526040812054600280549091908110610cd457610cd46135e5565b906000526020600020906005020190508060010154831115610d385760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da9919061378c565b91509150814210158015610dbc57508042105b610e015760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6691906136cd565b50509050868103610e7b576127109150610efc565b612710611388610e8b8686613611565b610e959190613709565b610e9f9190613720565b610ea98542613611565b10610ef65760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610f0f90600190613611565b81548110610f1f57610f1f6135e5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015610f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa291906137b0565b610fac9190613611565b60008a815260078401602052604090205490915060ff16156110105760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561105a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107e91906137b0565b9050600061271061108f8784613709565b6110999190613720565b6110a39083613742565b60008c8152600686016020526040812054919250908211156111545760008c815260068601602052604090205434906110dc9084613611565b116111015760008c81526006860160205260409020546110fc9083613611565b611103565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161114b929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f845290915281208054839290611180908490613742565b909155505060008c8152600686016020526040812080548392906111a5908490613742565b909155505060008c815260068601602052604090205482116112775760008c8152600686016020526040812054600987018054919290916111e7908490613742565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a85015460011015611482578285600901546112949190613611565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130691906137c9565b1561131f5760028a01805460ff19166001179055611402565b895460038b016000611332876001613742565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016113ad91815260200190565b602060405180830381865afa1580156113ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ee91906137b0565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161144f9392919061381e565b6000604051808303818588803b15801561146857600080fd5b505af115801561147c573d6000803e3d6000fd5b50505050505b803411156114b057336108fc6114988334613611565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b6114c882612e1f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061154657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661153a600080516020613da68339815191525490565b6001600160a01b031614155b156115645760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156115be575060408051601f3d908101601f191682019092526115bb918101906137b0565b60015b6115e657604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613da6833981519152811461161757604051632a87526960e21b815260048101829052602401610846565b600080516020613da68339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156116e2576000836001600160a01b03168360405161167e91906138b8565b600060405180830381855af49150503d80600081146116b9576040519150601f19603f3d011682016040523d82523d6000602084013e6116be565b606091505b50509050806116e0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b60008381526003602052604081205460028054839290811061170b5761170b6135e5565b6000918252602080832087845260036005909302019182019052604082205481549193508391811061173f5761173f6135e5565b90600052602060002090600c02016000018481548110611761576117616135e5565b600091825260208220600154604051631c3db16d60e01b815260048082018c905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156117bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e391906136cd565b506003850154919350915060ff168015611807575081836002015414806118075750805b1561181a57612710945050505050611823565b60009450505050505b9392505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118755760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613da683398151915290565b6002818154811061189857600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff90911692916118cb906137e4565b80601f01602080910402602001604051908101604052809291908181526020018280546118f7906137e4565b80156119445780601f1061191957610100808354040283529160200191611944565b820191906000526020600020905b81548152906001019060200180831161192757829003601f168201915b5050505050905083565b600084815260036020526040902054600280548692908110611972576119726135e5565b600091825260209091206002600590920201015460ff16156119a65760405162461bcd60e51b815260040161084690613755565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190613650565b5090935060019250611a24915050565b816004811115611a3657611a366136b7565b14611a935760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611ad05760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611af457611af46135e5565b60009182526020822060059091020180549092508290611b1690600190613611565b81548110611b2657611b266135e5565b90600052602060002090600c0201905060005b86811015611bf4573382898984818110611b5557611b556135e5565b9050602002013581548110611b6c57611b6c6135e5565b60009182526020909120600490910201546001600160a01b031614611ba35760405162461bcd60e51b8152600401610846906138d4565b8582898984818110611bb757611bb76135e5565b9050602002013581548110611bce57611bce6135e5565b600091825260209091206001600490920201015580611bec8161390b565b915050611b39565b5086869050816005016000828254611c0c9190613742565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611c49908b908b908b90613956565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611c8157611c816135e5565b60009182526020822060059091020180549092508290611ca390600190613611565b81548110611cb357611cb36135e5565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d1157602002820191906000526020600020905b815481526020019060010190808311611cfd575b505050505092505050919050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d5057611d506135e5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611d8457611d846135e5565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611dfb57611dfb6135e5565b60009182526020822060059091020180549092508290611e1d90600190613611565b81548110611e2d57611e2d6135e5565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611e785760405162461bcd60e51b81526004016108469061397a565b6000836001600160a01b03168383604051611e9391906138b8565b60006040518083038185875af1925050503d8060008114611ed0576040519150601f19603f3d011682016040523d82523d6000602084013e611ed5565b606091505b50509050806116e05760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611f3e57611f3e6135e5565b600091825260209091206002600590920201015460ff1615611f725760405162461bcd60e51b815260040161084690613755565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe09190613650565b5090935060029250611ff0915050565b816004811115612002576120026136b7565b1461205d5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561209f5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b6000888152600360205260408120546002805490919081106120c3576120c36135e5565b90600052602060002090600502019050806001015486111561211e5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b8054600090829061213190600190613611565b81548110612141576121416135e5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561219c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c09190613650565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa15801561221b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223f91906139bc565b505050505091505060005b8a8110156124bb5733848d8d84818110612266576122666135e5565b905060200201358154811061227d5761227d6135e5565b60009182526020909120600490910201546001600160a01b0316146122b45760405162461bcd60e51b8152600401610846906138d4565b811580612327575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106122fc576122fc6135e5565b9050602002013581548110612313576123136135e5565b906000526020600020906004020160010154145b6123995760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c838181106123ac576123ac6135e5565b90506020020135815481106123c3576123c36135e5565b600091825260209091206003600490920201015460ff161561241c5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d84818110612430576124306135e5565b9050602002013581548110612447576124476135e5565b60009182526020909120600260049092020101556001848d8d84818110612470576124706135e5565b9050602002013581548110612487576124876135e5565b60009182526020909120600490910201600301805460ff1916911515919091179055806124b38161390b565b91505061224a565b508a8a90508360040160008282546124d39190613742565b90915550506000898152600284016020526040812080548c92906124f8908490613742565b90915550506001830154890361252757600383015460ff16156125225760038301805460ff191690555b6125a0565b60018301546000908152600284016020526040808220548b83529120540361256957600383015460ff166125225760038301805460ff191660011790556125a0565b60018301546000908152600284016020526040808220548b835291205411156125a0576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c6040516125df93929190613a26565b60405180910390a4505050505050505050505050565b6000546001600160a01b0316331461261f5760405162461bcd60e51b81526004016108469061397a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061266f5761266f6135e5565b600091825260208083208a84526003600590930201918201905260408220548154919350839181106126a3576126a36135e5565b90600052602060002090600c020160000187815481106126c5576126c56135e5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127315760405162461bcd60e51b815260040161084690613a56565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016127bc858783613ae8565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612813573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283791906137b0565b6128419190613611565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906128ca908a908a908a90613ba8565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612900576129006135e5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612934576129346135e5565b90600052602060002090600c02016000018481548110612956576129566135e5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b031633146129a45760405162461bcd60e51b815260040161084690613a56565b6000838152600360205260409020546002805485929081106129c8576129c86135e5565b600091825260209091206002600590920201015460ff16156129fc5760405162461bcd60e51b815260040161084690613755565b600084815260036020526040812054600280549091908110612a2057612a206135e5565b60009182526020822060059091020180549092508290612a4290600190613611565b81548110612a5257612a526135e5565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adb9190613bde565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b4e9190613650565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612bb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bd69190613bde565b9650612be28988612e4c565b15612c6f57604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612c74565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612ca457612ca46135e5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612cd857612cd86135e5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612d37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d5b91906136cd565b5091509150826004015460001480612d8a575080158015612d8a57506000828152600284016020526040902054155b15612d9c576000945050505050612dcd565b8015612db1575050600401549150612dcd9050565b506000908152600290910160205260409020549150612dcd9050565b92915050565b6000546001600160a01b03163314612dfd5760405162461bcd60e51b81526004016108469061397a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612e495760405162461bcd60e51b81526004016108469061397a565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ebe9190613650565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4191906137b0565b612f4b9190613611565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015612f8c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612fb49190810190613c8e565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613010573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130349190613bde565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa15801561308b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130af9190613d6f565b50509150915082816130c19190613742565b909110159695505050505050565b6000602082840312156130e157600080fd5b5035919050565b6001600160a01b0381168114612e4957600080fd5b6000806000806080858703121561311357600080fd5b843593506020850135613125816130e8565b93969395505050506040820135916060013590565b6000806040838503121561314d57600080fd5b8235613158816130e8565b91506020830135613168816130e8565b809150509250929050565b6000806040838503121561318657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156131ce576131ce613195565b60405290565b604051601f8201601f191681016001600160401b03811182821017156131fc576131fc613195565b604052919050565b60006001600160401b0383111561321d5761321d613195565b613230601f8401601f19166020016131d4565b905082815283838301111561324457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261326c57600080fd5b61182383833560208501613204565b6000806040838503121561328e57600080fd5b8235613299816130e8565b915060208301356001600160401b038111156132b457600080fd5b6132c08582860161325b565b9150509250929050565b6000806000606084860312156132df57600080fd5b505081359360208301359350604090920135919050565b60005b838110156133115781810151838201526020016132f9565b50506000910152565b600081518084526133328160208601602086016132f6565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000613367606083018461331a565b95945050505050565b60008083601f84011261338257600080fd5b5081356001600160401b0381111561339957600080fd5b6020830191508360208260051b85010111156133b457600080fd5b9250929050565b600080600080606085870312156133d157600080fd5b8435935060208501356001600160401b038111156133ee57600080fd5b6133fa87828801613370565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561344557835183529284019291840191600101613429565b50909695505050505050565b60008060006060848603121561346657600080fd5b8335613471816130e8565b92506020840135915060408401356001600160401b0381111561349357600080fd5b61349f8682870161325b565b9150509250925092565b60008060008060008060a087890312156134c257600080fd5b8635955060208701356001600160401b03808211156134e057600080fd5b6134ec8a838b01613370565b90975095506040890135945060608901359350608089013591508082111561351357600080fd5b508701601f8101891361352557600080fd5b61353489823560208401613204565b9150509295509295509295565b60006020828403121561355357600080fd5b8135611823816130e8565b60008060008060006080868803121561357657600080fd5b853594506020860135935060408601356001600160401b038082111561359b57600080fd5b818801915088601f8301126135af57600080fd5b8135818111156135be57600080fd5b8960208285010111156135d057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612dcd57612dcd6135fb565b80516001600160601b038116811461363b57600080fd5b919050565b8051801515811461363b57600080fd5b600080600080600060a0868803121561366857600080fd5b61367186613624565b94506020860151613681816130e8565b60408701519094506005811061369657600080fd5b92506136a460608701613640565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000806000606084860312156136e257600080fd5b835192506136f260208501613640565b915061370060408501613640565b90509250925092565b8082028115828204841417612dcd57612dcd6135fb565b60008261373d57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612dcd57612dcd6135fb565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561379f57600080fd5b505080516020909101519092909150565b6000602082840312156137c257600080fd5b5051919050565b6000602082840312156137db57600080fd5b61182382613640565b600181811c908216806137f857607f821691505b60208210810361381857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845461383e816137e4565b8060608701526080600180841660008114613860576001811461387a576138a8565b60ff1985168984015283151560051b8901830195506138a8565b896000528660002060005b858110156138a05781548b8201860152908301908801613885565b8a0184019650505b50939a9950505050505050505050565b600082516138ca8184602087016132f6565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b60006001820161391d5761391d6135fb565b5060010190565b81835260006001600160fb1b0383111561393d57600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061396a604083018587613924565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a0312156139d757600080fd5b6139e088613624565b96506139ee60208901613640565b955060408801519450606088015193506080880151925060a08801519150613a1860c08901613640565b905092959891949750929550565b604081526000613a3a604083018587613924565b8281036020840152613a4c818561331a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156116e257600081815260208120601f850160051c81016020861015613ac15750805b601f850160051c820191505b81811015613ae057828155600101613acd565b505050505050565b6001600160401b03831115613aff57613aff613195565b613b1383613b0d83546137e4565b83613a9a565b6000601f841160018114613b475760008515613b2f5750838201355b600019600387901b1c1916600186901b178355613ba1565b600083815260209020601f19861690835b82811015613b785786850135825560209485019460019092019101613b58565b5086821015613b955760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613bf057600080fd5b8151611823816130e8565b600082601f830112613c0c57600080fd5b815160206001600160401b03821115613c2757613c27613195565b8160051b613c368282016131d4565b9283528481018201928281019087851115613c5057600080fd5b83870192505b84831015613c78578251613c69816130e8565b82529183019190830190613c56565b979650505050505050565b805161363b816130e8565b600060208284031215613ca057600080fd5b81516001600160401b0380821115613cb757600080fd5b908301906101608286031215613ccc57600080fd5b613cd46131ab565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613d1c57600080fd5b613d2887828601613bfb565b60c08301525060e0838101519082015261010080840151908201526101209150613d53828401613c83565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613d8557600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cf67677608150ea7a2825f63646a3379b88eceb65b969ea68bd4dc1289ac3b9864736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c15780634fe264fb146102d457806352d1902d146102f4578063564a565d146103095780635c92e2f61461033857806365540b961461035857806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a23660046130cf565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f3660046130cf565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a3660046130cf565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046130fd565b610785565b34801561029857600080fd5b506102ac6102a736600461313a565b610b5b565b005b6102ac6102bc366004613173565b610c58565b6102ac6102cf36600461327b565b6114bf565b3480156102e057600080fd5b506102216102ef3660046132ca565b6116e7565b34801561030057600080fd5b5061022161182a565b34801561031557600080fd5b506103296103243660046130cf565b611888565b6040516101b393929190613346565b34801561034457600080fd5b506102ac6103533660046133bb565b61194e565b34801561036457600080fd5b506103786103733660046130cf565b611c5b565b6040516101b3919061340d565b34801561039157600080fd5b506103a56103a03660046132ca565b611d1f565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed3660046130cf565b611dd7565b3480156103fe57600080fd5b506102ac61040d366004613451565b611e4e565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac6104433660046134a9565b611f1a565b34801561045457600080fd5b506102ac610463366004613541565b6125f5565b34801561047457600080fd5b506104886104833660046132ca565b612641565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461355e565b612707565b3480156104f657600080fd5b506101a76105053660046132ca565b6128dc565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613173565b612977565b34801561054c57600080fd5b5061022161055b366004613173565b612c80565b34801561056c57600080fd5b506102ac61057b366004613541565b612dd3565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46135e5565b600091825260208220600590910201805490925082906105e690600190613611565b815481106105f6576105f66135e5565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436135e5565b6000918252602082206005909102018054909250829061066590600190613611565b81548110610675576106756135e5565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107169190613650565b5090935060049250610726915050565b816004811115610738576107386136b7565b0361077b57600061074888611c5b565b905080516001036107795780600081518110610766576107666135e5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190613650565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600086815260036020526040812054600280549091908110610873576108736135e5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106108a7576108a76135e5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610902573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092691906136cd565b5050600087815260078401602052604090205490915060ff16610970576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610ab5565b8086036109e55760008681526006830160205260409020546109935760006109de565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b86529093529220546109d49190613709565b6109de9190613720565b9450610ab5565b600081815260078301602052604090205460ff16610ab55781600601600083600a01600181548110610a1957610a196135e5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610a4f57610a4f6135e5565b9060005260206000200154815260200190815260200160002054610a739190613742565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610aa89190613709565b610ab29190613720565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610b4f576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610ba4575080546001600160401b03808416911610155b15610bc15760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610c7c57610c7c6135e5565b600091825260209091206002600590920201015460ff1615610cb05760405162461bcd60e51b815260040161084690613755565b600083815260036020526040812054600280549091908110610cd457610cd46135e5565b906000526020600020906005020190508060010154831115610d385760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da9919061378c565b91509150814210158015610dbc57508042105b610e015760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6691906136cd565b50509050868103610e7b576127109150610efc565b612710611388610e8b8686613611565b610e959190613709565b610e9f9190613720565b610ea98542613611565b10610ef65760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610f0f90600190613611565b81548110610f1f57610f1f6135e5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015610f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa291906137b0565b610fac9190613611565b60008a815260078401602052604090205490915060ff16156110105760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561105a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107e91906137b0565b9050600061271061108f8784613709565b6110999190613720565b6110a39083613742565b60008c8152600686016020526040812054919250908211156111545760008c815260068601602052604090205434906110dc9084613611565b116111015760008c81526006860160205260409020546110fc9083613611565b611103565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161114b929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f845290915281208054839290611180908490613742565b909155505060008c8152600686016020526040812080548392906111a5908490613742565b909155505060008c815260068601602052604090205482116112775760008c8152600686016020526040812054600987018054919290916111e7908490613742565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a85015460011015611482578285600901546112949190613611565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130691906137c9565b1561131f5760028a01805460ff19166001179055611402565b895460038b016000611332876001613742565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b81526004016113ad91815260200190565b602060405180830381865afa1580156113ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ee91906137b0565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161144f9392919061381e565b6000604051808303818588803b15801561146857600080fd5b505af115801561147c573d6000803e3d6000fd5b50505050505b803411156114b057336108fc6114988334613611565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b6114c882612e1f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061154657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661153a600080516020613da68339815191525490565b6001600160a01b031614155b156115645760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156115be575060408051601f3d908101601f191682019092526115bb918101906137b0565b60015b6115e657604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613da6833981519152811461161757604051632a87526960e21b815260048101829052602401610846565b600080516020613da68339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156116e2576000836001600160a01b03168360405161167e91906138b8565b600060405180830381855af49150503d80600081146116b9576040519150601f19603f3d011682016040523d82523d6000602084013e6116be565b606091505b50509050806116e0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b60008381526003602052604081205460028054839290811061170b5761170b6135e5565b6000918252602080832087845260036005909302019182019052604082205481549193508391811061173f5761173f6135e5565b90600052602060002090600c02016000018481548110611761576117616135e5565b600091825260208220600154604051631c3db16d60e01b815260048082018c905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa1580156117bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e391906136cd565b506003850154919350915060ff168015611807575081836002015414806118075750805b1561181a57612710945050505050611823565b60009450505050505b9392505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118755760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613da683398151915290565b6002818154811061189857600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff90911692916118cb906137e4565b80601f01602080910402602001604051908101604052809291908181526020018280546118f7906137e4565b80156119445780601f1061191957610100808354040283529160200191611944565b820191906000526020600020905b81548152906001019060200180831161192757829003601f168201915b5050505050905083565b600084815260036020526040902054600280548692908110611972576119726135e5565b600091825260209091206002600590920201015460ff16156119a65760405162461bcd60e51b815260040161084690613755565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa1580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190613650565b5090935060019250611a24915050565b816004811115611a3657611a366136b7565b14611a935760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611ad05760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611af457611af46135e5565b60009182526020822060059091020180549092508290611b1690600190613611565b81548110611b2657611b266135e5565b90600052602060002090600c0201905060005b86811015611bf4573382898984818110611b5557611b556135e5565b9050602002013581548110611b6c57611b6c6135e5565b60009182526020909120600490910201546001600160a01b031614611ba35760405162461bcd60e51b8152600401610846906138d4565b8582898984818110611bb757611bb76135e5565b9050602002013581548110611bce57611bce6135e5565b600091825260209091206001600490920201015580611bec8161390b565b915050611b39565b5086869050816005016000828254611c0c9190613742565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611c49908b908b908b90613956565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611c8157611c816135e5565b60009182526020822060059091020180549092508290611ca390600190613611565b81548110611cb357611cb36135e5565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d1157602002820191906000526020600020905b815481526020019060010190808311611cfd575b505050505092505050919050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611d5057611d506135e5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611d8457611d846135e5565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611dfb57611dfb6135e5565b60009182526020822060059091020180549092508290611e1d90600190613611565b81548110611e2d57611e2d6135e5565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611e785760405162461bcd60e51b81526004016108469061397a565b6000836001600160a01b03168383604051611e9391906138b8565b60006040518083038185875af1925050503d8060008114611ed0576040519150601f19603f3d011682016040523d82523d6000602084013e611ed5565b606091505b50509050806116e05760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611f3e57611f3e6135e5565b600091825260209091206002600590920201015460ff1615611f725760405162461bcd60e51b815260040161084690613755565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe09190613650565b5090935060029250611ff0915050565b816004811115612002576120026136b7565b1461205d5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561209f5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b6000888152600360205260408120546002805490919081106120c3576120c36135e5565b90600052602060002090600502019050806001015486111561211e5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b8054600090829061213190600190613611565b81548110612141576121416135e5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561219c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c09190613650565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa15801561221b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223f91906139bc565b505050505091505060005b8a8110156124bb5733848d8d84818110612266576122666135e5565b905060200201358154811061227d5761227d6135e5565b60009182526020909120600490910201546001600160a01b0316146122b45760405162461bcd60e51b8152600401610846906138d4565b811580612327575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106122fc576122fc6135e5565b9050602002013581548110612313576123136135e5565b906000526020600020906004020160010154145b6123995760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c838181106123ac576123ac6135e5565b90506020020135815481106123c3576123c36135e5565b600091825260209091206003600490920201015460ff161561241c5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d84818110612430576124306135e5565b9050602002013581548110612447576124476135e5565b60009182526020909120600260049092020101556001848d8d84818110612470576124706135e5565b9050602002013581548110612487576124876135e5565b60009182526020909120600490910201600301805460ff1916911515919091179055806124b38161390b565b91505061224a565b508a8a90508360040160008282546124d39190613742565b90915550506000898152600284016020526040812080548c92906124f8908490613742565b90915550506001830154890361252757600383015460ff16156125225760038301805460ff191690555b6125a0565b60018301546000908152600284016020526040808220548b83529120540361256957600383015460ff166125225760038301805460ff191660011790556125a0565b60018301546000908152600284016020526040808220548b835291205411156125a0576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c6040516125df93929190613a26565b60405180910390a4505050505050505050505050565b6000546001600160a01b0316331461261f5760405162461bcd60e51b81526004016108469061397a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061266f5761266f6135e5565b600091825260208083208a84526003600590930201918201905260408220548154919350839181106126a3576126a36135e5565b90600052602060002090600c020160000187815481106126c5576126c56135e5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127315760405162461bcd60e51b815260040161084690613a56565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2016127bc858783613ae8565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015612813573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283791906137b0565b6128419190613611565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108906128ca908a908a908a90613ba8565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612900576129006135e5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612934576129346135e5565b90600052602060002090600c02016000018481548110612956576129566135e5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b031633146129a45760405162461bcd60e51b815260040161084690613a56565b6000838152600360205260409020546002805485929081106129c8576129c86135e5565b600091825260209091206002600590920201015460ff16156129fc5760405162461bcd60e51b815260040161084690613755565b600084815260036020526040812054600280549091908110612a2057612a206135e5565b60009182526020822060059091020180549092508290612a4290600190613611565b81548110612a5257612a526135e5565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adb9190613bde565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b4e9190613650565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612bb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bd69190613bde565b9650612be28988612e4c565b15612c6f57604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612c74565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612ca457612ca46135e5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612cd857612cd86135e5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612d37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d5b91906136cd565b5091509150826004015460001480612d8a575080158015612d8a57506000828152600284016020526040902054155b15612d9c576000945050505050612dcd565b8015612db1575050600401549150612dcd9050565b506000908152600290910160205260409020549150612dcd9050565b92915050565b6000546001600160a01b03163314612dfd5760405162461bcd60e51b81526004016108469061397a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612e495760405162461bcd60e51b81526004016108469061397a565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ebe9190613650565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4191906137b0565b612f4b9190613611565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015612f8c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612fb49190810190613c8e565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613010573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130349190613bde565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa15801561308b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130af9190613d6f565b50509150915082816130c19190613742565b909110159695505050505050565b6000602082840312156130e157600080fd5b5035919050565b6001600160a01b0381168114612e4957600080fd5b6000806000806080858703121561311357600080fd5b843593506020850135613125816130e8565b93969395505050506040820135916060013590565b6000806040838503121561314d57600080fd5b8235613158816130e8565b91506020830135613168816130e8565b809150509250929050565b6000806040838503121561318657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156131ce576131ce613195565b60405290565b604051601f8201601f191681016001600160401b03811182821017156131fc576131fc613195565b604052919050565b60006001600160401b0383111561321d5761321d613195565b613230601f8401601f19166020016131d4565b905082815283838301111561324457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261326c57600080fd5b61182383833560208501613204565b6000806040838503121561328e57600080fd5b8235613299816130e8565b915060208301356001600160401b038111156132b457600080fd5b6132c08582860161325b565b9150509250929050565b6000806000606084860312156132df57600080fd5b505081359360208301359350604090920135919050565b60005b838110156133115781810151838201526020016132f9565b50506000910152565b600081518084526133328160208601602086016132f6565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000613367606083018461331a565b95945050505050565b60008083601f84011261338257600080fd5b5081356001600160401b0381111561339957600080fd5b6020830191508360208260051b85010111156133b457600080fd5b9250929050565b600080600080606085870312156133d157600080fd5b8435935060208501356001600160401b038111156133ee57600080fd5b6133fa87828801613370565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561344557835183529284019291840191600101613429565b50909695505050505050565b60008060006060848603121561346657600080fd5b8335613471816130e8565b92506020840135915060408401356001600160401b0381111561349357600080fd5b61349f8682870161325b565b9150509250925092565b60008060008060008060a087890312156134c257600080fd5b8635955060208701356001600160401b03808211156134e057600080fd5b6134ec8a838b01613370565b90975095506040890135945060608901359350608089013591508082111561351357600080fd5b508701601f8101891361352557600080fd5b61353489823560208401613204565b9150509295509295509295565b60006020828403121561355357600080fd5b8135611823816130e8565b60008060008060006080868803121561357657600080fd5b853594506020860135935060408601356001600160401b038082111561359b57600080fd5b818801915088601f8301126135af57600080fd5b8135818111156135be57600080fd5b8960208285010111156135d057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612dcd57612dcd6135fb565b80516001600160601b038116811461363b57600080fd5b919050565b8051801515811461363b57600080fd5b600080600080600060a0868803121561366857600080fd5b61367186613624565b94506020860151613681816130e8565b60408701519094506005811061369657600080fd5b92506136a460608701613640565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000806000606084860312156136e257600080fd5b835192506136f260208501613640565b915061370060408501613640565b90509250925092565b8082028115828204841417612dcd57612dcd6135fb565b60008261373d57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612dcd57612dcd6135fb565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561379f57600080fd5b505080516020909101519092909150565b6000602082840312156137c257600080fd5b5051919050565b6000602082840312156137db57600080fd5b61182382613640565b600181811c908216806137f857607f821691505b60208210810361381857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845461383e816137e4565b8060608701526080600180841660008114613860576001811461387a576138a8565b60ff1985168984015283151560051b8901830195506138a8565b896000528660002060005b858110156138a05781548b8201860152908301908801613885565b8a0184019650505b50939a9950505050505050505050565b600082516138ca8184602087016132f6565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b60006001820161391d5761391d6135fb565b5060010190565b81835260006001600160fb1b0383111561393d57600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061396a604083018587613924565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a0312156139d757600080fd5b6139e088613624565b96506139ee60208901613640565b955060408801519450606088015193506080880151925060a08801519150613a1860c08901613640565b905092959891949750929550565b604081526000613a3a604083018587613924565b8281036020840152613a4c818561331a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156116e257600081815260208120601f850160051c81016020861015613ac15750805b601f850160051c820191505b81811015613ae057828155600101613acd565b505050505050565b6001600160401b03831115613aff57613aff613195565b613b1383613b0d83546137e4565b83613a9a565b6000601f841160018114613b475760008515613b2f5750838201355b600019600387901b1c1916600186901b178355613ba1565b600083815260209020601f19861690835b82811015613b785786850135825560209485019460019092019101613b58565b5086821015613b955760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613bf057600080fd5b8151611823816130e8565b600082601f830112613c0c57600080fd5b815160206001600160401b03821115613c2757613c27613195565b8160051b613c368282016131d4565b9283528481018201928281019087851115613c5057600080fd5b83870192505b84831015613c78578251613c69816130e8565b82529183019190830190613c56565b979650505050505050565b805161363b816130e8565b600060208284031215613ca057600080fd5b81516001600160401b0380821115613cb757600080fd5b908301906101608286031215613ccc57600080fd5b613cd46131ab565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613d1c57600080fd5b613d2887828601613bfb565b60c08301525060e0838101519082015261010080840151908201526101209150613d53828401613c83565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613d8557600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220cf67677608150ea7a2825f63646a3379b88eceb65b969ea68bd4dc1289ac3b9864736f6c63430008120033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":[],\"name\":\"initialize2\",\"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\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"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\"}]},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __DisputeKitClassicBase_initialize(_governor, _core);\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0xa3633f78ef652659c2ef88fd20a5565e4d0148e20a61c4ccca9e37204df7dadf\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n // ************************************* //\\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 mapping(address drawnAddress => bool) alreadyDrawn; // Set to 'true' if the address has already been drawn, so it can't be drawn more than once.\\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 bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\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 Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n function __DisputeKitClassicBase_initialize(address _governor, KlerosCore _core) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************ //\\n // * Governance * //\\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 drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n round.alreadyDrawn[drawnAddress] = true;\\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 /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless since we check for insolvency anyway.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n (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 result = totalStaked >= totalLocked + lockedAmountPerJuror;\\n\\n if (singleDrawPerJuror) {\\n result = result && !_round.alreadyDrawn[_juror];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x243af54007e2a208797bb56f6b576f68bdb5c0b932cd6df22375d646491318e1\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516140c96200010360003960008181611692015281816116bb01526118b301526140c96000f3fe6080604052600436106101a35760003560e01c806369f3f041116100e2578063b6ede54011610085578063b6ede54014610558578063ba66fde714610578578063be46760414610598578063d2b8035a146105ae578063da3beb8c146105ce578063e349ad30146104a0578063e4c0aaf4146105ee578063f2f4eb261461060e57600080fd5b806369f3f041146104135780636d4cd8ea14610460578063751accd014610480578063796490f9146104a05780637c04034e146104b65780638e426460146104d6578063a7cc08fe146104f6578063b34bfaa81461054257600080fd5b80634b2f0ea01161014a5780634b2f0ea0146102fe5780634f1ef2861461031157806352d1902d1461032457806354fd4d5014610339578063564a565d146103775780635c92e2f6146103a657806365540b96146103c6578063675926f6146103f357600080fd5b80630baa64d1146101a85780630c340a24146101dd5780631200aabc146102155780631c3db16d146102505780632621b9a21461028d578063362c3479146102a7578063472abf68146102c7578063485cc955146102de575b600080fd5b3480156101b457600080fd5b506101c86101c3366004613363565b61062e565b60405190151581526020015b60405180910390f35b3480156101e957600080fd5b506000546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b34801561022157600080fd5b50610242610230366004613363565b60036020526000908152604090205481565b6040519081526020016101d4565b34801561025c57600080fd5b5061027061026b366004613363565b6106a5565b6040805193845291151560208401521515908201526060016101d4565b34801561029957600080fd5b506004546101c89060ff1681565b3480156102b357600080fd5b506102426102c2366004613391565b610813565b3480156102d357600080fd5b506102dc610c9e565b005b3480156102ea57600080fd5b506102dc6102f93660046133ce565b610d4f565b6102dc61030c366004613407565b610e17565b6102dc61031f366004613516565b61167e565b34801561033057600080fd5b506102426118a6565b34801561034557600080fd5b5061036a604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516101d491906135b5565b34801561038357600080fd5b50610397610392366004613363565b611904565b6040516101d4939291906135c8565b3480156103b257600080fd5b506102dc6103c1366004613634565b6119ca565b3480156103d257600080fd5b506103e66103e1366004613363565b611ccf565b6040516101d49190613686565b3480156103ff57600080fd5b5061024261040e3660046136ca565b611d93565b34801561041f57600080fd5b5061043361042e366004613705565b611ed8565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101d4565b34801561046c57600080fd5b506101c861047b366004613363565b611f90565b34801561048c57600080fd5b506102dc61049b366004613731565b612007565b3480156104ac57600080fd5b5061024261271081565b3480156104c257600080fd5b506102dc6104d1366004613789565b6120d3565b3480156104e257600080fd5b506102dc6104f1366004613821565b6127a4565b34801561050257600080fd5b50610516610511366004613705565b6127f0565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101d4565b34801561054e57600080fd5b50610242614e2081565b34801561056457600080fd5b506102dc61057336600461383e565b6128b6565b34801561058457600080fd5b506101c8610593366004613705565b612a8b565b3480156105a457600080fd5b5061024261138881565b3480156105ba57600080fd5b506101fd6105c9366004613407565b612b26565b3480156105da57600080fd5b506102426105e9366004613407565b612e40565b3480156105fa57600080fd5b506102dc610609366004613821565b612f93565b34801561061a57600080fd5b506001546101fd906001600160a01b031681565b600081815260036020526040812054600280548392908110610652576106526138c5565b60009182526020822060059091020180549092508290610674906001906138f1565b81548110610684576106846138c5565b60009182526020909120600d90910201805460059091015414949350505050565b60008060008060026003600087815260200190815260200160002054815481106106d1576106d16138c5565b600091825260208220600590910201805490925082906106f3906001906138f1565b81548110610703576107036138c5565b60009182526020909120600d90910201600381015460ff16945090508361072e578060010154610731565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190613930565b50909350600492506107b4915050565b8160048111156107c6576107c6613997565b036108095760006107d688611ccf565b9050805160010361080757806000815181106107f4576107f46138c5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108859190613930565b509350505050806108dd5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095491906139ad565b156109925760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b60448201526064016108d4565b6000868152600360205260408120546002805490919081106109b6576109b66138c5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106109ea576109ea6138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600d9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906139c8565b5050600087815260078401602052604090205490915060ff16610ab3576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610bf8565b808603610b28576000868152600683016020526040902054610ad6576000610b21565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610b179190613a04565b610b219190613a1b565b9450610bf8565b600081815260078301602052604090205460ff16610bf85781600601600083600a01600181548110610b5c57610b5c6138c5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b9257610b926138c5565b9060005260206000200154815260200190815260200160002054610bb69190613a3d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610beb9190613a04565b610bf59190613a1b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c92576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b60026000610caa612fdf565b8054909150600160401b900460ff1680610cd1575080546001600160401b03808416911610155b15610cee5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60016000610d5b612fdf565b8054909150600160401b900460ff1680610d82575080546001600160401b03808416911610155b15610d9f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610dca8484613003565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610e3b57610e3b6138c5565b600091825260209091206002600590920201015460ff1615610e6f5760405162461bcd60e51b81526004016108d490613a50565b600083815260036020526040812054600280549091908110610e9357610e936138c5565b906000526020600020906005020190508060010154831115610ef75760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e60448201526064016108d4565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190613a87565b91509150814210158015610f7b57508042105b610fc05760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b60448201526064016108d4565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102591906139c8565b5050905086810361103a5761271091506110bb565b61271061138861104a86866138f1565b6110549190613a04565b61105e9190613a1b565b61106885426138f1565b106110b55760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f7365720060448201526064016108d4565b614e2091505b845460009086906110ce906001906138f1565b815481106110de576110de6138c5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600d949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561113d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111619190613aab565b61116b91906138f1565b60008a815260078401602052604090205490915060ff16156111cf5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e000000000060448201526064016108d4565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa158015611219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123d9190613aab565b9050600061271061124e8784613a04565b6112589190613a1b565b6112629083613a3d565b60008c8152600686016020526040812054919250908211156113135760008c8152600686016020526040902054349061129b90846138f1565b116112c05760008c81526006860160205260409020546112bb90836138f1565b6112c2565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161130a929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061133f908490613a3d565b909155505060008c815260068601602052604081208054839290611364908490613a3d565b909155505060008c815260068601602052604090205482116114365760008c8152600686016020526040812054600987018054919290916113a6908490613a3d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156116415782856009015461145391906138f1565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906139ad565b156114de5760028a01805460ff191660011790556115c1565b895460038b0160006114f1876001613a3d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600d02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161156c91815260200190565b602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190613aab565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161160e93929190613afe565b6000604051808303818588803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b50505050505b8034111561166f57336108fc61165783346138f1565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61168782613039565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061170557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116f96000805160206140748339815191525490565b6001600160a01b031614155b156117235760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561177d575060408051601f3d908101601f1916820190925261177a91810190613aab565b60015b6117a557604051630c76093760e01b81526001600160a01b03831660048201526024016108d4565b60008051602061407483398151915281146117d657604051632a87526960e21b8152600481018290526024016108d4565b6000805160206140748339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118a1576000836001600160a01b03168360405161183d9190613b9d565b600060405180830381855af49150503d8060008114611878576040519150601f19603f3d011682016040523d82523d6000602084013e61187d565b606091505b505090508061189f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118f15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061407483398151915290565b6002818154811061191457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161194790613ac4565b80601f016020809104026020016040519081016040528092919081815260200182805461197390613ac4565b80156119c05780601f10611995576101008083540402835291602001916119c0565b820191906000526020600020905b8154815290600101906020018083116119a357829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106119ee576119ee6138c5565b600091825260209091206002600590920201015460ff1615611a225760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a909190613930565b5090935060019250611aa0915050565b816004811115611ab257611ab2613997565b14611b0f5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b60648201526084016108d4565b82611b4c5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b60448201526064016108d4565b600086815260036020526040812054600280549091908110611b7057611b706138c5565b60009182526020822060059091020180549092508290611b92906001906138f1565b81548110611ba257611ba26138c5565b90600052602060002090600d0201905060005b86811015611c68573382898984818110611bd157611bd16138c5565b9050602002013581548110611be857611be86138c5565b60009182526020909120600490910201546001600160a01b031614611c1f5760405162461bcd60e51b81526004016108d490613bb9565b8582898984818110611c3357611c336138c5565b9050602002013581548110611c4a57611c4a6138c5565b60009182526020909120600160049092020181019190915501611bb5565b5086869050816005016000828254611c809190613a3d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611cbd908b908b908b90613c22565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611cf557611cf56138c5565b60009182526020822060059091020180549092508290611d17906001906138f1565b81548110611d2757611d276138c5565b90600052602060002090600d0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d8557602002820191906000526020600020905b815481526020019060010190808311611d71575b505050505092505050919050565b600085815260036020526040812054600280548392908110611db757611db76138c5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611deb57611deb6138c5565b90600052602060002090600d02016000018681548110611e0d57611e0d6138c5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f91906139c8565b506003850154919350915060ff168015611eb357508183600201541480611eb35750805b15611ec657612710945050505050611ecf565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611f0957611f096138c5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611f3d57611f3d6138c5565b600091825260208083206001600d909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611fb457611fb46138c5565b60009182526020822060059091020180549092508290611fd6906001906138f1565b81548110611fe657611fe66138c5565b60009182526020909120600d90910201805460049091015414949350505050565b6000546001600160a01b031633146120315760405162461bcd60e51b81526004016108d490613c46565b6000836001600160a01b0316838360405161204c9190613b9d565b60006040518083038185875af1925050503d8060008114612089576040519150601f19603f3d011682016040523d82523d6000602084013e61208e565b606091505b505090508061189f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b60448201526064016108d4565b6000868152600360205260409020546002805488929081106120f7576120f76138c5565b600091825260209091206002600590920201015460ff161561212b5760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190613930565b50909350600292506121a9915050565b8160048111156121bb576121bb613997565b146122165760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b60648201526084016108d4565b856122585760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b60448201526064016108d4565b60008881526003602052604081205460028054909190811061227c5761227c6138c5565b9060005260206000209060050201905080600101548611156122d75760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b60448201526064016108d4565b805460009082906122ea906001906138f1565b815481106122fa576122fa6138c5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600d9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123799190613930565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156123d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f89190613c88565b505050505091505060005b8a81101561266a5733848d8d8481811061241f5761241f6138c5565b9050602002013581548110612436576124366138c5565b60009182526020909120600490910201546001600160a01b03161461246d5760405162461bcd60e51b81526004016108d490613bb9565b8115806124e0575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106124b5576124b56138c5565b90506020020135815481106124cc576124cc6138c5565b906000526020600020906004020160010154145b6125525760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e00000060648201526084016108d4565b838c8c83818110612565576125656138c5565b905060200201358154811061257c5761257c6138c5565b600091825260209091206003600490920201015460ff16156125d55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b60448201526064016108d4565b89848d8d848181106125e9576125e96138c5565b9050602002013581548110612600576126006138c5565b60009182526020909120600260049092020101556001848d8d84818110612629576126296138c5565b9050602002013581548110612640576126406138c5565b60009182526020909120600490910201600301805460ff1916911515919091179055600101612403565b508a8a90508360040160008282546126829190613a3d565b90915550506000898152600284016020526040812080548c92906126a7908490613a3d565b9091555050600183015489036126d657600383015460ff16156126d15760038301805460ff191690555b61274f565b60018301546000908152600284016020526040808220548b83529120540361271857600383015460ff166126d15760038301805460ff1916600117905561274f565b60018301546000908152600284016020526040808220548b8352912054111561274f576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161278e93929190613cf2565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146127ce5760405162461bcd60e51b81526004016108d490613c46565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061281e5761281e6138c5565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612852576128526138c5565b90600052602060002090600d02016000018781548110612874576128746138c5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146128e05760405162461bcd60e51b81526004016108d490613d22565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161296b858783613db6565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190613aab565b6129f091906138f1565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600d909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612a79908a908a908a90613e76565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612aaf57612aaf6138c5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612ae357612ae36138c5565b90600052602060002090600d02016000018481548110612b0557612b056138c5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612b535760405162461bcd60e51b81526004016108d490613d22565b600083815260036020526040902054600280548592908110612b7757612b776138c5565b600091825260209091206002600590920201015460ff1615612bab5760405162461bcd60e51b81526004016108d490613a50565b600084815260036020526040812054600280549091908110612bcf57612bcf6138c5565b60009182526020822060059091020180549092508290612bf1906001906138f1565b81548110612c0157612c016138c5565b90600052602060002090600d020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8a9190613eac565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613930565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d859190613eac565b9650612d92848a89613066565b15612e2f57604080516080810182526001600160a01b03808a1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff19958616179055918152600c8901909152929092208054909216179055612e34565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612e6457612e646138c5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612e9857612e986138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600d93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1b91906139c8565b5091509150826004015460001480612f4a575080158015612f4a57506000828152600284016020526040902054155b15612f5c576000945050505050612f8d565b8015612f71575050600401549150612f8d9050565b506000908152600290910160205260409020549150612f8d9050565b92915050565b6000546001600160a01b03163314612fbd5760405162461bcd60e51b81526004016108d490613c46565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61300b613322565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b6000546001600160a01b031633146130635760405162461bcd60e51b81526004016108d490613c46565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d89190613930565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b9190613aab565b61316591906138f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa1580156131a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131ce9190810190613f5c565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561322a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324e9190613eac565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa1580156132a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c9919061403d565b50509150915082816132db9190613a3d565b60045490831015955060ff16156133175784801561331457506001600160a01b0386166000908152600c8901602052604090205460ff16155b94505b505050509392505050565b61332a613349565b61334757604051631afcd79f60e31b815260040160405180910390fd5b565b6000613353612fdf565b54600160401b900460ff16919050565b60006020828403121561337557600080fd5b5035919050565b6001600160a01b038116811461306357600080fd5b600080600080608085870312156133a757600080fd5b8435935060208501356133b98161337c565b93969395505050506040820135916060013590565b600080604083850312156133e157600080fd5b82356133ec8161337c565b915060208301356133fc8161337c565b809150509250929050565b6000806040838503121561341a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561346257613462613429565b60405290565b604051601f8201601f191681016001600160401b038111828210171561349057613490613429565b604052919050565b60006001600160401b038311156134b1576134b1613429565b6134c4601f8401601f1916602001613468565b90508281528383830111156134d857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261350057600080fd5b61350f83833560208501613498565b9392505050565b6000806040838503121561352957600080fd5b82356135348161337c565b915060208301356001600160401b0381111561354f57600080fd5b61355b858286016134ef565b9150509250929050565b60005b83811015613580578181015183820152602001613568565b50506000910152565b600081518084526135a1816020860160208601613565565b601f01601f19169290920160200192915050565b60208152600061350f6020830184613589565b8381528215156020820152606060408201526000611ecf6060830184613589565b60008083601f8401126135fb57600080fd5b5081356001600160401b0381111561361257600080fd5b6020830191508360208260051b850101111561362d57600080fd5b9250929050565b6000806000806060858703121561364a57600080fd5b8435935060208501356001600160401b0381111561366757600080fd5b613673878288016135e9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156136be578351835292840192918401916001016136a2565b50909695505050505050565b600080600080600060a086880312156136e257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561371a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561374657600080fd5b83356137518161337c565b92506020840135915060408401356001600160401b0381111561377357600080fd5b61377f868287016134ef565b9150509250925092565b60008060008060008060a087890312156137a257600080fd5b8635955060208701356001600160401b03808211156137c057600080fd5b6137cc8a838b016135e9565b9097509550604089013594506060890135935060808901359150808211156137f357600080fd5b508701601f8101891361380557600080fd5b61381489823560208401613498565b9150509295509295509295565b60006020828403121561383357600080fd5b813561350f8161337c565b60008060008060006080868803121561385657600080fd5b853594506020860135935060408601356001600160401b038082111561387b57600080fd5b818801915088601f83011261388f57600080fd5b81358181111561389e57600080fd5b8960208285010111156138b057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f8d57612f8d6138db565b80516001600160601b038116811461391b57600080fd5b919050565b8051801515811461391b57600080fd5b600080600080600060a0868803121561394857600080fd5b61395186613904565b945060208601516139618161337c565b60408701519094506005811061397657600080fd5b925061398460608701613920565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156139bf57600080fd5b61350f82613920565b6000806000606084860312156139dd57600080fd5b835192506139ed60208501613920565b91506139fb60408501613920565b90509250925092565b8082028115828204841417612f8d57612f8d6138db565b600082613a3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612f8d57612f8d6138db565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60008060408385031215613a9a57600080fd5b505080516020909101519092909150565b600060208284031215613abd57600080fd5b5051919050565b600181811c90821680613ad857607f821691505b602082108103613af857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208460208401526060604084015260008454613b1f81613ac4565b8060608701526080600180841660008114613b415760018114613b5d57613b8d565b60ff19851660808a0152608084151560051b8a01019550613b8d565b89600052602060002060005b85811015613b845781548b8201860152908301908801613b69565b8a016080019650505b50939a9950505050505050505050565b60008251613baf818460208701613565565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613c0957600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613c36604083018587613bf0565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ca357600080fd5b613cac88613904565b9650613cba60208901613920565b955060408801519450606088015193506080880151925060a08801519150613ce460c08901613920565b905092959891949750929550565b604081526000613d06604083018587613bf0565b8281036020840152613d188185613589565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156118a1576000816000526020600020601f850160051c81016020861015613d8f5750805b601f850160051c820191505b81811015613dae57828155600101613d9b565b505050505050565b6001600160401b03831115613dcd57613dcd613429565b613de183613ddb8354613ac4565b83613d66565b6000601f841160018114613e155760008515613dfd5750838201355b600019600387901b1c1916600186901b178355613e6f565b600083815260209020601f19861690835b82811015613e465786850135825560209485019460019092019101613e26565b5086821015613e635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ebe57600080fd5b815161350f8161337c565b600082601f830112613eda57600080fd5b815160206001600160401b03821115613ef557613ef5613429565b8160051b613f04828201613468565b9283528481018201928281019087851115613f1e57600080fd5b83870192505b84831015613f46578251613f378161337c565b82529183019190830190613f24565b979650505050505050565b805161391b8161337c565b600060208284031215613f6e57600080fd5b81516001600160401b0380821115613f8557600080fd5b908301906101608286031215613f9a57600080fd5b613fa261343f565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613fea57600080fd5b613ff687828601613ec9565b60c08301525060e0838101519082015261010080840151908201526101209150614021828401613f51565b9181019190915261014091820151918101919091529392505050565b6000806000806080858703121561405357600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dbc0f07975f24862ef29107d65fe042a587199d6ad1f6756f0fbf8ad88bad54664736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106101a35760003560e01c806369f3f041116100e2578063b6ede54011610085578063b6ede54014610558578063ba66fde714610578578063be46760414610598578063d2b8035a146105ae578063da3beb8c146105ce578063e349ad30146104a0578063e4c0aaf4146105ee578063f2f4eb261461060e57600080fd5b806369f3f041146104135780636d4cd8ea14610460578063751accd014610480578063796490f9146104a05780637c04034e146104b65780638e426460146104d6578063a7cc08fe146104f6578063b34bfaa81461054257600080fd5b80634b2f0ea01161014a5780634b2f0ea0146102fe5780634f1ef2861461031157806352d1902d1461032457806354fd4d5014610339578063564a565d146103775780635c92e2f6146103a657806365540b96146103c6578063675926f6146103f357600080fd5b80630baa64d1146101a85780630c340a24146101dd5780631200aabc146102155780631c3db16d146102505780632621b9a21461028d578063362c3479146102a7578063472abf68146102c7578063485cc955146102de575b600080fd5b3480156101b457600080fd5b506101c86101c3366004613363565b61062e565b60405190151581526020015b60405180910390f35b3480156101e957600080fd5b506000546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b34801561022157600080fd5b50610242610230366004613363565b60036020526000908152604090205481565b6040519081526020016101d4565b34801561025c57600080fd5b5061027061026b366004613363565b6106a5565b6040805193845291151560208401521515908201526060016101d4565b34801561029957600080fd5b506004546101c89060ff1681565b3480156102b357600080fd5b506102426102c2366004613391565b610813565b3480156102d357600080fd5b506102dc610c9e565b005b3480156102ea57600080fd5b506102dc6102f93660046133ce565b610d4f565b6102dc61030c366004613407565b610e17565b6102dc61031f366004613516565b61167e565b34801561033057600080fd5b506102426118a6565b34801561034557600080fd5b5061036a604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516101d491906135b5565b34801561038357600080fd5b50610397610392366004613363565b611904565b6040516101d4939291906135c8565b3480156103b257600080fd5b506102dc6103c1366004613634565b6119ca565b3480156103d257600080fd5b506103e66103e1366004613363565b611ccf565b6040516101d49190613686565b3480156103ff57600080fd5b5061024261040e3660046136ca565b611d93565b34801561041f57600080fd5b5061043361042e366004613705565b611ed8565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101d4565b34801561046c57600080fd5b506101c861047b366004613363565b611f90565b34801561048c57600080fd5b506102dc61049b366004613731565b612007565b3480156104ac57600080fd5b5061024261271081565b3480156104c257600080fd5b506102dc6104d1366004613789565b6120d3565b3480156104e257600080fd5b506102dc6104f1366004613821565b6127a4565b34801561050257600080fd5b50610516610511366004613705565b6127f0565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101d4565b34801561054e57600080fd5b50610242614e2081565b34801561056457600080fd5b506102dc61057336600461383e565b6128b6565b34801561058457600080fd5b506101c8610593366004613705565b612a8b565b3480156105a457600080fd5b5061024261138881565b3480156105ba57600080fd5b506101fd6105c9366004613407565b612b26565b3480156105da57600080fd5b506102426105e9366004613407565b612e40565b3480156105fa57600080fd5b506102dc610609366004613821565b612f93565b34801561061a57600080fd5b506001546101fd906001600160a01b031681565b600081815260036020526040812054600280548392908110610652576106526138c5565b60009182526020822060059091020180549092508290610674906001906138f1565b81548110610684576106846138c5565b60009182526020909120600d90910201805460059091015414949350505050565b60008060008060026003600087815260200190815260200160002054815481106106d1576106d16138c5565b600091825260208220600590910201805490925082906106f3906001906138f1565b81548110610703576107036138c5565b60009182526020909120600d90910201600381015460ff16945090508361072e578060010154610731565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190613930565b50909350600492506107b4915050565b8160048111156107c6576107c6613997565b036108095760006107d688611ccf565b9050805160010361080757806000815181106107f4576107f46138c5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108859190613930565b509350505050806108dd5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095491906139ad565b156109925760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b60448201526064016108d4565b6000868152600360205260408120546002805490919081106109b6576109b66138c5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106109ea576109ea6138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600d9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906139c8565b5050600087815260078401602052604090205490915060ff16610ab3576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610bf8565b808603610b28576000868152600683016020526040902054610ad6576000610b21565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610b179190613a04565b610b219190613a1b565b9450610bf8565b600081815260078301602052604090205460ff16610bf85781600601600083600a01600181548110610b5c57610b5c6138c5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b9257610b926138c5565b9060005260206000200154815260200190815260200160002054610bb69190613a3d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610beb9190613a04565b610bf59190613a1b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c92576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b60026000610caa612fdf565b8054909150600160401b900460ff1680610cd1575080546001600160401b03808416911610155b15610cee5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60016000610d5b612fdf565b8054909150600160401b900460ff1680610d82575080546001600160401b03808416911610155b15610d9f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610dca8484613003565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610e3b57610e3b6138c5565b600091825260209091206002600590920201015460ff1615610e6f5760405162461bcd60e51b81526004016108d490613a50565b600083815260036020526040812054600280549091908110610e9357610e936138c5565b906000526020600020906005020190508060010154831115610ef75760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e60448201526064016108d4565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190613a87565b91509150814210158015610f7b57508042105b610fc05760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b60448201526064016108d4565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102591906139c8565b5050905086810361103a5761271091506110bb565b61271061138861104a86866138f1565b6110549190613a04565b61105e9190613a1b565b61106885426138f1565b106110b55760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f7365720060448201526064016108d4565b614e2091505b845460009086906110ce906001906138f1565b815481106110de576110de6138c5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600d949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561113d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111619190613aab565b61116b91906138f1565b60008a815260078401602052604090205490915060ff16156111cf5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e000000000060448201526064016108d4565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa158015611219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123d9190613aab565b9050600061271061124e8784613a04565b6112589190613a1b565b6112629083613a3d565b60008c8152600686016020526040812054919250908211156113135760008c8152600686016020526040902054349061129b90846138f1565b116112c05760008c81526006860160205260409020546112bb90836138f1565b6112c2565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161130a929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061133f908490613a3d565b909155505060008c815260068601602052604081208054839290611364908490613a3d565b909155505060008c815260068601602052604090205482116114365760008c8152600686016020526040812054600987018054919290916113a6908490613a3d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156116415782856009015461145391906138f1565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906139ad565b156114de5760028a01805460ff191660011790556115c1565b895460038b0160006114f1876001613a3d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600d02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161156c91815260200190565b602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190613aab565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161160e93929190613afe565b6000604051808303818588803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b50505050505b8034111561166f57336108fc61165783346138f1565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61168782613039565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061170557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116f96000805160206140748339815191525490565b6001600160a01b031614155b156117235760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561177d575060408051601f3d908101601f1916820190925261177a91810190613aab565b60015b6117a557604051630c76093760e01b81526001600160a01b03831660048201526024016108d4565b60008051602061407483398151915281146117d657604051632a87526960e21b8152600481018290526024016108d4565b6000805160206140748339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118a1576000836001600160a01b03168360405161183d9190613b9d565b600060405180830381855af49150503d8060008114611878576040519150601f19603f3d011682016040523d82523d6000602084013e61187d565b606091505b505090508061189f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118f15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061407483398151915290565b6002818154811061191457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161194790613ac4565b80601f016020809104026020016040519081016040528092919081815260200182805461197390613ac4565b80156119c05780601f10611995576101008083540402835291602001916119c0565b820191906000526020600020905b8154815290600101906020018083116119a357829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106119ee576119ee6138c5565b600091825260209091206002600590920201015460ff1615611a225760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a909190613930565b5090935060019250611aa0915050565b816004811115611ab257611ab2613997565b14611b0f5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b60648201526084016108d4565b82611b4c5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b60448201526064016108d4565b600086815260036020526040812054600280549091908110611b7057611b706138c5565b60009182526020822060059091020180549092508290611b92906001906138f1565b81548110611ba257611ba26138c5565b90600052602060002090600d0201905060005b86811015611c68573382898984818110611bd157611bd16138c5565b9050602002013581548110611be857611be86138c5565b60009182526020909120600490910201546001600160a01b031614611c1f5760405162461bcd60e51b81526004016108d490613bb9565b8582898984818110611c3357611c336138c5565b9050602002013581548110611c4a57611c4a6138c5565b60009182526020909120600160049092020181019190915501611bb5565b5086869050816005016000828254611c809190613a3d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611cbd908b908b908b90613c22565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611cf557611cf56138c5565b60009182526020822060059091020180549092508290611d17906001906138f1565b81548110611d2757611d276138c5565b90600052602060002090600d0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d8557602002820191906000526020600020905b815481526020019060010190808311611d71575b505050505092505050919050565b600085815260036020526040812054600280548392908110611db757611db76138c5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611deb57611deb6138c5565b90600052602060002090600d02016000018681548110611e0d57611e0d6138c5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f91906139c8565b506003850154919350915060ff168015611eb357508183600201541480611eb35750805b15611ec657612710945050505050611ecf565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611f0957611f096138c5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611f3d57611f3d6138c5565b600091825260208083206001600d909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611fb457611fb46138c5565b60009182526020822060059091020180549092508290611fd6906001906138f1565b81548110611fe657611fe66138c5565b60009182526020909120600d90910201805460049091015414949350505050565b6000546001600160a01b031633146120315760405162461bcd60e51b81526004016108d490613c46565b6000836001600160a01b0316838360405161204c9190613b9d565b60006040518083038185875af1925050503d8060008114612089576040519150601f19603f3d011682016040523d82523d6000602084013e61208e565b606091505b505090508061189f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b60448201526064016108d4565b6000868152600360205260409020546002805488929081106120f7576120f76138c5565b600091825260209091206002600590920201015460ff161561212b5760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190613930565b50909350600292506121a9915050565b8160048111156121bb576121bb613997565b146122165760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b60648201526084016108d4565b856122585760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b60448201526064016108d4565b60008881526003602052604081205460028054909190811061227c5761227c6138c5565b9060005260206000209060050201905080600101548611156122d75760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b60448201526064016108d4565b805460009082906122ea906001906138f1565b815481106122fa576122fa6138c5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600d9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123799190613930565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156123d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f89190613c88565b505050505091505060005b8a81101561266a5733848d8d8481811061241f5761241f6138c5565b9050602002013581548110612436576124366138c5565b60009182526020909120600490910201546001600160a01b03161461246d5760405162461bcd60e51b81526004016108d490613bb9565b8115806124e0575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106124b5576124b56138c5565b90506020020135815481106124cc576124cc6138c5565b906000526020600020906004020160010154145b6125525760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e00000060648201526084016108d4565b838c8c83818110612565576125656138c5565b905060200201358154811061257c5761257c6138c5565b600091825260209091206003600490920201015460ff16156125d55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b60448201526064016108d4565b89848d8d848181106125e9576125e96138c5565b9050602002013581548110612600576126006138c5565b60009182526020909120600260049092020101556001848d8d84818110612629576126296138c5565b9050602002013581548110612640576126406138c5565b60009182526020909120600490910201600301805460ff1916911515919091179055600101612403565b508a8a90508360040160008282546126829190613a3d565b90915550506000898152600284016020526040812080548c92906126a7908490613a3d565b9091555050600183015489036126d657600383015460ff16156126d15760038301805460ff191690555b61274f565b60018301546000908152600284016020526040808220548b83529120540361271857600383015460ff166126d15760038301805460ff1916600117905561274f565b60018301546000908152600284016020526040808220548b8352912054111561274f576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161278e93929190613cf2565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146127ce5760405162461bcd60e51b81526004016108d490613c46565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061281e5761281e6138c5565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612852576128526138c5565b90600052602060002090600d02016000018781548110612874576128746138c5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146128e05760405162461bcd60e51b81526004016108d490613d22565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161296b858783613db6565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190613aab565b6129f091906138f1565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600d909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612a79908a908a908a90613e76565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612aaf57612aaf6138c5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612ae357612ae36138c5565b90600052602060002090600d02016000018481548110612b0557612b056138c5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612b535760405162461bcd60e51b81526004016108d490613d22565b600083815260036020526040902054600280548592908110612b7757612b776138c5565b600091825260209091206002600590920201015460ff1615612bab5760405162461bcd60e51b81526004016108d490613a50565b600084815260036020526040812054600280549091908110612bcf57612bcf6138c5565b60009182526020822060059091020180549092508290612bf1906001906138f1565b81548110612c0157612c016138c5565b90600052602060002090600d020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8a9190613eac565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613930565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d859190613eac565b9650612d92848a89613066565b15612e2f57604080516080810182526001600160a01b03808a1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff19958616179055918152600c8901909152929092208054909216179055612e34565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612e6457612e646138c5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612e9857612e986138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600d93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1b91906139c8565b5091509150826004015460001480612f4a575080158015612f4a57506000828152600284016020526040902054155b15612f5c576000945050505050612f8d565b8015612f71575050600401549150612f8d9050565b506000908152600290910160205260409020549150612f8d9050565b92915050565b6000546001600160a01b03163314612fbd5760405162461bcd60e51b81526004016108d490613c46565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61300b613322565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b6000546001600160a01b031633146130635760405162461bcd60e51b81526004016108d490613c46565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d89190613930565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b9190613aab565b61316591906138f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa1580156131a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131ce9190810190613f5c565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561322a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324e9190613eac565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa1580156132a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c9919061403d565b50509150915082816132db9190613a3d565b60045490831015955060ff16156133175784801561331457506001600160a01b0386166000908152600c8901602052604090205460ff16155b94505b505050509392505050565b61332a613349565b61334757604051631afcd79f60e31b815260040160405180910390fd5b565b6000613353612fdf565b54600160401b900460ff16919050565b60006020828403121561337557600080fd5b5035919050565b6001600160a01b038116811461306357600080fd5b600080600080608085870312156133a757600080fd5b8435935060208501356133b98161337c565b93969395505050506040820135916060013590565b600080604083850312156133e157600080fd5b82356133ec8161337c565b915060208301356133fc8161337c565b809150509250929050565b6000806040838503121561341a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561346257613462613429565b60405290565b604051601f8201601f191681016001600160401b038111828210171561349057613490613429565b604052919050565b60006001600160401b038311156134b1576134b1613429565b6134c4601f8401601f1916602001613468565b90508281528383830111156134d857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261350057600080fd5b61350f83833560208501613498565b9392505050565b6000806040838503121561352957600080fd5b82356135348161337c565b915060208301356001600160401b0381111561354f57600080fd5b61355b858286016134ef565b9150509250929050565b60005b83811015613580578181015183820152602001613568565b50506000910152565b600081518084526135a1816020860160208601613565565b601f01601f19169290920160200192915050565b60208152600061350f6020830184613589565b8381528215156020820152606060408201526000611ecf6060830184613589565b60008083601f8401126135fb57600080fd5b5081356001600160401b0381111561361257600080fd5b6020830191508360208260051b850101111561362d57600080fd5b9250929050565b6000806000806060858703121561364a57600080fd5b8435935060208501356001600160401b0381111561366757600080fd5b613673878288016135e9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156136be578351835292840192918401916001016136a2565b50909695505050505050565b600080600080600060a086880312156136e257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561371a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561374657600080fd5b83356137518161337c565b92506020840135915060408401356001600160401b0381111561377357600080fd5b61377f868287016134ef565b9150509250925092565b60008060008060008060a087890312156137a257600080fd5b8635955060208701356001600160401b03808211156137c057600080fd5b6137cc8a838b016135e9565b9097509550604089013594506060890135935060808901359150808211156137f357600080fd5b508701601f8101891361380557600080fd5b61381489823560208401613498565b9150509295509295509295565b60006020828403121561383357600080fd5b813561350f8161337c565b60008060008060006080868803121561385657600080fd5b853594506020860135935060408601356001600160401b038082111561387b57600080fd5b818801915088601f83011261388f57600080fd5b81358181111561389e57600080fd5b8960208285010111156138b057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f8d57612f8d6138db565b80516001600160601b038116811461391b57600080fd5b919050565b8051801515811461391b57600080fd5b600080600080600060a0868803121561394857600080fd5b61395186613904565b945060208601516139618161337c565b60408701519094506005811061397657600080fd5b925061398460608701613920565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156139bf57600080fd5b61350f82613920565b6000806000606084860312156139dd57600080fd5b835192506139ed60208501613920565b91506139fb60408501613920565b90509250925092565b8082028115828204841417612f8d57612f8d6138db565b600082613a3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612f8d57612f8d6138db565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60008060408385031215613a9a57600080fd5b505080516020909101519092909150565b600060208284031215613abd57600080fd5b5051919050565b600181811c90821680613ad857607f821691505b602082108103613af857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208460208401526060604084015260008454613b1f81613ac4565b8060608701526080600180841660008114613b415760018114613b5d57613b8d565b60ff19851660808a0152608084151560051b8a01019550613b8d565b89600052602060002060005b85811015613b845781548b8201860152908301908801613b69565b8a016080019650505b50939a9950505050505050505050565b60008251613baf818460208701613565565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613c0957600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613c36604083018587613bf0565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ca357600080fd5b613cac88613904565b9650613cba60208901613920565b955060408801519450606088015193506080880151925060a08801519150613ce460c08901613920565b905092959891949750929550565b604081526000613d06604083018587613bf0565b8281036020840152613d188185613589565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156118a1576000816000526020600020601f850160051c81016020861015613d8f5750805b601f850160051c820191505b81811015613dae57828155600101613d9b565b505050505050565b6001600160401b03831115613dcd57613dcd613429565b613de183613ddb8354613ac4565b83613d66565b6000601f841160018114613e155760008515613dfd5750838201355b600019600387901b1c1916600186901b178355613e6f565b600083815260209020601f19861690835b82811015613e465786850135825560209485019460019092019101613e26565b5086821015613e635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ebe57600080fd5b815161350f8161337c565b600082601f830112613eda57600080fd5b815160206001600160401b03821115613ef557613ef5613429565b8160051b613f04828201613468565b9283528481018201928281019087851115613f1e57600080fd5b83870192505b84831015613f46578251613f378161337c565b82529183019190830190613f24565b979650505050505050565b805161391b8161337c565b600060208284031215613f6e57600080fd5b81516001600160401b0380821115613f8557600080fd5b908301906101608286031215613f9a57600080fd5b613fa261343f565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613fea57600080fd5b613ff687828601613ec9565b60c08301525060e0838101519082015261010080840151908201526101209150614021828401613f51565b9181019190915261014091820151918101919091529392505050565b6000806000806080858703121561405357600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dbc0f07975f24862ef29107d65fe042a587199d6ad1f6756f0fbf8ad88bad54664736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -959,6 +1002,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -1015,6 +1063,7 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -1091,7 +1140,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createDispute(uint256,uint256,bytes,uint256)": { "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", @@ -1148,7 +1197,7 @@ "_0": "The number of coherent jurors." } }, - "getDegreeOfCoherence(uint256,uint256,uint256)": { + "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.", @@ -1188,7 +1237,7 @@ } }, "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.", + "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.", @@ -1200,6 +1249,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "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 }, @@ -1209,18 +1267,8 @@ { "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 @@ -1228,7 +1276,7 @@ "storageLayout": { "storage": [ { - "astId": 11765, + "astId": 19346, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "governor", "offset": 0, @@ -1236,28 +1284,36 @@ "type": "t_address" }, { - "astId": 11768, + "astId": 19349, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)6383" + "type": "t_contract(KlerosCore)8475" }, { - "astId": 11772, + "astId": 19353, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "disputes", "offset": 0, "slot": "2", - "type": "t_array(t_struct(Dispute)11704_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)19281_storage)dyn_storage" }, { - "astId": 11776, + "astId": 19357, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreDisputeIDToLocal", "offset": 0, "slot": "3", "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 19359, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "singleDrawPerJuror", + "offset": 0, + "slot": "4", + "type": "t_bool" } ], "types": { @@ -1266,22 +1322,22 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Dispute)11704_storage)dyn_storage": { - "base": "t_struct(Dispute)11704_storage", + "t_array(t_struct(Dispute)19281_storage)dyn_storage": { + "base": "t_struct(Dispute)19281_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Dispute[]", + "label": "struct DisputeKitClassicBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)11742_storage)dyn_storage": { - "base": "t_struct(Round)11742_storage", + "t_array(t_struct(Round)19323_storage)dyn_storage": { + "base": "t_struct(Round)19323_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Round[]", + "label": "struct DisputeKitClassicBase.Round[]", "numberOfBytes": "32" }, - "t_array(t_struct(Vote)11751_storage)dyn_storage": { - "base": "t_struct(Vote)11751_storage", + "t_array(t_struct(Vote)19332_storage)dyn_storage": { + "base": "t_struct(Vote)19332_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Vote[]", + "label": "struct DisputeKitClassicBase.Vote[]", "numberOfBytes": "32" }, "t_array(t_uint256)dyn_storage": { @@ -1305,11 +1361,18 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(KlerosCore)6383": { + "t_contract(KlerosCore)8475": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { "encoding": "mapping", "key": "t_address", @@ -1331,20 +1394,20 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Dispute)11704_storage": { + "t_struct(Dispute)19281_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Dispute", + "label": "struct DisputeKitClassicBase.Dispute", "members": [ { - "astId": 11693, + "astId": 19270, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "rounds", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Round)11742_storage)dyn_storage" + "type": "t_array(t_struct(Round)19323_storage)dyn_storage" }, { - "astId": 11695, + "astId": 19272, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "numberOfChoices", "offset": 0, @@ -1352,7 +1415,7 @@ "type": "t_uint256" }, { - "astId": 11697, + "astId": 19274, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "jumped", "offset": 0, @@ -1360,7 +1423,7 @@ "type": "t_bool" }, { - "astId": 11701, + "astId": 19278, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreRoundIDToLocal", "offset": 0, @@ -1368,7 +1431,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 11703, + "astId": 19280, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "extraData", "offset": 0, @@ -1378,20 +1441,20 @@ ], "numberOfBytes": "160" }, - "t_struct(Round)11742_storage": { + "t_struct(Round)19323_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Round", + "label": "struct DisputeKitClassicBase.Round", "members": [ { - "astId": 11708, + "astId": 19285, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "votes", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Vote)11751_storage)dyn_storage" + "type": "t_array(t_struct(Vote)19332_storage)dyn_storage" }, { - "astId": 11710, + "astId": 19287, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "winningChoice", "offset": 0, @@ -1399,7 +1462,7 @@ "type": "t_uint256" }, { - "astId": 11714, + "astId": 19291, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "counts", "offset": 0, @@ -1407,7 +1470,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 11716, + "astId": 19293, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "tied", "offset": 0, @@ -1415,7 +1478,7 @@ "type": "t_bool" }, { - "astId": 11718, + "astId": 19295, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalVoted", "offset": 0, @@ -1423,7 +1486,7 @@ "type": "t_uint256" }, { - "astId": 11720, + "astId": 19297, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalCommitted", "offset": 0, @@ -1431,7 +1494,7 @@ "type": "t_uint256" }, { - "astId": 11724, + "astId": 19301, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "paidFees", "offset": 0, @@ -1439,7 +1502,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 11728, + "astId": 19305, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "hasPaid", "offset": 0, @@ -1447,7 +1510,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 11734, + "astId": 19311, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "contributions", "offset": 0, @@ -1455,7 +1518,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 11736, + "astId": 19313, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "feeRewards", "offset": 0, @@ -1463,7 +1526,7 @@ "type": "t_uint256" }, { - "astId": 11739, + "astId": 19316, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "fundedChoices", "offset": 0, @@ -1471,22 +1534,30 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 11741, + "astId": 19318, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "nbVotes", "offset": 0, "slot": "11", "type": "t_uint256" + }, + { + "astId": 19322, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "alreadyDrawn", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_bool)" } ], - "numberOfBytes": "384" + "numberOfBytes": "416" }, - "t_struct(Vote)11751_storage": { + "t_struct(Vote)19332_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Vote", + "label": "struct DisputeKitClassicBase.Vote", "members": [ { - "astId": 11744, + "astId": 19325, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "account", "offset": 0, @@ -1494,7 +1565,7 @@ "type": "t_address" }, { - "astId": 11746, + "astId": 19327, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "commit", "offset": 0, @@ -1502,7 +1573,7 @@ "type": "t_bytes32" }, { - "astId": 11748, + "astId": 19329, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "choice", "offset": 0, @@ -1510,7 +1581,7 @@ "type": "t_uint256" }, { - "astId": 11750, + "astId": 19331, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "voted", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json index b5a110186..3ff100710 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json @@ -147,6 +147,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -220,6 +227,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -270,33 +290,19 @@ "0xc53b813ed94AaEb6F5518D60bf6a8109954bE3f6", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 2, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 3, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E", + "implementation": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", "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/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json index 794a00d3e..fa748958f 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E", + "address": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", "abi": [ { "inputs": [], @@ -144,6 +144,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -216,43 +223,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0x191bb6d9774e1c184c6d17901fe80c7c46c4c9f01ac3a7b7e62b0380dc6ff6aa", + "transactionHash": "0xfcfcd796c92c353ec1e5703f99473172a679d3956ff18fb613d89343f88fbe8d", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E", - "transactionIndex": 1, - "gasUsed": "574562", - "logsBloom": "0x00000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcc1f823c17fa6b59f4f8fd3dcfd203568c634e57a36f9c79e05421a1bcd4b5c8", - "transactionHash": "0x191bb6d9774e1c184c6d17901fe80c7c46c4c9f01ac3a7b7e62b0380dc6ff6aa", + "contractAddress": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", + "transactionIndex": 3, + "gasUsed": "636291", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000004020000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa976868bf2ad2f6482666d223bd0981eb42e949fa1745bde379f2144a191ffb8", + "transactionHash": "0xfcfcd796c92c353ec1e5703f99473172a679d3956ff18fb613d89343f88fbe8d", "logs": [ { - "transactionIndex": 1, - "blockNumber": 88689541, - "transactionHash": "0x191bb6d9774e1c184c6d17901fe80c7c46c4c9f01ac3a7b7e62b0380dc6ff6aa", - "address": "0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E", + "transactionIndex": 3, + "blockNumber": 139232310, + "transactionHash": "0xfcfcd796c92c353ec1e5703f99473172a679d3956ff18fb613d89343f88fbe8d", + "address": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xcc1f823c17fa6b59f4f8fd3dcfd203568c634e57a36f9c79e05421a1bcd4b5c8" + "logIndex": 1, + "blockHash": "0xa976868bf2ad2f6482666d223bd0981eb42e949fa1745bde379f2144a191ffb8" } ], - "blockNumber": 88689541, - "cumulativeGasUsed": "574562", + "blockNumber": 139232310, + "cumulativeGasUsed": "801387", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "e0f719371c25ee6b430d9b7926bcf1db", - "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\":\"shanghai\",\"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": "0x60a060405230608052348015610013575f80fd5b5061001c610021565b6100d2565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100705760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100cf5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108a06100f85f395f81816101c7015281816101f001526103e401526108a05ff3fe60806040526004361061005f575f3560e01c80630c340a24146100635780633a283d7d1461009e5780634a994174146100c15780634f1ef286146100e057806352d1902d146100f5578063c4d66de814610109578063e4c0aaf414610128575b5f80fd5b34801561006e575f80fd5b505f54610081906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a9575f80fd5b506100b360015481565b604051908152602001610095565b3480156100cc575f80fd5b506100b36100db36600461063f565b610147565b6100f36100ee3660046106dc565b6101b3565b005b348015610100575f80fd5b506100b36103d8565b348015610114575f80fd5b506100f361012336600461073a565b610434565b348015610133575f80fd5b506100f361014236600461073a565b61051d565b600180545f918261015783610753565b9190505590508360405161016b9190610799565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101a49291906107df565b60405180910390a39392505050565b6101bc82610567565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061023957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661022d5f8051602061084b8339815191525490565b6001600160a01b031614155b156102575760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102b1575060408051601f3d908101601f191682019092526102ae9181019061080c565b60015b6102de57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b5f8051602061084b833981519152811461030e57604051632a87526960e21b8152600481018290526024016102d5565b5f8051602061084b8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28151156103d3575f836001600160a01b0316836040516103729190610799565b5f60405180830381855af49150503d805f81146103aa576040519150601f19603f3d011682016040523d82523d5f602084013e6103af565b606091505b50509050806103d1576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104225760405163703e46dd60e11b815260040160405180910390fd5b505f8051602061084b83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061047e5750805467ffffffffffffffff808416911610155b1561049b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff1990921682171782555f80546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b5f546001600160a01b031633146105465760405162461bcd60e51b81526004016102d590610823565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b031633146105905760405162461bcd60e51b81526004016102d590610823565b50565b634e487b7160e01b5f52604160045260245ffd5b5f67ffffffffffffffff808411156105c1576105c1610593565b604051601f8501601f19908116603f011681019082821181831017156105e9576105e9610593565b81604052809350858152868686011115610601575f80fd5b858560208301375f602087830101525050509392505050565b5f82601f830112610629575f80fd5b610638838335602085016105a7565b9392505050565b5f805f60608486031215610651575f80fd5b833567ffffffffffffffff80821115610668575f80fd5b6106748783880161061a565b94506020860135915080821115610689575f80fd5b6106958783880161061a565b935060408601359150808211156106aa575f80fd5b506106b78682870161061a565b9150509250925092565b80356001600160a01b03811681146106d7575f80fd5b919050565b5f80604083850312156106ed575f80fd5b6106f6836106c1565b9150602083013567ffffffffffffffff811115610711575f80fd5b8301601f81018513610721575f80fd5b610730858235602084016105a7565b9150509250929050565b5f6020828403121561074a575f80fd5b610638826106c1565b5f6001820161077057634e487b7160e01b5f52601160045260245ffd5b5060010190565b5f5b83811015610791578181015183820152602001610779565b50505f910152565b5f82516107aa818460208701610777565b9190910192915050565b5f81518084526107cb816020860160208601610777565b601f01601f19169290920160200192915050565b604081525f6107f160408301856107b4565b828103602084015261080381856107b4565b95945050505050565b5f6020828403121561081c575f80fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212208629103bcdcd961df69e39316ce1f9b754530e388e913d133e31aac78515f15164736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061005f575f3560e01c80630c340a24146100635780633a283d7d1461009e5780634a994174146100c15780634f1ef286146100e057806352d1902d146100f5578063c4d66de814610109578063e4c0aaf414610128575b5f80fd5b34801561006e575f80fd5b505f54610081906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a9575f80fd5b506100b360015481565b604051908152602001610095565b3480156100cc575f80fd5b506100b36100db36600461063f565b610147565b6100f36100ee3660046106dc565b6101b3565b005b348015610100575f80fd5b506100b36103d8565b348015610114575f80fd5b506100f361012336600461073a565b610434565b348015610133575f80fd5b506100f361014236600461073a565b61051d565b600180545f918261015783610753565b9190505590508360405161016b9190610799565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101a49291906107df565b60405180910390a39392505050565b6101bc82610567565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061023957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661022d5f8051602061084b8339815191525490565b6001600160a01b031614155b156102575760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102b1575060408051601f3d908101601f191682019092526102ae9181019061080c565b60015b6102de57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b5f8051602061084b833981519152811461030e57604051632a87526960e21b8152600481018290526024016102d5565b5f8051602061084b8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28151156103d3575f836001600160a01b0316836040516103729190610799565b5f60405180830381855af49150503d805f81146103aa576040519150601f19603f3d011682016040523d82523d5f602084013e6103af565b606091505b50509050806103d1576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104225760405163703e46dd60e11b815260040160405180910390fd5b505f8051602061084b83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061047e5750805467ffffffffffffffff808416911610155b1561049b5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff1990921682171782555f80546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b5f546001600160a01b031633146105465760405162461bcd60e51b81526004016102d590610823565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b031633146105905760405162461bcd60e51b81526004016102d590610823565b50565b634e487b7160e01b5f52604160045260245ffd5b5f67ffffffffffffffff808411156105c1576105c1610593565b604051601f8501601f19908116603f011681019082821181831017156105e9576105e9610593565b81604052809350858152868686011115610601575f80fd5b858560208301375f602087830101525050509392505050565b5f82601f830112610629575f80fd5b610638838335602085016105a7565b9392505050565b5f805f60608486031215610651575f80fd5b833567ffffffffffffffff80821115610668575f80fd5b6106748783880161061a565b94506020860135915080821115610689575f80fd5b6106958783880161061a565b935060408601359150808211156106aa575f80fd5b506106b78682870161061a565b9150509250925092565b80356001600160a01b03811681146106d7575f80fd5b919050565b5f80604083850312156106ed575f80fd5b6106f6836106c1565b9150602083013567ffffffffffffffff811115610711575f80fd5b8301601f81018513610721575f80fd5b610730858235602084016105a7565b9150509250929050565b5f6020828403121561074a575f80fd5b610638826106c1565b5f6001820161077057634e487b7160e01b5f52601160045260245ffd5b5060010190565b5f5b83811015610791578181015183820152602001610779565b50505f910152565b5f82516107aa818460208701610777565b9190910192915050565b5f81518084526107cb816020860160208601610777565b601f01601f19169290920160200192915050565b604081525f6107f160408301856107b4565b828103602084015261080381856107b4565b95945050505050565b5f6020828403121561081c575f80fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212208629103bcdcd961df69e39316ce1f9b754530e388e913d133e31aac78515f15164736f6c63430008180033", + "numDeployments": 3, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"},\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0x846514453223bb0f371180dd8b08b83c0b4a794e8cb915cac3321d3e1a5a26a8\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610a146100fc600039600081816103010152818161032a01526105270152610a146000f3fe6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", "devdoc": { "details": "A contract to maintain a registry of dispute templates.", "errors": { @@ -261,6 +281,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -291,6 +316,7 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -305,7 +331,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "initialize(address)": { "details": "Initializer", @@ -338,6 +364,13 @@ }, "templates": { "details": "The number of templates." + }, + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } } }, "title": "Dispute Template Registry", @@ -349,18 +382,8 @@ { "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 @@ -368,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 4384, + "astId": 8294, "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", "label": "governor", "offset": 0, @@ -376,7 +399,7 @@ "type": "t_address" }, { - "astId": 4387, + "astId": 8297, "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", "label": "templates", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json index ad4e847a6..301b3088a 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json @@ -128,6 +128,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -177,6 +184,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -227,33 +247,19 @@ "0x05AD81f245209b7f91885fd96e57c9da90554824", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0x05AD81f245209b7f91885fd96e57c9da90554824", + "implementation": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", "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/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json index d21c57bcf..605788393 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x05AD81f245209b7f91885fd96e57c9da90554824", + "address": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", "abi": [ { "inputs": [], @@ -125,6 +125,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -173,43 +180,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xb8ebf622d8db54d1b4443f7be1e7be2dc33a2718ed4f7f33639f73940c61caa6", + "transactionHash": "0xdfb5daa654439edc629b895b1a6481247548e67d8097ec4c118c48396c3a86b4", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x05AD81f245209b7f91885fd96e57c9da90554824", + "contractAddress": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", "transactionIndex": 1, - "gasUsed": "5237753", - "logsBloom": "0x00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa63e64a94d98e5015c118604aef38341ff47ea0099cf157eb9add4842b189cfd", - "transactionHash": "0xb8ebf622d8db54d1b4443f7be1e7be2dc33a2718ed4f7f33639f73940c61caa6", + "gasUsed": "576517", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5ff3b09b287d49694b6ac3e25ab8b4aa8d75055fa2e38352b72ba02de758e34d", + "transactionHash": "0xdfb5daa654439edc629b895b1a6481247548e67d8097ec4c118c48396c3a86b4", "logs": [ { "transactionIndex": 1, - "blockNumber": 3638725, - "transactionHash": "0xb8ebf622d8db54d1b4443f7be1e7be2dc33a2718ed4f7f33639f73940c61caa6", - "address": "0x05AD81f245209b7f91885fd96e57c9da90554824", + "blockNumber": 139232342, + "transactionHash": "0xdfb5daa654439edc629b895b1a6481247548e67d8097ec4c118c48396c3a86b4", + "address": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0xa63e64a94d98e5015c118604aef38341ff47ea0099cf157eb9add4842b189cfd" + "blockHash": "0x5ff3b09b287d49694b6ac3e25ab8b4aa8d75055fa2e38352b72ba02de758e34d" } ], - "blockNumber": 3638725, - "cumulativeGasUsed": "5237753", + "blockNumber": 139232342, + "cumulativeGasUsed": "576517", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516107896100fc6000396000818161011801528181610141015261033e01526107896000f3fe60806040526004361061004a5760003560e01c80630c340a241461004f5780634f1ef2861461008c57806352d1902d146100a1578063a6a7f0eb146100c4578063c4d66de8146100e4575b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461055c565b610104565b005b3480156100ad57600080fd5b506100b6610331565b604051908152602001610083565b3480156100d057600080fd5b5061009f6100df36600461061e565b61038f565b3480156100f057600080fd5b5061009f6100ff36600461069a565b6103d8565b61010d826104c2565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061018b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661017f6000805160206107348339815191525490565b6001600160a01b031614155b156101a95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610203575060408051601f3d908101601f19168201909252610200918101906106bc565b60015b61023057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610734833981519152811461026157604051632a87526960e21b815260048101829052602401610227565b6000805160206107348339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561032c576000836001600160a01b0316836040516102c891906106d5565b600060405180830381855af49150503d8060008114610303576040519150601f19603f3d011682016040523d82523d6000602084013e610308565b606091505b505090508061032a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461037c5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061073483398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516103cb929190610704565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104225750805467ffffffffffffffff808416911610155b1561043f5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146105275760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610227565b50565b80356001600160a01b038116811461054157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561056f57600080fd5b6105788361052a565b9150602083013567ffffffffffffffff8082111561059557600080fd5b818501915085601f8301126105a957600080fd5b8135818111156105bb576105bb610546565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610546565b816040528281528860208487010111156105fc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561063357600080fd5b83359250602084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b81358181111561067557600080fd5b87602082850101111561068757600080fd5b6020830194508093505050509250925092565b6000602082840312156106ac57600080fd5b6106b58261052a565b9392505050565b6000602082840312156106ce57600080fd5b5051919050565b6000825160005b818110156106f657602081860181015185830152016106dc565b506000920191825250919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ca354c10b2e92a7809e892ebe3420a0270fe6b7b1718bfcaea15c6aba0a706ae64736f6c63430008120033", - "deployedBytecode": "0x60806040526004361061004a5760003560e01c80630c340a241461004f5780634f1ef2861461008c57806352d1902d146100a1578063a6a7f0eb146100c4578063c4d66de8146100e4575b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461055c565b610104565b005b3480156100ad57600080fd5b506100b6610331565b604051908152602001610083565b3480156100d057600080fd5b5061009f6100df36600461061e565b61038f565b3480156100f057600080fd5b5061009f6100ff36600461069a565b6103d8565b61010d826104c2565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061018b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661017f6000805160206107348339815191525490565b6001600160a01b031614155b156101a95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610203575060408051601f3d908101601f19168201909252610200918101906106bc565b60015b61023057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610734833981519152811461026157604051632a87526960e21b815260048101829052602401610227565b6000805160206107348339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561032c576000836001600160a01b0316836040516102c891906106d5565b600060405180830381855af49150503d8060008114610303576040519150601f19603f3d011682016040523d82523d6000602084013e610308565b606091505b505090508061032a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461037c5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061073483398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516103cb929190610704565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104225750805467ffffffffffffffff808416911610155b1561043f5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146105275760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610227565b50565b80356001600160a01b038116811461054157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561056f57600080fd5b6105788361052a565b9150602083013567ffffffffffffffff8082111561059557600080fd5b818501915085601f8301126105a957600080fd5b8135818111156105bb576105bb610546565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610546565b816040528281528860208487010111156105fc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561063357600080fd5b83359250602084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b81358181111561067557600080fd5b87602082850101111561068757600080fd5b6020830194508093505050509250925092565b6000602082840312156106ac57600080fd5b6106b58261052a565b9392505050565b6000602082840312156106ce57600080fd5b5051919050565b6000825160005b818110156106f657602081860181015185830152016106dc565b506000920191825250919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ca354c10b2e92a7809e892ebe3420a0270fe6b7b1718bfcaea15c6aba0a706ae64736f6c63430008120033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Evidence Module\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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\\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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0xedf978718e5d349c5a39747e2c4da253a1d8b73588c4118b74b39c324ba471fe\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108ff6100fc6000396000818161024a01528181610273015261047001526108ff6000f3fe6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -217,6 +237,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -237,7 +262,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." } @@ -246,6 +271,7 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -254,7 +280,7 @@ "kind": "dev", "methods": { "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "initialize(address)": { "details": "Initializer.", @@ -268,7 +294,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." } }, @@ -280,6 +306,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "Evidence Module", "version": 1 }, @@ -289,18 +324,8 @@ { "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 @@ -308,7 +333,7 @@ "storageLayout": { "storage": [ { - "astId": 15567, + "astId": 21480, "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", "label": "governor", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json index 377a98f54..408681d2d 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json @@ -29,11 +29,6 @@ "name": "ArbitrationFeesNotEnough", "type": "error" }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, { "inputs": [], "name": "CannotDisableClassicDK", @@ -44,11 +39,6 @@ "name": "CommitPeriodNotPassed", "type": "error" }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, { "inputs": [], "name": "DisputeKitNotSupportedByCourt", @@ -89,6 +79,11 @@ "name": "GovernorOnly", "type": "error" }, + { + "inputs": [], + "name": "GuardianOrGovernorOnly", + "type": "error" + }, { "inputs": [], "name": "InvalidDisputKitParent", @@ -147,7 +142,27 @@ }, { "inputs": [], - "name": "StakingFailed", + "name": "StakingInTooManyCourts", + "type": "error" + }, + { + "inputs": [], + "name": "StakingLessThanCourtMinStake", + "type": "error" + }, + { + "inputs": [], + "name": "StakingNotPossibeInThisCourt", + "type": "error" + }, + { + "inputs": [], + "name": "StakingTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", "type": "error" }, { @@ -176,6 +191,11 @@ "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, + { + "inputs": [], + "name": "UnstakingTransferFailed", + "type": "error" + }, { "inputs": [], "name": "UnsuccessfulCall", @@ -191,6 +211,16 @@ "name": "VotePeriodNotPassed", "type": "error" }, + { + "inputs": [], + "name": "WhenNotPausedOnly", + "type": "error" + }, + { + "inputs": [], + "name": "WhenPausedOnly", + "type": "error" + }, { "inputs": [], "name": "WrongDisputeKitIndex", @@ -258,9 +288,9 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", + "internalType": "uint96", "name": "_courtID", - "type": "uint256" + "type": "uint96" }, { "indexed": true, @@ -605,7 +635,7 @@ }, { "indexed": false, - "internalType": "enum KlerosCore.Period", + "internalType": "enum KlerosCoreBase.Period", "name": "_period", "type": "uint8" } @@ -613,6 +643,12 @@ "name": "NewPeriod", "type": "event" }, + { + "anonymous": false, + "inputs": [], + "name": "Paused", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -687,6 +723,12 @@ "name": "TokenAndETHShift", "type": "event" }, + { + "anonymous": false, + "inputs": [], + "name": "Unpaused", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -919,6 +961,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guardian", + "type": "address" + } + ], + "name": "changeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1240,7 +1295,7 @@ "type": "address" }, { - "internalType": "enum KlerosCore.Period", + "internalType": "enum KlerosCoreBase.Period", "name": "period", "type": "uint8" }, @@ -1482,7 +1537,7 @@ "type": "uint256" } ], - "internalType": "struct KlerosCore.Round", + "internalType": "struct KlerosCoreBase.Round", "name": "", "type": "tuple" } @@ -1522,6 +1577,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1529,6 +1597,11 @@ "name": "_governor", "type": "address" }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, { "internalType": "contract IERC20", "name": "_pinakion", @@ -1575,6 +1648,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1644,6 +1724,26 @@ "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", @@ -1729,6 +1829,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1747,6 +1854,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1840,57 +1960,19 @@ "0x91a373BBdE0532F86410682F362e2Cf685e95085", "0x994b27af000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000019cb28bab40c3585955798f5eeabd71eec14471c00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x34B944D42cAcfC8266955D07A80181D2054aa225", - "0x0000000000000000000000000000000000000000", - "0x9426F127116C3652A262AE1eA48391AC8F44D35b", - false, - [ - { - "type": "BigNumber", - "hex": "0x0ad78ebc5ac6200000" - }, - 10000, - { - "type": "BigNumber", - "hex": "0x016345785d8a0000" - }, - 256 - ], - [ - 0, - 0, - 0, - 10 - ], - "0x05", - "0x19cb28BAB40C3585955798f5EEabd71Eec14471C" - ] + "methodName": "initialize3", + "args": [] }, - "implementation": "0x91a373BBdE0532F86410682F362e2Cf685e95085", + "implementation": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", "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/arbitrumSepoliaDevnet/KlerosCore_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json index 57dcd1285..57eee1d19 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x91a373BBdE0532F86410682F362e2Cf685e95085", + "address": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", "abi": [ { "inputs": [], @@ -26,11 +26,6 @@ "name": "ArbitrationFeesNotEnough", "type": "error" }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, { "inputs": [], "name": "CannotDisableClassicDK", @@ -41,11 +36,6 @@ "name": "CommitPeriodNotPassed", "type": "error" }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, { "inputs": [], "name": "DisputeKitNotSupportedByCourt", @@ -86,6 +76,11 @@ "name": "GovernorOnly", "type": "error" }, + { + "inputs": [], + "name": "GuardianOrGovernorOnly", + "type": "error" + }, { "inputs": [], "name": "InvalidDisputKitParent", @@ -144,7 +139,27 @@ }, { "inputs": [], - "name": "StakingFailed", + "name": "StakingInTooManyCourts", + "type": "error" + }, + { + "inputs": [], + "name": "StakingLessThanCourtMinStake", + "type": "error" + }, + { + "inputs": [], + "name": "StakingNotPossibeInThisCourt", + "type": "error" + }, + { + "inputs": [], + "name": "StakingTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", "type": "error" }, { @@ -173,6 +188,11 @@ "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, + { + "inputs": [], + "name": "UnstakingTransferFailed", + "type": "error" + }, { "inputs": [], "name": "UnsuccessfulCall", @@ -188,6 +208,16 @@ "name": "VotePeriodNotPassed", "type": "error" }, + { + "inputs": [], + "name": "WhenNotPausedOnly", + "type": "error" + }, + { + "inputs": [], + "name": "WhenPausedOnly", + "type": "error" + }, { "inputs": [], "name": "WrongDisputeKitIndex", @@ -255,9 +285,9 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", + "internalType": "uint96", "name": "_courtID", - "type": "uint256" + "type": "uint96" }, { "indexed": true, @@ -602,7 +632,7 @@ }, { "indexed": false, - "internalType": "enum KlerosCore.Period", + "internalType": "enum KlerosCoreBase.Period", "name": "_period", "type": "uint8" } @@ -610,6 +640,12 @@ "name": "NewPeriod", "type": "event" }, + { + "anonymous": false, + "inputs": [], + "name": "Paused", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -684,6 +720,12 @@ "name": "TokenAndETHShift", "type": "event" }, + { + "anonymous": false, + "inputs": [], + "name": "Unpaused", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -916,6 +958,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guardian", + "type": "address" + } + ], + "name": "changeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1237,7 +1292,7 @@ "type": "address" }, { - "internalType": "enum KlerosCore.Period", + "internalType": "enum KlerosCoreBase.Period", "name": "period", "type": "uint8" }, @@ -1479,7 +1534,7 @@ "type": "uint256" } ], - "internalType": "struct KlerosCore.Round", + "internalType": "struct KlerosCoreBase.Round", "name": "", "type": "tuple" } @@ -1519,6 +1574,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1526,6 +1594,11 @@ "name": "_governor", "type": "address" }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, { "internalType": "contract IERC20", "name": "_pinakion", @@ -1572,6 +1645,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1641,6 +1721,26 @@ "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", @@ -1726,6 +1826,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1743,43 +1850,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xbcf62d7f5849f5bc03a6fe8ba8de81929f3ef14ac6d00553bd968ddd89bf3a4c", + "transactionHash": "0x64bc78858fd3fb168aa3ebd5d2f169c7d400b06b73cb82f356b5c6439d8ec811", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x91a373BBdE0532F86410682F362e2Cf685e95085", - "transactionIndex": 1, - "gasUsed": "57410230", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000802000000000200000000000080000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x461454ae071be436765d458195dcc2dbba01ca552218a997fcb0078378c32516", - "transactionHash": "0xbcf62d7f5849f5bc03a6fe8ba8de81929f3ef14ac6d00553bd968ddd89bf3a4c", + "contractAddress": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + "transactionIndex": 3, + "gasUsed": "5090884", + "logsBloom": "0x00000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xfc469c83d8ece71c6431b5330771e8b4b2d4bb5ea86be13f52362698610b3a50", + "transactionHash": "0x64bc78858fd3fb168aa3ebd5d2f169c7d400b06b73cb82f356b5c6439d8ec811", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3638866, - "transactionHash": "0xbcf62d7f5849f5bc03a6fe8ba8de81929f3ef14ac6d00553bd968ddd89bf3a4c", - "address": "0x91a373BBdE0532F86410682F362e2Cf685e95085", + "transactionIndex": 3, + "blockNumber": 139232366, + "transactionHash": "0x64bc78858fd3fb168aa3ebd5d2f169c7d400b06b73cb82f356b5c6439d8ec811", + "address": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x461454ae071be436765d458195dcc2dbba01ca552218a997fcb0078378c32516" + "logIndex": 4, + "blockHash": "0xfc469c83d8ece71c6431b5330771e8b4b2d4bb5ea86be13f52362698610b3a50" } ], - "blockNumber": 3638866, - "cumulativeGasUsed": "57410230", + "blockNumber": 139232366, + "cumulativeGasUsed": "9457611", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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\":\"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\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingFailed\",\"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\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCore.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_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 KlerosCore.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 KlerosCore.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"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.\",\"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,bool,uint256[4],uint256[4],bytes,address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_governor\":\"The governor's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_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.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"details\":\"Sets the caller's stake in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256,bool)\":{\"details\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\",\"params\":{\"_account\":\"The account whose stake is being set.\",\"_alreadyTransferred\":\"Whether the PNKs have already been transferred to the contract.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"KlerosCore 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/KlerosCore.sol\":\"KlerosCore\"},\"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 {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 {Constants} from \\\"../libraries/Constants.sol\\\";\\nimport {OnError} from \\\"../libraries/Types.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 IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 => 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 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 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\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\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 _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 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 governor = _governor;\\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(Constants.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(Constants.FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = Constants.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(Constants.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(Constants.GENERAL_COURT, Constants.DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `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 == Constants.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[Constants.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 != Constants.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] == Constants.DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, Constants.NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[dispute.courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == Constants.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 = Constants.DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n Round storage round = dispute.rounds[_round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRoundCache = round.pnkPenalties; // For saving gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\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 pnkPenaltiesInRoundCache = _executePenalties(\\n ExecuteParams(_disputeID, _round, coherentCount, numberOfVotesInRound, pnkPenaltiesInRoundCache, i)\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams(_disputeID, _round, coherentCount, numberOfVotesInRound, pnkPenaltiesInRoundCache, i)\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRoundCache) {\\n round.pnkPenalties = pnkPenaltiesInRoundCache; // 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 );\\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 == Constants.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 );\\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 == Constants.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 == Constants.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 == Constants.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 == Constants.FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, bool sortitionSuccess) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (!sortitionSuccess) {\\n _stakingFailed(_onError);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError);\\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) internal pure {\\n if (_onError == OnError.Return) return;\\n revert StakingFailed();\\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 == Constants.FORKING_COURT || courtID >= courts.length) {\\n courtID = Constants.GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = Constants.DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == Constants.NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = Constants.DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = Constants.GENERAL_COURT;\\n minJurors = Constants.DEFAULT_NB_OF_JURORS;\\n disputeKitID = Constants.DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\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 StakingFailed();\\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}\\n\",\"keccak256\":\"0x43205bc90f6965b5c1380effd2c29994f6dfea074696e39d5df037343a768d6b\",\"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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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 /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\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\":\"0x7fe6b1d9b991cc327cc5895f34208a7b1e3b6ebf8efb20fcb9f3ff0f40d2d209\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\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, bool succeeded);\\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\":\"0xa6d79053edfe04f7d3c8ad9b9ce3f182e45f2f74be40a77a304a93168549c474\",\"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/// @title Constants\\nlibrary Constants {\\n // Courts\\n uint96 public constant FORKING_COURT = 0; // Index of the forking court.\\n uint96 public constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n // Dispute Kits\\n uint256 public constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\n uint256 public constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n // Defaults\\n uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\n IERC20 public constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n}\\n\",\"keccak256\":\"0xde8fd28a18669261b052aebb00bf09ec592bb9298fa5efc76ca8606e0c7dbb25\",\"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/libraries/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\",\"keccak256\":\"0xc7deebd8227dfaa46a36ae8d2c24fe1b5d5c776ab963b44943829ab4058b5701\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516154fb62000103600039600081816115020152818161152b015261172101526154fb6000f3fe6080604052600436106102665760003560e01c80638bb0487511610144578063d07368bd116100b6578063f6506db41161007a578063f6506db414610811578063f7434ea914610831578063fbb519e714610851578063fbf405b014610871578063fc6f8f1614610891578063fe524c39146108b157600080fd5b8063d07368bd1461077c578063d2b8035a1461079c578063d4d1d76a146107bc578063d98493f6146107d1578063e4c0aaf4146107f157600080fd5b8063b004963711610108578063b0049637146106d6578063c13517e1146106f6578063c258bb1914610709578063c356990214610729578063c71f42531461073c578063cf0c38f81461075c57600080fd5b80638bb0487514610621578063994b27af14610641578063a072b86c14610661578063acdbf51d14610681578063afe15cfb146106a157600080fd5b80633cfd1184116101dd578063751accd0116101a1578063751accd0146105545780637717a6e8146105745780637934c0be1461059457806382d02237146105b457806386541b24146105d45780638a9bb02a146105f457600080fd5b80633cfd1184146104ae5780634f1ef286146104db57806352d1902d146104ee578063564a565d1461050357806359ec827e1461053457600080fd5b80631860592b1161022f5780631860592b1461037257806319b81529146103a05780631c3db16d146103d05780631f5a0dd21461040d5780632d29a47b1461046e5780632e1daf2f1461048e57600080fd5b8062f5822c1461026b5780630219da791461028d5780630b7414bc146103055780630c340a2414610325578063115d537614610352575b600080fd5b34801561027757600080fd5b5061028b61028636600461467f565b6108d1565b005b34801561029957600080fd5b506102d86102a836600461467f565b60076020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561031157600080fd5b5061028b610320366004614787565b61091e565b34801561033157600080fd5b50600054610345906001600160a01b031681565b6040516102fc91906147e8565b34801561035e57600080fd5b5061028b61036d3660046147fc565b610a5f565b34801561037e57600080fd5b5061039261038d366004614815565b610f91565b6040519081526020016102fc565b3480156103ac57600080fd5b506103c06103bb3660046147fc565b610feb565b60405190151581526020016102fc565b3480156103dc57600080fd5b506103f06103eb3660046147fc565b6110e4565b6040805193845291151560208401521515908201526060016102fc565b34801561041957600080fd5b5061042d6104283660046147fc565b6111e5565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e0016102fc565b34801561047a57600080fd5b5061028b610489366004614841565b611244565b34801561049a57600080fd5b50600354610345906001600160a01b031681565b3480156104ba57600080fd5b506104ce6104c936600461486d565b611484565b6040516102fc91906148ab565b61028b6104e9366004614928565b6114ee565b3480156104fa57600080fd5b50610392611714565b34801561050f57600080fd5b5061052361051e3660046147fc565b611772565b6040516102fc9594939291906149af565b34801561054057600080fd5b5061039261054f3660046147fc565b6117ce565b34801561056057600080fd5b5061028b61056f3660046149ee565b611923565b34801561058057600080fd5b5061028b61058f366004614a46565b6119cd565b3480156105a057600080fd5b5061028b6105af366004614a62565b6119db565b3480156105c057600080fd5b5061028b6105cf366004614a9b565b611a5a565b3480156105e057600080fd5b5061028b6105ef366004614b5a565b611b17565b34801561060057600080fd5b5061061461060f366004614bc8565b611cfe565b6040516102fc9190614c2e565b34801561062d57600080fd5b5061028b61063c3660046147fc565b611e8a565b34801561064d57600080fd5b5061028b61065c366004614cd3565b611fee565b34801561066d57600080fd5b5061028b61067c366004614da7565b6123a8565b34801561068d57600080fd5b5061034561069c3660046147fc565b61271a565b3480156106ad57600080fd5b506106c16106bc3660046147fc565b612744565b604080519283526020830191909152016102fc565b3480156106e257600080fd5b5061028b6106f136600461467f565b6127f0565b610392610704366004614e67565b61283d565b34801561071557600080fd5b5061028b61072436600461467f565b612875565b61028b610737366004614e97565b6128c2565b34801561074857600080fd5b506103926107573660046147fc565b612d96565b34801561076857600080fd5b50600254610345906001600160a01b031681565b34801561078857600080fd5b5061028b61079736600461467f565b612dfe565b3480156107a857600080fd5b5061028b6107b7366004614bc8565b612ea7565b3480156107c857600080fd5b50600554610392565b3480156107dd57600080fd5b506103926107ec366004614f18565b6131be565b3480156107fd57600080fd5b5061028b61080c36600461467f565b61320b565b34801561081d57600080fd5b5061039261082c366004614f63565b613258565b34801561083d57600080fd5b5061039261084c366004614fc9565b61333e565b34801561085d57600080fd5b5061028b61086c366004614ffd565b61338a565b34801561087d57600080fd5b50600154610345906001600160a01b031681565b34801561089d57600080fd5b506103926108ac3660046147fc565b6133ca565b3480156108bd57600080fd5b506103c06108cc366004614a46565b6133f9565b6000546001600160a01b031633146108fc5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146109495760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610a595781156109e85782818151811061096d5761096d61504e565b6020026020010151600014806109a0575060055483518490839081106109955761099561504e565b602002602001015110155b156109be57604051633d58a98960e11b815260040160405180910390fd5b6109e3848483815181106109d4576109d461504e565b60200260200101516001613441565b610a47565b60018382815181106109fc576109fc61504e565b602002602001015103610a22576040516356d111fd60e11b815260040160405180910390fd5b610a4784848381518110610a3857610a3861504e565b60200260200101516000613441565b80610a518161507a565b91505061094c565b50505050565b600060068281548110610a7457610a7461504e565b600091825260208220600491820201805482549194506001600160601b0316908110610aa257610aa261504e565b6000918252602082206003850154600c909202019250610ac490600190615093565b90506000836003018281548110610add57610add61504e565b600091825260208220600b909102019150600185015460ff166004811115610b0757610b07614977565b03610be25781158015610b5657506001840154600684019060ff166004811115610b3357610b33614977565b60048110610b4357610b4361504e565b01546002850154610b549042615093565b105b15610b7457604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610b9c576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610bb3576002610bb6565b60015b60018086018054909160ff1990911690836004811115610bd857610bd8614977565b0217905550610f43565b60018085015460ff166004811115610bfc57610bfc614977565b03610d0c576001840154600684019060ff166004811115610c1f57610c1f614977565b60048110610c2f57610c2f61504e565b01546002850154610c409042615093565b108015610cd757506005816000015481548110610c5f57610c5f61504e565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd591906150a6565b155b15610cf557604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610bd8565b6002600185015460ff166004811115610d2757610d27614977565b03610e75576001840154600684019060ff166004811115610d4a57610d4a614977565b60048110610d5a57610d5a61504e565b01546002850154610d6b9042615093565b108015610e0257506005816000015481548110610d8a57610d8a61504e565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0091906150a6565b155b15610e2057604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610f43565b6003600185015460ff166004811115610e9057610e90614977565b03610f0a576001840154600684019060ff166004811115610eb357610eb3614977565b60048110610ec357610ec361504e565b01546002850154610ed49042615093565b1015610ef357604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610bd8565b6004600185015460ff166004811115610f2557610f25614977565b03610f43576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b9191610f829160ff16906150c3565b60405180910390a25050505050565b6001600160a01b03821660009081526007602052604081205461010081046001600160401b031690610fce90600160481b900460ff16600a6151b5565b610fd890846151c4565b610fe291906151f1565b90505b92915050565b600080600683815481106110015761100161504e565b600091825260208220600360049092020190810180549193509061102790600190615093565b815481106110375761103761504e565b600091825260208220845460048054600b909402909201945090916001600160601b0390911690811061106c5761106c61504e565b90600052602060002090600c0201905080600501548260030154101561109757506000949350505050565b80546004805490916001600160601b03169081106110b7576110b761504e565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600685815481106110fd576110fd61504e565b600091825260208220600360049092020190810180549193509061112390600190615093565b815481106111335761113361504e565b90600052602060002090600b020190506000600582600001548154811061115c5761115c61504e565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156111b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d59190615205565b9199909850909650945050505050565b600481815481106111f557600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b6000600684815481106112595761125961504e565b600091825260209091206004918202019150600182015460ff16600481111561128457611284614977565b146112a257604051638794ce4b60e01b815260040160405180910390fd5b60008160030184815481106112b9576112b961504e565b90600052602060002090600b02019050600060058260000154815481106112e2576112e261504e565b600091825260208220015460048401546001600160a01b0390911692509061130a868361523d565b6005850154600686015460405163368efae360e21b8152600481018c9052602481018b905292935090916000906001600160a01b0387169063da3beb8c90604401602060405180830381865afa158015611368573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138c9190615250565b9050806000036113a757818411156113a2578193505b6113c7565b6113b28260026151c4565b8411156113c7576113c48260026151c4565b93505b60048701849055845b84811015611463578281101561141c576114156040518060c001604052808e81526020018d8152602001848152602001858152602001868152602001838152506134c9565b9350611451565b6114516040518060c001604052808e81526020018d815260200184815260200185815260200186815260200183815250613986565b8061145b8161507a565b9150506113d0565b508287600501541461147757600587018390555b5050505050505050505050565b61148c6145bf565b6004826001600160601b0316815481106114a8576114a861504e565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116114cf5750505050509050919050565b6114f782613ea9565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061157557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115696000805160206154a68339815191525490565b6001600160a01b031614155b156115935760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156115ed575060408051601f3d908101601f191682019092526115ea91810190615250565b60015b6116155781604051630c76093760e01b815260040161160c91906147e8565b60405180910390fd5b6000805160206154a6833981519152811461164657604051632a87526960e21b81526004810182905260240161160c565b6000805160206154a68339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561170f576000836001600160a01b0316836040516116ad919061528d565b600060405180830381855af49150503d80600081146116e8576040519150601f19603f3d011682016040523d82523d6000602084013e6116ed565b606091505b5050905080610a59576040516339b21b5d60e11b815260040160405180910390fd5b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461175f5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206154a683398151915290565b6006818154811061178257600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600683815481106117e4576117e461504e565b600091825260208220600360049092020190810180549193509061180a90600190615093565b8154811061181a5761181a61504e565b600091825260208220845460048054600b909402909201945090916001600160601b0390911690811061184f5761184f61504e565b90600052602060002090600c0201905080600501548260030154106118ee5782546001600160601b031660001901611890576001600160ff1b03935061191b565b60038201546118a09060026151c4565b6118ab90600161523d565b81546004805490916001600160601b03169081106118cb576118cb61504e565b90600052602060002090600c0201600401546118e791906151c4565b935061191b565b60038201546118fe9060026151c4565b61190990600161523d565b816004015461191891906151c4565b93505b505050919050565b6000546001600160a01b0316331461194e5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611969919061528d565b60006040518083038185875af1925050503d80600081146119a6576040519150601f19603f3d011682016040523d82523d6000602084013e6119ab565b606091505b5050905080610a59576040516322092f2f60e11b815260040160405180910390fd5b61170f338383600080613ed7565b6000546001600160a01b03163314611a065760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260076020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611a855760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260076020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611b425760405163c383977560e01b815260040160405180910390fd5b60006004886001600160601b031681548110611b6057611b6061504e565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611bc2575080546004805488926001600160601b0316908110611bae57611bae61504e565b90600052602060002090600c020160020154115b15611be057604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611c6557866004836001018381548110611c0757611c0761504e565b906000526020600020015481548110611c2257611c2261504e565b90600052602060002090600c0201600201541015611c5357604051639717078960e01b815260040160405180910390fd5b80611c5d8161507a565b915050611be3565b5060028101869055805460ff60601b1916600160601b8815150217815560038101859055600480820185905560058201849055611ca890600683019084906145dd565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611cec969594939291906152a9565b60405180910390a25050505050505050565b611d6460405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b60068381548110611d7757611d7761504e565b90600052602060002090600402016003018281548110611d9957611d9961504e565b90600052602060002090600b02016040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805480602002602001604051908101604052809291908181526020018280548015611e4857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611e2a575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b600060068281548110611e9f57611e9f61504e565b600091825260209091206004918202019150600182015460ff166004811115611eca57611eca614977565b14611ee857604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff1615611f135760405163c977f8d360e01b815260040160405180910390fd5b6000611f1e836110e4565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015611fd157600080fd5b505af1158015611fe5573d6000803e3d6000fd5b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680612037575080546001600160401b03808416911610155b156120545760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b03808e166001600160a01b0319928316178355600180548e8316908416178155600280548e8416908516178155600380548985169086161790556005805481875291820190557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1018054928d1692909316821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a360048054600101815560008181526003546040516311de995760e21b81526001600160a01b039091169263477a655c9261215c929091899101615308565b600060405180830381600087803b15801561217657600080fd5b505af115801561218a573d6000803e3d6000fd5b5050600480546001810182556000918252600c027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160601b0319168155604080518381526020810190915290935091505080516121f891600184019160209091019061461b565b50805460ff60601b1916600160601b89151502178155865160028201556020870151600382015560408701516004808301919091556060880151600583015561224790600683019088906145dd565b506003546040516311de995760e21b81526001600160a01b039091169063477a655c9061227b906001908990600401615308565b600060405180830381600087803b15801561229557600080fd5b505af11580156122a9573d6000803e3d6000fd5b505082546001600160601b03169150600190507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d8a8a600060200201518b600160200201518c600260200201518d600360200201518d600060405190808252806020026020018201604052801561232a578160200160208202803683370190505b5060405161233e9796959493929190615321565b60405180910390a36123536001806001613441565b50805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050565b6000546001600160a01b031633146123d35760405163c383977560e01b815260040160405180910390fd5b8660048a6001600160601b0316815481106123f0576123f061504e565b90600052602060002090600c020160020154111561242157604051639717078960e01b815260040160405180910390fd5b80516000036124435760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661246a57604051631ef4f64960e01b815260040160405180910390fd5b60048054600181018255600091825290600c82027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905b8351811015612568578381815181106124bd576124bd61504e565b6020026020010151600014806124f0575060055484518590839081106124e5576124e561504e565b602002602001015110155b1561250e57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106125285761252861504e565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806125609061507a565b9150506124a2565b5060016000908152600a8201602052604090205460ff1661259c576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125d491600184019161461b565b50805460ff60601b1916600160601b8b151502178155600281018990556003810188905560048082018890556005820187905561261790600683019087906145dd565b506003546040516311de995760e21b81526001600160a01b039091169063477a655c9061264a9085908890600401615308565b600060405180830381600087803b15801561266457600080fd5b505af1158015612678573d6000803e3d6000fd5b5050505060048b6001600160601b0316815481106126985761269861504e565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612705908e908e908e908e908e908e908d90615321565b60405180910390a35050505050505050505050565b6005818154811061272a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006006848154811061275c5761275c61504e565b6000918252602090912060049091020190506003600182015460ff16600481111561278957612789614977565b036127e1576002810154815460048054929550916001600160601b039091169081106127b7576127b761504e565b600091825260209091206009600c90920201015460028201546127da919061523d565b91506127ea565b60009250600091505b50915091565b6000546001600160a01b0316331461281b5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006128488261333e565b34101561286857604051630e3360f160e21b815260040160405180910390fd5b610fe28383600034614071565b6000546001600160a01b031633146128a05760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6128cb836117ce565b3410156128eb57604051633191f8f160e01b815260040160405180910390fd5b6000600684815481106129005761290061504e565b6000918252602090912060049091020190506003600182015460ff16600481111561292d5761292d614977565b1461294b576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061296190600190615093565b815481106129715761297161504e565b90600052602060002090600b0201905060058160000154815481106129985761299861504e565b6000918252602090912001546001600160a01b031633146129cc5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600480546001600160601b0390951694600b9093029091019184908110612a0f57612a0f61504e565b90600052602060002090600c020160050154846003015410612b18576004836001600160601b031681548110612a4757612a4761504e565b60009182526020909120600c9091020154600480546001600160601b0390921694509084908110612a7a57612a7a61504e565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612aa657600191505b84546001600160601b03848116911614612b1857845460038601546001600160601b0390911690612ad990600190615093565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560048054600092908110612b5b57612b5b61504e565b90600052602060002090600c02019050806004015434612b7b91906151f1565b826003018190555061271081600301548260020154612b9a91906151c4565b612ba491906151f1565b60018084019190915534600284015583835560038054908801546001600160a01b039091169163d09f392d918c91612bdb91615093565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612c1957600080fd5b505af1158015612c2d573d6000803e3d6000fd5b505086548454149150612d1390505784546003870154612c4f90600190615093565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46005826000015481548110612c9d57612c9d61504e565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612ce0918d918d918d919060040161539e565b600060405180830381600087803b158015612cfa57600080fd5b505af1158015612d0e573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d8391906150c3565b60405180910390a2505050505050505050565b60008060068381548110612dac57612dac61504e565b906000526020600020906004020190508060030160018260030180549050612dd49190615093565b81548110612de457612de461504e565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e295760405163c383977560e01b815260040160405180910390fd5b6005805460018101825560009182527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060068381548110612ebc57612ebc61504e565b90600052602060002090600402019050600060018260030180549050612ee29190615093565b90506000826003018281548110612efb57612efb61504e565b600091825260208220600b909102019150600184015460ff166004811115612f2557612f25614977565b14612f4357604051638285c4ef60e01b815260040160405180910390fd5b60006005826000015481548110612f5c57612f5c61504e565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f91575060038401546006850154105b1561319b5760006001600160a01b03841663d2b8035a8a84612fb28161507a565b9550612fbe908761523d565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015613001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302591906153ce565b90506001600160a01b03811661303b5750612f7b565b60035460018601546040516310f0b12f60e11b81526001600160a01b03909216916321e1625e91613071918591906004016153eb565b600060405180830381600087803b15801561308b57600080fd5b505af115801561309f573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130ec918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361319557600354604051632e96bc2360e11b8152600481018b9052602481018890526001600160a01b0390911690635d2d784690604401600060405180830381600087803b15801561317c57600080fd5b505af1158015613190573d6000803e3d6000fd5b505050505b50612f7b565b8084600a0160008282546131af919061523d565b90915550505050505050505050565b60006132038261038d86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061333e92505050565b949350505050565b6000546001600160a01b031633146132365760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526007602052604081205460ff166132915760405163e51cf7bf60e01b815260040160405180910390fd5b61329c8585856131be565b8210156132bc57604051630e3360f160e21b815260040160405180910390fd5b6132d16001600160a01b03841633308561435a565b6132ee576040516312171d8360e31b815260040160405180910390fd5b6133328686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506140719050565b90505b95945050505050565b600080600061334c84614436565b5091509150806004836001600160601b03168154811061336e5761336e61504e565b90600052602060002090600c02016004015461320391906151c4565b6003546001600160a01b031633146133b557604051639d6cab9960e01b815260040160405180910390fd5b6133c3848484846001613ed7565b5050505050565b6000600682815481106133df576133df61504e565b600091825260209091206003600490920201015492915050565b60006004836001600160601b0316815481106134175761341761504e565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806004846001600160601b03168154811061345e5761345e61504e565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b60008060068360000151815481106134e3576134e361504e565b9060005260206000209060040201905060008160030184602001518154811061350e5761350e61504e565b90600052602060002090600b02019050600060058260000154815481106135375761353761504e565b60009182526020808320919091015487519188015160a0890151604051634fe264fb60e01b81526004810194909452602484019190915260448301526001600160a01b031692508290634fe264fb90606401602060405180830381865afa1580156135a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135ca9190615250565b90506127108111156135db57506127105b60006127106135ea8382615093565b85600101546135f991906151c4565b61360391906151f1565b90508087608001818151613617919061523d565b90525060a08701516006850180546000929081106136375761363761504e565b60009182526020909120015460035460405163965af6c760e01b81526001600160a01b03928316935091169063965af6c79061367990849086906004016153eb565b600060405180830381600087803b15801561369357600080fd5b505af11580156136a7573d6000803e3d6000fd5b5050600354604051633c85b79360e21b81526001600160a01b03909116925063f216de4c91506136dd90849086906004016153eb565b600060405180830381600087803b1580156136f757600080fd5b505af115801561370b573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e78661374b87615404565b60098b015460405161376d9392916000916001600160a01b0390911690615420565b60405180910390a48751602089015160a08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa1580156137d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137f891906150a6565b61385f5760035460405163b5d69e9960e01b81526001600160a01b039091169063b5d69e999061382c9084906004016147e8565b600060405180830381600087803b15801561384657600080fd5b505af115801561385a573d6000803e3d6000fd5b505050505b600188606001516138709190615093565b8860a0015114801561388457506040880151155b156139755760098501546001600160a01b03166138cd576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f19350505050506138f4565b600054600286015460098701546138f2926001600160a01b03918216929116906144bd565b505b6000546080890151600154613917926001600160a01b03918216929116906144bd565b506020880151885160808a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361396c93909290916001600160a01b0390911690615444565b60405180910390a35b505050608090940151949350505050565b6000600682600001518154811061399f5761399f61504e565b906000526020600020906004020190506000816003018360200151815481106139ca576139ca61504e565b90600052602060002090600b02019050600060058260000154815481106139f3576139f361504e565b6000918252602080832090910154865191870151606088015160a08901516001600160a01b0390931695508593634fe264fb93909291613a3291615463565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526044820152606401602060405180830381865afa158015613a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a9f9190615250565b9050612710811115613ab057506127105b60008360060186606001518760a00151613aca9190615463565b81548110613ada57613ada61504e565b600091825260208220015460018601546001600160a01b03909116925061271090613b069085906151c4565b613b1091906151f1565b60035460405163965af6c760e01b81529192506001600160a01b03169063965af6c790613b4390859085906004016153eb565b600060405180830381600087803b158015613b5d57600080fd5b505af1158015613b71573d6000803e3d6000fd5b5050600354604051636624192f60e01b81526001600160a01b039091169250636624192f9150613ba59085906004016147e8565b602060405180830381865afa158015613bc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613be691906150a6565b613c0357600154613c01906001600160a01b031683836144bd565b505b60006127108489604001518a60800151613c1d91906151f1565b613c2791906151c4565b613c3191906151f1565b905080866008016000828254613c47919061523d565b925050819055506000612710858a604001518960020154613c6891906151f1565b613c7291906151c4565b613c7c91906151f1565b905080876007016000828254613c92919061523d565b9091555050600154613cae906001600160a01b031685846144bd565b5060098701546001600160a01b0316613cec576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613d07565b6009870154613d05906001600160a01b031685836144bd565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613d57928c928a928a9290911690615420565b60405180910390a4600189606001516002613d7291906151c4565b613d7c9190615093565b8960a0015103613e9e57600087600801548a60800151613d9c9190615093565b9050600088600701548960020154613db49190615093565b905081151580613dc357508015155b15611477578115613ded57600054600154613deb916001600160a01b039182169116846144bd565b505b8015613e545760098901546001600160a01b0316613e3357600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613e54565b60005460098a0154613e52916001600160a01b039182169116836144bd565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49161270591879187916001600160a01b0390911690615444565b505050505050505050565b6000546001600160a01b03163314613ed45760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613ef957506004546001600160601b038616115b15613f0f57613f078261458a565b506000613335565b8315801590613f4a57506004856001600160601b031681548110613f3557613f3561504e565b90600052602060002090600c02016002015484105b15613f5857613f078261458a565b600354604051630a5861b960e41b81526001600160a01b0388811660048301526001600160601b0388166024830152604482018790528515156064830152600092839283929091169063a5861b90906084016060604051808303816000875af1158015613fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fed9190615477565b9250925092508061400d576140018561458a565b60009350505050613335565b82156140385760015461402b906001600160a01b03168a308661435a565b614038576140018561458a565b811561406257600154614055906001600160a01b03168a846144bd565b614062576140018561458a565b50600198975050505050505050565b600080600061407f86614436565b92505091506004826001600160601b0316815481106140a0576140a061504e565b60009182526020808320848452600a600c90930201919091019052604090205460ff166140e05760405163b34eb75d60e01b815260040160405180910390fd5b600680546001810182556000918252600160601b33026001600160601b03851617600482027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8101918255427ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4190910155600580549296509092918490811061416b5761416b61504e565b60009182526020822001548354600480546001600160a01b039093169450916001600160601b039091169081106141a4576141a461504e565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156141ef576141ea8a8460040154610f91565b6141f5565b82600401545b9050614201818a6151f1565b600380840191909155868355830154600284015461271091614222916151c4565b61422c91906151f1565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c81169190911790915560035460405163d09f392d60e01b8152600481018b90526000602482015291169063d09f392d90604401600060405180830381600087803b15801561429e57600080fd5b505af11580156142b2573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016142ec949392919061539e565b600060405180830381600087803b15801561430657600080fd5b505af115801561431a573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516143bf919061528d565b6000604051808303816000865af19150503d80600081146143fc576040519150601f19603f3d011682016040523d82523d6000602084013e614401565b606091505b509150915081801561442b57508051158061442b57508080602001905181019061442b91906150a6565b979650505050505050565b600080600060408451106144ab575050506020810151604082015160608301516001600160601b038316158061447757506004546001600160601b03841610155b1561448157600192505b8160000361448e57600391505b80158061449d57506005548110155b156144a6575060015b6144b6565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016144df9291906153eb565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251614514919061528d565b6000604051808303816000865af19150503d8060008114614551576040519150601f19603f3d011682016040523d82523d6000602084013e614556565b606091505b509150915081801561458057508051158061458057508080602001905181019061458091906150a6565b9695505050505050565b600181600181111561459e5761459e614977565b036145a65750565b60405163a437293760e01b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b826004810192821561460b579160200282015b8281111561460b5782518255916020019190600101906145f0565b50614617929150614655565b5090565b82805482825590600052602060002090810192821561460b579160200282018281111561460b5782518255916020019190600101906145f0565b5b808211156146175760008155600101614656565b6001600160a01b0381168114613ed457600080fd5b60006020828403121561469157600080fd5b813561469c8161466a565b9392505050565b80356001600160601b03811681146146ba57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156146fd576146fd6146bf565b604052919050565b600082601f83011261471657600080fd5b813560206001600160401b03821115614731576147316146bf565b8160051b6147408282016146d5565b928352848101820192828101908785111561475a57600080fd5b83870192505b8483101561442b57823582529183019190830190614760565b8015158114613ed457600080fd5b60008060006060848603121561479c57600080fd5b6147a5846146a3565b925060208401356001600160401b038111156147c057600080fd5b6147cc86828701614705565b92505060408401356147dd81614779565b809150509250925092565b6001600160a01b0391909116815260200190565b60006020828403121561480e57600080fd5b5035919050565b6000806040838503121561482857600080fd5b82356148338161466a565b946020939093013593505050565b60008060006060848603121561485657600080fd5b505081359360208301359350604090920135919050565b60006020828403121561487f57600080fd5b610fe2826146a3565b8060005b6004811015610a5957815184526020938401939091019060010161488c565b60808101610fe58284614888565b600082601f8301126148ca57600080fd5b81356001600160401b038111156148e3576148e36146bf565b6148f6601f8201601f19166020016146d5565b81815284602083860101111561490b57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561493b57600080fd5b82356149468161466a565b915060208301356001600160401b0381111561496157600080fd5b61496d858286016148b9565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b600581106149ab57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016149db604083018661498d565b9215156060820152608001529392505050565b600080600060608486031215614a0357600080fd5b8335614a0e8161466a565b92506020840135915060408401356001600160401b03811115614a3057600080fd5b614a3c868287016148b9565b9150509250925092565b60008060408385031215614a5957600080fd5b614833836146a3565b60008060408385031215614a7557600080fd5b8235614a808161466a565b91506020830135614a9081614779565b809150509250929050565b600080600060608486031215614ab057600080fd5b8335614abb8161466a565b925060208401356001600160401b0381168114614ad757600080fd5b9150604084013560ff811681146147dd57600080fd5b600082601f830112614afe57600080fd5b604051608081018181106001600160401b0382111715614b2057614b206146bf565b604052806080840185811115614b3557600080fd5b845b81811015614b4f578035835260209283019201614b37565b509195945050505050565b6000806000806000806000610140888a031215614b7657600080fd5b614b7f886146a3565b96506020880135614b8f81614779565b955060408801359450606088013593506080880135925060a08801359150614bba8960c08a01614aed565b905092959891949750929550565b60008060408385031215614bdb57600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015614c235781516001600160a01b031687529582019590820190600101614bfe565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152614c89610180850183614bea565b60e08601516101008681019190915286015161012080870191909152860151909250610140614cc2818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101e08a8c031215614cf257600080fd5b8935614cfd8161466a565b985060208a0135614d0d8161466a565b975060408a0135614d1d8161466a565b965060608a0135614d2d8161466a565b955060808a0135614d3d81614779565b9450614d4c8b60a08c01614aed565b9350614d5c8b6101208c01614aed565b92506101a08a01356001600160401b03811115614d7857600080fd5b614d848c828d016148b9565b9250506101c08a0135614d968161466a565b809150509295985092959850929598565b60008060008060008060008060006101808a8c031215614dc657600080fd5b614dcf8a6146a3565b985060208a0135614ddf81614779565b975060408a0135965060608a0135955060808a0135945060a08a01359350614e0a8b60c08c01614aed565b92506101408a01356001600160401b0380821115614e2757600080fd5b614e338d838e016148b9565b93506101608c0135915080821115614e4a57600080fd5b50614e578c828d01614705565b9150509295985092959850929598565b60008060408385031215614e7a57600080fd5b8235915060208301356001600160401b0381111561496157600080fd5b600080600060608486031215614eac57600080fd5b833592506020840135915060408401356001600160401b03811115614a3057600080fd5b60008083601f840112614ee257600080fd5b5081356001600160401b03811115614ef957600080fd5b602083019150836020828501011115614f1157600080fd5b9250929050565b600080600060408486031215614f2d57600080fd5b83356001600160401b03811115614f4357600080fd5b614f4f86828701614ed0565b90945092505060208401356147dd8161466a565b600080600080600060808688031215614f7b57600080fd5b8535945060208601356001600160401b03811115614f9857600080fd5b614fa488828901614ed0565b9095509350506040860135614fb88161466a565b949793965091946060013592915050565b600060208284031215614fdb57600080fd5b81356001600160401b03811115614ff157600080fd5b613203848285016148b9565b6000806000806080858703121561501357600080fd5b843561501e8161466a565b935061502c602086016146a3565b925060408501359150606085013561504381614779565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161508c5761508c615064565b5060010190565b81810381811115610fe557610fe5615064565b6000602082840312156150b857600080fd5b815161469c81614779565b60208101610fe5828461498d565b600181815b8085111561510c5781600019048211156150f2576150f2615064565b808516156150ff57918102915b93841c93908002906150d6565b509250929050565b60008261512357506001610fe5565b8161513057506000610fe5565b816001811461514657600281146151505761516c565b6001915050610fe5565b60ff84111561516157615161615064565b50506001821b610fe5565b5060208310610133831016604e8410600b841016171561518f575081810a610fe5565b61519983836150d1565b80600019048211156151ad576151ad615064565b029392505050565b6000610fe260ff841683615114565b8082028115828204841417610fe557610fe5615064565b634e487b7160e01b600052601260045260246000fd5b600082615200576152006151db565b500490565b60008060006060848603121561521a57600080fd5b83519250602084015161522c81614779565b60408501519092506147dd81614779565b80820180821115610fe557610fe5615064565b60006020828403121561526257600080fd5b5051919050565b60005b8381101561528457818101518382015260200161526c565b50506000910152565b6000825161529f818460208701615269565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261442b60a0830184614888565b600081518084526152f4816020860160208601615269565b601f01601f19169290920160200192915050565b82815260406020820152600061320360408301846152dc565b60006101408083018a1515845260208a8186015289604086015288606086015287608086015261535460a0860188614888565b6101208501929092528451908190526101608401918086019160005b8181101561538c57835185529382019392820192600101615370565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006153bd60808301856152dc565b905082606083015295945050505050565b6000602082840312156153e057600080fd5b815161469c8161466a565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b820161541957615419615064565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615472576154726151db565b500690565b60008060006060848603121561548c57600080fd5b835192506020840151915060408401516147dd8161477956fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122058616b04888240cc8d37ba1cf4119a0c7b9f8bb808137ebdb313ab46eaa623ad64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102665760003560e01c80638bb0487511610144578063d07368bd116100b6578063f6506db41161007a578063f6506db414610811578063f7434ea914610831578063fbb519e714610851578063fbf405b014610871578063fc6f8f1614610891578063fe524c39146108b157600080fd5b8063d07368bd1461077c578063d2b8035a1461079c578063d4d1d76a146107bc578063d98493f6146107d1578063e4c0aaf4146107f157600080fd5b8063b004963711610108578063b0049637146106d6578063c13517e1146106f6578063c258bb1914610709578063c356990214610729578063c71f42531461073c578063cf0c38f81461075c57600080fd5b80638bb0487514610621578063994b27af14610641578063a072b86c14610661578063acdbf51d14610681578063afe15cfb146106a157600080fd5b80633cfd1184116101dd578063751accd0116101a1578063751accd0146105545780637717a6e8146105745780637934c0be1461059457806382d02237146105b457806386541b24146105d45780638a9bb02a146105f457600080fd5b80633cfd1184146104ae5780634f1ef286146104db57806352d1902d146104ee578063564a565d1461050357806359ec827e1461053457600080fd5b80631860592b1161022f5780631860592b1461037257806319b81529146103a05780631c3db16d146103d05780631f5a0dd21461040d5780632d29a47b1461046e5780632e1daf2f1461048e57600080fd5b8062f5822c1461026b5780630219da791461028d5780630b7414bc146103055780630c340a2414610325578063115d537614610352575b600080fd5b34801561027757600080fd5b5061028b61028636600461467f565b6108d1565b005b34801561029957600080fd5b506102d86102a836600461467f565b60076020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561031157600080fd5b5061028b610320366004614787565b61091e565b34801561033157600080fd5b50600054610345906001600160a01b031681565b6040516102fc91906147e8565b34801561035e57600080fd5b5061028b61036d3660046147fc565b610a5f565b34801561037e57600080fd5b5061039261038d366004614815565b610f91565b6040519081526020016102fc565b3480156103ac57600080fd5b506103c06103bb3660046147fc565b610feb565b60405190151581526020016102fc565b3480156103dc57600080fd5b506103f06103eb3660046147fc565b6110e4565b6040805193845291151560208401521515908201526060016102fc565b34801561041957600080fd5b5061042d6104283660046147fc565b6111e5565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e0016102fc565b34801561047a57600080fd5b5061028b610489366004614841565b611244565b34801561049a57600080fd5b50600354610345906001600160a01b031681565b3480156104ba57600080fd5b506104ce6104c936600461486d565b611484565b6040516102fc91906148ab565b61028b6104e9366004614928565b6114ee565b3480156104fa57600080fd5b50610392611714565b34801561050f57600080fd5b5061052361051e3660046147fc565b611772565b6040516102fc9594939291906149af565b34801561054057600080fd5b5061039261054f3660046147fc565b6117ce565b34801561056057600080fd5b5061028b61056f3660046149ee565b611923565b34801561058057600080fd5b5061028b61058f366004614a46565b6119cd565b3480156105a057600080fd5b5061028b6105af366004614a62565b6119db565b3480156105c057600080fd5b5061028b6105cf366004614a9b565b611a5a565b3480156105e057600080fd5b5061028b6105ef366004614b5a565b611b17565b34801561060057600080fd5b5061061461060f366004614bc8565b611cfe565b6040516102fc9190614c2e565b34801561062d57600080fd5b5061028b61063c3660046147fc565b611e8a565b34801561064d57600080fd5b5061028b61065c366004614cd3565b611fee565b34801561066d57600080fd5b5061028b61067c366004614da7565b6123a8565b34801561068d57600080fd5b5061034561069c3660046147fc565b61271a565b3480156106ad57600080fd5b506106c16106bc3660046147fc565b612744565b604080519283526020830191909152016102fc565b3480156106e257600080fd5b5061028b6106f136600461467f565b6127f0565b610392610704366004614e67565b61283d565b34801561071557600080fd5b5061028b61072436600461467f565b612875565b61028b610737366004614e97565b6128c2565b34801561074857600080fd5b506103926107573660046147fc565b612d96565b34801561076857600080fd5b50600254610345906001600160a01b031681565b34801561078857600080fd5b5061028b61079736600461467f565b612dfe565b3480156107a857600080fd5b5061028b6107b7366004614bc8565b612ea7565b3480156107c857600080fd5b50600554610392565b3480156107dd57600080fd5b506103926107ec366004614f18565b6131be565b3480156107fd57600080fd5b5061028b61080c36600461467f565b61320b565b34801561081d57600080fd5b5061039261082c366004614f63565b613258565b34801561083d57600080fd5b5061039261084c366004614fc9565b61333e565b34801561085d57600080fd5b5061028b61086c366004614ffd565b61338a565b34801561087d57600080fd5b50600154610345906001600160a01b031681565b34801561089d57600080fd5b506103926108ac3660046147fc565b6133ca565b3480156108bd57600080fd5b506103c06108cc366004614a46565b6133f9565b6000546001600160a01b031633146108fc5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146109495760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610a595781156109e85782818151811061096d5761096d61504e565b6020026020010151600014806109a0575060055483518490839081106109955761099561504e565b602002602001015110155b156109be57604051633d58a98960e11b815260040160405180910390fd5b6109e3848483815181106109d4576109d461504e565b60200260200101516001613441565b610a47565b60018382815181106109fc576109fc61504e565b602002602001015103610a22576040516356d111fd60e11b815260040160405180910390fd5b610a4784848381518110610a3857610a3861504e565b60200260200101516000613441565b80610a518161507a565b91505061094c565b50505050565b600060068281548110610a7457610a7461504e565b600091825260208220600491820201805482549194506001600160601b0316908110610aa257610aa261504e565b6000918252602082206003850154600c909202019250610ac490600190615093565b90506000836003018281548110610add57610add61504e565b600091825260208220600b909102019150600185015460ff166004811115610b0757610b07614977565b03610be25781158015610b5657506001840154600684019060ff166004811115610b3357610b33614977565b60048110610b4357610b4361504e565b01546002850154610b549042615093565b105b15610b7457604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610b9c576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610bb3576002610bb6565b60015b60018086018054909160ff1990911690836004811115610bd857610bd8614977565b0217905550610f43565b60018085015460ff166004811115610bfc57610bfc614977565b03610d0c576001840154600684019060ff166004811115610c1f57610c1f614977565b60048110610c2f57610c2f61504e565b01546002850154610c409042615093565b108015610cd757506005816000015481548110610c5f57610c5f61504e565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd591906150a6565b155b15610cf557604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610bd8565b6002600185015460ff166004811115610d2757610d27614977565b03610e75576001840154600684019060ff166004811115610d4a57610d4a614977565b60048110610d5a57610d5a61504e565b01546002850154610d6b9042615093565b108015610e0257506005816000015481548110610d8a57610d8a61504e565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0091906150a6565b155b15610e2057604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610f43565b6003600185015460ff166004811115610e9057610e90614977565b03610f0a576001840154600684019060ff166004811115610eb357610eb3614977565b60048110610ec357610ec361504e565b01546002850154610ed49042615093565b1015610ef357604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610bd8565b6004600185015460ff166004811115610f2557610f25614977565b03610f43576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b9191610f829160ff16906150c3565b60405180910390a25050505050565b6001600160a01b03821660009081526007602052604081205461010081046001600160401b031690610fce90600160481b900460ff16600a6151b5565b610fd890846151c4565b610fe291906151f1565b90505b92915050565b600080600683815481106110015761100161504e565b600091825260208220600360049092020190810180549193509061102790600190615093565b815481106110375761103761504e565b600091825260208220845460048054600b909402909201945090916001600160601b0390911690811061106c5761106c61504e565b90600052602060002090600c0201905080600501548260030154101561109757506000949350505050565b80546004805490916001600160601b03169081106110b7576110b761504e565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600685815481106110fd576110fd61504e565b600091825260208220600360049092020190810180549193509061112390600190615093565b815481106111335761113361504e565b90600052602060002090600b020190506000600582600001548154811061115c5761115c61504e565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156111b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d59190615205565b9199909850909650945050505050565b600481815481106111f557600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b6000600684815481106112595761125961504e565b600091825260209091206004918202019150600182015460ff16600481111561128457611284614977565b146112a257604051638794ce4b60e01b815260040160405180910390fd5b60008160030184815481106112b9576112b961504e565b90600052602060002090600b02019050600060058260000154815481106112e2576112e261504e565b600091825260208220015460048401546001600160a01b0390911692509061130a868361523d565b6005850154600686015460405163368efae360e21b8152600481018c9052602481018b905292935090916000906001600160a01b0387169063da3beb8c90604401602060405180830381865afa158015611368573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138c9190615250565b9050806000036113a757818411156113a2578193505b6113c7565b6113b28260026151c4565b8411156113c7576113c48260026151c4565b93505b60048701849055845b84811015611463578281101561141c576114156040518060c001604052808e81526020018d8152602001848152602001858152602001868152602001838152506134c9565b9350611451565b6114516040518060c001604052808e81526020018d815260200184815260200185815260200186815260200183815250613986565b8061145b8161507a565b9150506113d0565b508287600501541461147757600587018390555b5050505050505050505050565b61148c6145bf565b6004826001600160601b0316815481106114a8576114a861504e565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116114cf5750505050509050919050565b6114f782613ea9565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061157557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115696000805160206154a68339815191525490565b6001600160a01b031614155b156115935760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156115ed575060408051601f3d908101601f191682019092526115ea91810190615250565b60015b6116155781604051630c76093760e01b815260040161160c91906147e8565b60405180910390fd5b6000805160206154a6833981519152811461164657604051632a87526960e21b81526004810182905260240161160c565b6000805160206154a68339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561170f576000836001600160a01b0316836040516116ad919061528d565b600060405180830381855af49150503d80600081146116e8576040519150601f19603f3d011682016040523d82523d6000602084013e6116ed565b606091505b5050905080610a59576040516339b21b5d60e11b815260040160405180910390fd5b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461175f5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206154a683398151915290565b6006818154811061178257600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600683815481106117e4576117e461504e565b600091825260208220600360049092020190810180549193509061180a90600190615093565b8154811061181a5761181a61504e565b600091825260208220845460048054600b909402909201945090916001600160601b0390911690811061184f5761184f61504e565b90600052602060002090600c0201905080600501548260030154106118ee5782546001600160601b031660001901611890576001600160ff1b03935061191b565b60038201546118a09060026151c4565b6118ab90600161523d565b81546004805490916001600160601b03169081106118cb576118cb61504e565b90600052602060002090600c0201600401546118e791906151c4565b935061191b565b60038201546118fe9060026151c4565b61190990600161523d565b816004015461191891906151c4565b93505b505050919050565b6000546001600160a01b0316331461194e5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611969919061528d565b60006040518083038185875af1925050503d80600081146119a6576040519150601f19603f3d011682016040523d82523d6000602084013e6119ab565b606091505b5050905080610a59576040516322092f2f60e11b815260040160405180910390fd5b61170f338383600080613ed7565b6000546001600160a01b03163314611a065760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260076020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611a855760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260076020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611b425760405163c383977560e01b815260040160405180910390fd5b60006004886001600160601b031681548110611b6057611b6061504e565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611bc2575080546004805488926001600160601b0316908110611bae57611bae61504e565b90600052602060002090600c020160020154115b15611be057604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611c6557866004836001018381548110611c0757611c0761504e565b906000526020600020015481548110611c2257611c2261504e565b90600052602060002090600c0201600201541015611c5357604051639717078960e01b815260040160405180910390fd5b80611c5d8161507a565b915050611be3565b5060028101869055805460ff60601b1916600160601b8815150217815560038101859055600480820185905560058201849055611ca890600683019084906145dd565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611cec969594939291906152a9565b60405180910390a25050505050505050565b611d6460405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b60068381548110611d7757611d7761504e565b90600052602060002090600402016003018281548110611d9957611d9961504e565b90600052602060002090600b02016040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805480602002602001604051908101604052809291908181526020018280548015611e4857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611e2a575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b600060068281548110611e9f57611e9f61504e565b600091825260209091206004918202019150600182015460ff166004811115611eca57611eca614977565b14611ee857604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff1615611f135760405163c977f8d360e01b815260040160405180910390fd5b6000611f1e836110e4565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015611fd157600080fd5b505af1158015611fe5573d6000803e3d6000fd5b50505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680612037575080546001600160401b03808416911610155b156120545760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b03808e166001600160a01b0319928316178355600180548e8316908416178155600280548e8416908516178155600380548985169086161790556005805481875291820190557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1018054928d1692909316821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a360048054600101815560008181526003546040516311de995760e21b81526001600160a01b039091169263477a655c9261215c929091899101615308565b600060405180830381600087803b15801561217657600080fd5b505af115801561218a573d6000803e3d6000fd5b5050600480546001810182556000918252600c027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160601b0319168155604080518381526020810190915290935091505080516121f891600184019160209091019061461b565b50805460ff60601b1916600160601b89151502178155865160028201556020870151600382015560408701516004808301919091556060880151600583015561224790600683019088906145dd565b506003546040516311de995760e21b81526001600160a01b039091169063477a655c9061227b906001908990600401615308565b600060405180830381600087803b15801561229557600080fd5b505af11580156122a9573d6000803e3d6000fd5b505082546001600160601b03169150600190507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d8a8a600060200201518b600160200201518c600260200201518d600360200201518d600060405190808252806020026020018201604052801561232a578160200160208202803683370190505b5060405161233e9796959493929190615321565b60405180910390a36123536001806001613441565b50805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050565b6000546001600160a01b031633146123d35760405163c383977560e01b815260040160405180910390fd5b8660048a6001600160601b0316815481106123f0576123f061504e565b90600052602060002090600c020160020154111561242157604051639717078960e01b815260040160405180910390fd5b80516000036124435760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661246a57604051631ef4f64960e01b815260040160405180910390fd5b60048054600181018255600091825290600c82027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905b8351811015612568578381815181106124bd576124bd61504e565b6020026020010151600014806124f0575060055484518590839081106124e5576124e561504e565b602002602001015110155b1561250e57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106125285761252861504e565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806125609061507a565b9150506124a2565b5060016000908152600a8201602052604090205460ff1661259c576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125d491600184019161461b565b50805460ff60601b1916600160601b8b151502178155600281018990556003810188905560048082018890556005820187905561261790600683019087906145dd565b506003546040516311de995760e21b81526001600160a01b039091169063477a655c9061264a9085908890600401615308565b600060405180830381600087803b15801561266457600080fd5b505af1158015612678573d6000803e3d6000fd5b5050505060048b6001600160601b0316815481106126985761269861504e565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612705908e908e908e908e908e908e908d90615321565b60405180910390a35050505050505050505050565b6005818154811061272a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060006006848154811061275c5761275c61504e565b6000918252602090912060049091020190506003600182015460ff16600481111561278957612789614977565b036127e1576002810154815460048054929550916001600160601b039091169081106127b7576127b761504e565b600091825260209091206009600c90920201015460028201546127da919061523d565b91506127ea565b60009250600091505b50915091565b6000546001600160a01b0316331461281b5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006128488261333e565b34101561286857604051630e3360f160e21b815260040160405180910390fd5b610fe28383600034614071565b6000546001600160a01b031633146128a05760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6128cb836117ce565b3410156128eb57604051633191f8f160e01b815260040160405180910390fd5b6000600684815481106129005761290061504e565b6000918252602090912060049091020190506003600182015460ff16600481111561292d5761292d614977565b1461294b576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061296190600190615093565b815481106129715761297161504e565b90600052602060002090600b0201905060058160000154815481106129985761299861504e565b6000918252602090912001546001600160a01b031633146129cc5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600480546001600160601b0390951694600b9093029091019184908110612a0f57612a0f61504e565b90600052602060002090600c020160050154846003015410612b18576004836001600160601b031681548110612a4757612a4761504e565b60009182526020909120600c9091020154600480546001600160601b0390921694509084908110612a7a57612a7a61504e565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612aa657600191505b84546001600160601b03848116911614612b1857845460038601546001600160601b0390911690612ad990600190615093565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560048054600092908110612b5b57612b5b61504e565b90600052602060002090600c02019050806004015434612b7b91906151f1565b826003018190555061271081600301548260020154612b9a91906151c4565b612ba491906151f1565b60018084019190915534600284015583835560038054908801546001600160a01b039091169163d09f392d918c91612bdb91615093565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612c1957600080fd5b505af1158015612c2d573d6000803e3d6000fd5b505086548454149150612d1390505784546003870154612c4f90600190615093565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46005826000015481548110612c9d57612c9d61504e565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612ce0918d918d918d919060040161539e565b600060405180830381600087803b158015612cfa57600080fd5b505af1158015612d0e573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d8391906150c3565b60405180910390a2505050505050505050565b60008060068381548110612dac57612dac61504e565b906000526020600020906004020190508060030160018260030180549050612dd49190615093565b81548110612de457612de461504e565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e295760405163c383977560e01b815260040160405180910390fd5b6005805460018101825560009182527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060068381548110612ebc57612ebc61504e565b90600052602060002090600402019050600060018260030180549050612ee29190615093565b90506000826003018281548110612efb57612efb61504e565b600091825260208220600b909102019150600184015460ff166004811115612f2557612f25614977565b14612f4357604051638285c4ef60e01b815260040160405180910390fd5b60006005826000015481548110612f5c57612f5c61504e565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f91575060038401546006850154105b1561319b5760006001600160a01b03841663d2b8035a8a84612fb28161507a565b9550612fbe908761523d565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015613001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302591906153ce565b90506001600160a01b03811661303b5750612f7b565b60035460018601546040516310f0b12f60e11b81526001600160a01b03909216916321e1625e91613071918591906004016153eb565b600060405180830381600087803b15801561308b57600080fd5b505af115801561309f573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130ec918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361319557600354604051632e96bc2360e11b8152600481018b9052602481018890526001600160a01b0390911690635d2d784690604401600060405180830381600087803b15801561317c57600080fd5b505af1158015613190573d6000803e3d6000fd5b505050505b50612f7b565b8084600a0160008282546131af919061523d565b90915550505050505050505050565b60006132038261038d86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061333e92505050565b949350505050565b6000546001600160a01b031633146132365760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526007602052604081205460ff166132915760405163e51cf7bf60e01b815260040160405180910390fd5b61329c8585856131be565b8210156132bc57604051630e3360f160e21b815260040160405180910390fd5b6132d16001600160a01b03841633308561435a565b6132ee576040516312171d8360e31b815260040160405180910390fd5b6133328686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506140719050565b90505b95945050505050565b600080600061334c84614436565b5091509150806004836001600160601b03168154811061336e5761336e61504e565b90600052602060002090600c02016004015461320391906151c4565b6003546001600160a01b031633146133b557604051639d6cab9960e01b815260040160405180910390fd5b6133c3848484846001613ed7565b5050505050565b6000600682815481106133df576133df61504e565b600091825260209091206003600490920201015492915050565b60006004836001600160601b0316815481106134175761341761504e565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806004846001600160601b03168154811061345e5761345e61504e565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b60008060068360000151815481106134e3576134e361504e565b9060005260206000209060040201905060008160030184602001518154811061350e5761350e61504e565b90600052602060002090600b02019050600060058260000154815481106135375761353761504e565b60009182526020808320919091015487519188015160a0890151604051634fe264fb60e01b81526004810194909452602484019190915260448301526001600160a01b031692508290634fe264fb90606401602060405180830381865afa1580156135a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135ca9190615250565b90506127108111156135db57506127105b60006127106135ea8382615093565b85600101546135f991906151c4565b61360391906151f1565b90508087608001818151613617919061523d565b90525060a08701516006850180546000929081106136375761363761504e565b60009182526020909120015460035460405163965af6c760e01b81526001600160a01b03928316935091169063965af6c79061367990849086906004016153eb565b600060405180830381600087803b15801561369357600080fd5b505af11580156136a7573d6000803e3d6000fd5b5050600354604051633c85b79360e21b81526001600160a01b03909116925063f216de4c91506136dd90849086906004016153eb565b600060405180830381600087803b1580156136f757600080fd5b505af115801561370b573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e78661374b87615404565b60098b015460405161376d9392916000916001600160a01b0390911690615420565b60405180910390a48751602089015160a08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa1580156137d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137f891906150a6565b61385f5760035460405163b5d69e9960e01b81526001600160a01b039091169063b5d69e999061382c9084906004016147e8565b600060405180830381600087803b15801561384657600080fd5b505af115801561385a573d6000803e3d6000fd5b505050505b600188606001516138709190615093565b8860a0015114801561388457506040880151155b156139755760098501546001600160a01b03166138cd576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f19350505050506138f4565b600054600286015460098701546138f2926001600160a01b03918216929116906144bd565b505b6000546080890151600154613917926001600160a01b03918216929116906144bd565b506020880151885160808a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49361396c93909290916001600160a01b0390911690615444565b60405180910390a35b505050608090940151949350505050565b6000600682600001518154811061399f5761399f61504e565b906000526020600020906004020190506000816003018360200151815481106139ca576139ca61504e565b90600052602060002090600b02019050600060058260000154815481106139f3576139f361504e565b6000918252602080832090910154865191870151606088015160a08901516001600160a01b0390931695508593634fe264fb93909291613a3291615463565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526044820152606401602060405180830381865afa158015613a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a9f9190615250565b9050612710811115613ab057506127105b60008360060186606001518760a00151613aca9190615463565b81548110613ada57613ada61504e565b600091825260208220015460018601546001600160a01b03909116925061271090613b069085906151c4565b613b1091906151f1565b60035460405163965af6c760e01b81529192506001600160a01b03169063965af6c790613b4390859085906004016153eb565b600060405180830381600087803b158015613b5d57600080fd5b505af1158015613b71573d6000803e3d6000fd5b5050600354604051636624192f60e01b81526001600160a01b039091169250636624192f9150613ba59085906004016147e8565b602060405180830381865afa158015613bc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613be691906150a6565b613c0357600154613c01906001600160a01b031683836144bd565b505b60006127108489604001518a60800151613c1d91906151f1565b613c2791906151c4565b613c3191906151f1565b905080866008016000828254613c47919061523d565b925050819055506000612710858a604001518960020154613c6891906151f1565b613c7291906151c4565b613c7c91906151f1565b905080876007016000828254613c92919061523d565b9091555050600154613cae906001600160a01b031685846144bd565b5060098701546001600160a01b0316613cec576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613d07565b6009870154613d05906001600160a01b031685836144bd565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613d57928c928a928a9290911690615420565b60405180910390a4600189606001516002613d7291906151c4565b613d7c9190615093565b8960a0015103613e9e57600087600801548a60800151613d9c9190615093565b9050600088600701548960020154613db49190615093565b905081151580613dc357508015155b15611477578115613ded57600054600154613deb916001600160a01b039182169116846144bd565b505b8015613e545760098901546001600160a01b0316613e3357600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613e54565b60005460098a0154613e52916001600160a01b039182169116836144bd565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49161270591879187916001600160a01b0390911690615444565b505050505050505050565b6000546001600160a01b03163314613ed45760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613ef957506004546001600160601b038616115b15613f0f57613f078261458a565b506000613335565b8315801590613f4a57506004856001600160601b031681548110613f3557613f3561504e565b90600052602060002090600c02016002015484105b15613f5857613f078261458a565b600354604051630a5861b960e41b81526001600160a01b0388811660048301526001600160601b0388166024830152604482018790528515156064830152600092839283929091169063a5861b90906084016060604051808303816000875af1158015613fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fed9190615477565b9250925092508061400d576140018561458a565b60009350505050613335565b82156140385760015461402b906001600160a01b03168a308661435a565b614038576140018561458a565b811561406257600154614055906001600160a01b03168a846144bd565b614062576140018561458a565b50600198975050505050505050565b600080600061407f86614436565b92505091506004826001600160601b0316815481106140a0576140a061504e565b60009182526020808320848452600a600c90930201919091019052604090205460ff166140e05760405163b34eb75d60e01b815260040160405180910390fd5b600680546001810182556000918252600160601b33026001600160601b03851617600482027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8101918255427ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4190910155600580549296509092918490811061416b5761416b61504e565b60009182526020822001548354600480546001600160a01b039093169450916001600160601b039091169081106141a4576141a461504e565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156141ef576141ea8a8460040154610f91565b6141f5565b82600401545b9050614201818a6151f1565b600380840191909155868355830154600284015461271091614222916151c4565b61422c91906151f1565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c81169190911790915560035460405163d09f392d60e01b8152600481018b90526000602482015291169063d09f392d90604401600060405180830381600087803b15801561429e57600080fd5b505af11580156142b2573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016142ec949392919061539e565b600060405180830381600087803b15801561430657600080fd5b505af115801561431a573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516143bf919061528d565b6000604051808303816000865af19150503d80600081146143fc576040519150601f19603f3d011682016040523d82523d6000602084013e614401565b606091505b509150915081801561442b57508051158061442b57508080602001905181019061442b91906150a6565b979650505050505050565b600080600060408451106144ab575050506020810151604082015160608301516001600160601b038316158061447757506004546001600160601b03841610155b1561448157600192505b8160000361448e57600391505b80158061449d57506005548110155b156144a6575060015b6144b6565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016144df9291906153eb565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251614514919061528d565b6000604051808303816000865af19150503d8060008114614551576040519150601f19603f3d011682016040523d82523d6000602084013e614556565b606091505b509150915081801561458057508051158061458057508080602001905181019061458091906150a6565b9695505050505050565b600181600181111561459e5761459e614977565b036145a65750565b60405163a437293760e01b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b826004810192821561460b579160200282015b8281111561460b5782518255916020019190600101906145f0565b50614617929150614655565b5090565b82805482825590600052602060002090810192821561460b579160200282018281111561460b5782518255916020019190600101906145f0565b5b808211156146175760008155600101614656565b6001600160a01b0381168114613ed457600080fd5b60006020828403121561469157600080fd5b813561469c8161466a565b9392505050565b80356001600160601b03811681146146ba57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156146fd576146fd6146bf565b604052919050565b600082601f83011261471657600080fd5b813560206001600160401b03821115614731576147316146bf565b8160051b6147408282016146d5565b928352848101820192828101908785111561475a57600080fd5b83870192505b8483101561442b57823582529183019190830190614760565b8015158114613ed457600080fd5b60008060006060848603121561479c57600080fd5b6147a5846146a3565b925060208401356001600160401b038111156147c057600080fd5b6147cc86828701614705565b92505060408401356147dd81614779565b809150509250925092565b6001600160a01b0391909116815260200190565b60006020828403121561480e57600080fd5b5035919050565b6000806040838503121561482857600080fd5b82356148338161466a565b946020939093013593505050565b60008060006060848603121561485657600080fd5b505081359360208301359350604090920135919050565b60006020828403121561487f57600080fd5b610fe2826146a3565b8060005b6004811015610a5957815184526020938401939091019060010161488c565b60808101610fe58284614888565b600082601f8301126148ca57600080fd5b81356001600160401b038111156148e3576148e36146bf565b6148f6601f8201601f19166020016146d5565b81815284602083860101111561490b57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561493b57600080fd5b82356149468161466a565b915060208301356001600160401b0381111561496157600080fd5b61496d858286016148b9565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b600581106149ab57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016149db604083018661498d565b9215156060820152608001529392505050565b600080600060608486031215614a0357600080fd5b8335614a0e8161466a565b92506020840135915060408401356001600160401b03811115614a3057600080fd5b614a3c868287016148b9565b9150509250925092565b60008060408385031215614a5957600080fd5b614833836146a3565b60008060408385031215614a7557600080fd5b8235614a808161466a565b91506020830135614a9081614779565b809150509250929050565b600080600060608486031215614ab057600080fd5b8335614abb8161466a565b925060208401356001600160401b0381168114614ad757600080fd5b9150604084013560ff811681146147dd57600080fd5b600082601f830112614afe57600080fd5b604051608081018181106001600160401b0382111715614b2057614b206146bf565b604052806080840185811115614b3557600080fd5b845b81811015614b4f578035835260209283019201614b37565b509195945050505050565b6000806000806000806000610140888a031215614b7657600080fd5b614b7f886146a3565b96506020880135614b8f81614779565b955060408801359450606088013593506080880135925060a08801359150614bba8960c08a01614aed565b905092959891949750929550565b60008060408385031215614bdb57600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015614c235781516001600160a01b031687529582019590820190600101614bfe565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152614c89610180850183614bea565b60e08601516101008681019190915286015161012080870191909152860151909250610140614cc2818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101e08a8c031215614cf257600080fd5b8935614cfd8161466a565b985060208a0135614d0d8161466a565b975060408a0135614d1d8161466a565b965060608a0135614d2d8161466a565b955060808a0135614d3d81614779565b9450614d4c8b60a08c01614aed565b9350614d5c8b6101208c01614aed565b92506101a08a01356001600160401b03811115614d7857600080fd5b614d848c828d016148b9565b9250506101c08a0135614d968161466a565b809150509295985092959850929598565b60008060008060008060008060006101808a8c031215614dc657600080fd5b614dcf8a6146a3565b985060208a0135614ddf81614779565b975060408a0135965060608a0135955060808a0135945060a08a01359350614e0a8b60c08c01614aed565b92506101408a01356001600160401b0380821115614e2757600080fd5b614e338d838e016148b9565b93506101608c0135915080821115614e4a57600080fd5b50614e578c828d01614705565b9150509295985092959850929598565b60008060408385031215614e7a57600080fd5b8235915060208301356001600160401b0381111561496157600080fd5b600080600060608486031215614eac57600080fd5b833592506020840135915060408401356001600160401b03811115614a3057600080fd5b60008083601f840112614ee257600080fd5b5081356001600160401b03811115614ef957600080fd5b602083019150836020828501011115614f1157600080fd5b9250929050565b600080600060408486031215614f2d57600080fd5b83356001600160401b03811115614f4357600080fd5b614f4f86828701614ed0565b90945092505060208401356147dd8161466a565b600080600080600060808688031215614f7b57600080fd5b8535945060208601356001600160401b03811115614f9857600080fd5b614fa488828901614ed0565b9095509350506040860135614fb88161466a565b949793965091946060013592915050565b600060208284031215614fdb57600080fd5b81356001600160401b03811115614ff157600080fd5b613203848285016148b9565b6000806000806080858703121561501357600080fd5b843561501e8161466a565b935061502c602086016146a3565b925060408501359150606085013561504381614779565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161508c5761508c615064565b5060010190565b81810381811115610fe557610fe5615064565b6000602082840312156150b857600080fd5b815161469c81614779565b60208101610fe5828461498d565b600181815b8085111561510c5781600019048211156150f2576150f2615064565b808516156150ff57918102915b93841c93908002906150d6565b509250929050565b60008261512357506001610fe5565b8161513057506000610fe5565b816001811461514657600281146151505761516c565b6001915050610fe5565b60ff84111561516157615161615064565b50506001821b610fe5565b5060208310610133831016604e8410600b841016171561518f575081810a610fe5565b61519983836150d1565b80600019048211156151ad576151ad615064565b029392505050565b6000610fe260ff841683615114565b8082028115828204841417610fe557610fe5615064565b634e487b7160e01b600052601260045260246000fd5b600082615200576152006151db565b500490565b60008060006060848603121561521a57600080fd5b83519250602084015161522c81614779565b60408501519092506147dd81614779565b80820180821115610fe557610fe5615064565b60006020828403121561526257600080fd5b5051919050565b60005b8381101561528457818101518382015260200161526c565b50506000910152565b6000825161529f818460208701615269565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261442b60a0830184614888565b600081518084526152f4816020860160208601615269565b601f01601f19169290920160200192915050565b82815260406020820152600061320360408301846152dc565b60006101408083018a1515845260208a8186015289604086015288606086015287608086015261535460a0860188614888565b6101208501929092528451908190526101608401918086019160005b8181101561538c57835185529382019392820192600101615370565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006153bd60808301856152dc565b905082606083015295945050505050565b6000602082840312156153e057600080fd5b815161469c8161466a565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b820161541957615419615064565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615472576154726151db565b500690565b60008060006060848603121561548c57600080fd5b835192506020840151915060408401516147dd8161477956fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122058616b04888240cc8d37ba1cf4119a0c7b9f8bb808137ebdb313ab46eaa623ad64736f6c63430008120033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibeInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingZeroWhenNoStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` 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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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)\":{\"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.\",\"_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.\",\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCore 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\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/KlerosCore.sol\":\"KlerosCore\"},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615aa2620001036000396000818161173d01528181611766015261195d0152615aa26000f3fe6080604052600436106102b35760003560e01c806382d0223711610170578063cf0c38f8116100cc578063ec918b6511610085578063ec918b6514610920578063f6506db414610935578063f7434ea914610955578063fbb519e714610975578063fbf405b014610995578063fc6f8f16146109b5578063fe524c39146109d557600080fd5b8063cf0c38f81461086b578063d07368bd1461088b578063d2b8035a146108ab578063d4d1d76a146108cb578063d98493f6146108e0578063e4c0aaf41461090057600080fd5b8063acdbf51d11610129578063acdbf51d14610790578063afe15cfb146107b0578063b0049637146107e5578063c13517e114610805578063c258bb1914610818578063c356990214610838578063c71f42531461084b57600080fd5b806382d02237146106ce5780638456cb59146106ee57806386541b24146107035780638a9bb02a146107235780638bb0487514610750578063a072b86c1461077057600080fd5b80633cfd11841161021f578063564a565d116101d8578063564a565d146105e357806359ec827e146106145780635c975abb14610634578063751accd01461064e5780637717a6e81461066e5780637934c0be1461068e5780637b4f3cc5146106ae57600080fd5b80633cfd11841461051b5780633f4ba83a14610548578063452a93201461055d5780634f1ef2861461057d57806352d1902d1461059057806354fd4d50146105a557600080fd5b806319b815291161027157806319b81529146103ed5780631c3db16d1461041d5780631f5a0dd21461045a5780632d29a47b146104bb5780632e1daf2f146104db5780632fcb4f04146104fb57600080fd5b8062f5822c146102b85780630219da79146102da5780630b7414bc146103525780630c340a2414610372578063115d53761461039f5780631860592b146103bf575b600080fd5b3480156102c457600080fd5b506102d86102d3366004614be9565b6109f5565b005b3480156102e657600080fd5b506103256102f5366004614be9565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561035e57600080fd5b506102d861036d366004614cfc565b610a42565b34801561037e57600080fd5b50600054610392906001600160a01b031681565b6040516103499190614d5d565b3480156103ab57600080fd5b506102d86103ba366004614d71565b610b79565b3480156103cb57600080fd5b506103df6103da366004614d8a565b6110b0565b604051908152602001610349565b3480156103f957600080fd5b5061040d610408366004614d71565b61110a565b6040519015158152602001610349565b34801561042957600080fd5b5061043d610438366004614d71565b611203565b604080519384529115156020840152151590820152606001610349565b34801561046657600080fd5b5061047a610475366004614d71565b611304565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610349565b3480156104c757600080fd5b506102d86104d6366004614db6565b611363565b3480156104e757600080fd5b50600454610392906001600160a01b031681565b34801561050757600080fd5b506102d8610516366004614be9565b6115ef565b34801561052757600080fd5b5061053b610536366004614ded565b61163c565b6040516103499190614e2b565b34801561055457600080fd5b506102d86116a6565b34801561056957600080fd5b50600154610392906001600160a01b031681565b6102d861058b366004614ea8565b611729565b34801561059c57600080fd5b506103df611950565b3480156105b157600080fd5b506105d6604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516103499190614f47565b3480156105ef57600080fd5b506106036105fe366004614d71565b6119ae565b604051610349959493929190614f92565b34801561062057600080fd5b506103df61062f366004614d71565b611a0a565b34801561064057600080fd5b5060095461040d9060ff1681565b34801561065a57600080fd5b506102d8610669366004614fd1565b611b5f565b34801561067a57600080fd5b506102d8610689366004615029565b611c09565b34801561069a57600080fd5b506102d86106a9366004615045565b611c3b565b3480156106ba57600080fd5b506102d86106c93660046150eb565b611cba565b3480156106da57600080fd5b506102d86106e93660046151cc565b611d92565b3480156106fa57600080fd5b506102d8611e4f565b34801561070f57600080fd5b506102d861071e36600461521e565b611eef565b34801561072f57600080fd5b5061074361073e36600461528c565b6120cc565b60405161034991906152f3565b34801561075c57600080fd5b506102d861076b366004614d71565b612258565b34801561077c57600080fd5b506102d861078b366004615398565b6123bc565b34801561079c57600080fd5b506103926107ab366004614d71565b6126f4565b3480156107bc57600080fd5b506107d06107cb366004614d71565b61271e565b60408051928352602083019190915201610349565b3480156107f157600080fd5b506102d8610800366004614be9565b6127ca565b6103df610813366004615458565b612817565b34801561082457600080fd5b506102d8610833366004614be9565b61284f565b6102d8610846366004615488565b61289c565b34801561085757600080fd5b506103df610866366004614d71565b612d70565b34801561087757600080fd5b50600354610392906001600160a01b031681565b34801561089757600080fd5b506102d86108a6366004614be9565b612dd8565b3480156108b757600080fd5b506102d86108c636600461528c565b612e81565b3480156108d757600080fd5b506006546103df565b3480156108ec57600080fd5b506103df6108fb366004615509565b613196565b34801561090c57600080fd5b506102d861091b366004614be9565b6131e3565b34801561092c57600080fd5b506102d8613230565b34801561094157600080fd5b506103df610950366004615554565b6132e1565b34801561096157600080fd5b506103df6109703660046155ba565b6133c7565b34801561098157600080fd5b506102d86109903660046155ee565b613413565b3480156109a157600080fd5b50600254610392906001600160a01b031681565b3480156109c157600080fd5b506103df6109d0366004614d71565b613453565b3480156109e157600080fd5b5061040d6109f0366004615029565b613482565b6000546001600160a01b03163314610a205760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a6d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b73578115610b0c57828181518110610a9157610a9161563f565b602002602001015160001480610ac457506006548351849083908110610ab957610ab961563f565b602002602001015110155b15610ae257604051633d58a98960e11b815260040160405180910390fd5b610b0784848381518110610af857610af861563f565b602002602001015160016134ca565b610b6b565b6001838281518110610b2057610b2061563f565b602002602001015103610b46576040516356d111fd60e11b815260040160405180910390fd5b610b6b84848381518110610b5c57610b5c61563f565b602002602001015160006134ca565b600101610a70565b50505050565b600060078281548110610b8e57610b8e61563f565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610bc157610bc161563f565b6000918252602082206003850154600c909202019250610be39060019061566b565b90506000836003018281548110610bfc57610bfc61563f565b600091825260208220600b909102019150600185015460ff166004811115610c2657610c26614f5a565b03610d015781158015610c7557506001840154600684019060ff166004811115610c5257610c52614f5a565b60048110610c6257610c6261563f565b01546002850154610c73904261566b565b105b15610c9357604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610cbb576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610cd2576002610cd5565b60015b60018086018054909160ff1990911690836004811115610cf757610cf7614f5a565b0217905550611062565b60018085015460ff166004811115610d1b57610d1b614f5a565b03610e2b576001840154600684019060ff166004811115610d3e57610d3e614f5a565b60048110610d4e57610d4e61563f565b01546002850154610d5f904261566b565b108015610df657506006816000015481548110610d7e57610d7e61563f565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061567e565b155b15610e1457604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610cf7565b6002600185015460ff166004811115610e4657610e46614f5a565b03610f94576001840154600684019060ff166004811115610e6957610e69614f5a565b60048110610e7957610e7961563f565b01546002850154610e8a904261566b565b108015610f2157506006816000015481548110610ea957610ea961563f565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f919061567e565b155b15610f3f57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611062565b6003600185015460ff166004811115610faf57610faf614f5a565b03611029576001840154600684019060ff166004811115610fd257610fd2614f5a565b60048110610fe257610fe261563f565b01546002850154610ff3904261566b565b101561101257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610cf7565b6004600185015460ff16600481111561104457611044614f5a565b03611062576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110a19160ff169061569b565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b0316906110ed90600160481b900460ff16600a61578d565b6110f7908461579c565b61110191906157c9565b90505b92915050565b600080600783815481106111205761112061563f565b60009182526020822060036004909202019081018054919350906111469060019061566b565b815481106111565761115661563f565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061118b5761118b61563f565b90600052602060002090600c020190508060050154826003015410156111b657506000949350505050565b80546005805490916001600160601b03169081106111d6576111d661563f565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061121c5761121c61563f565b60009182526020822060036004909202019081018054919350906112429060019061566b565b815481106112525761125261563f565b90600052602060002090600b020190506000600682600001548154811061127b5761127b61563f565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906157dd565b9199909850909650945050505050565b6005818154811061131457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561138757604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061139d5761139d61563f565b600091825260209091206004918202019150600182015460ff1660048111156113c8576113c8614f5a565b146113e657604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106113fb576113fb61563f565b6000918252602082206004600b9092020190810154909350915061141f8483615815565b60058401546006850154600286015492935090916000906114419083906157c9565b905060008660010154905060008060068960000154815481106114665761146661563f565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190615828565b9150508060000361150257838611156114fd578395505b611522565b61150d84600261579c565b8611156115225761151f84600261579c565b95505b60048801869055865b868110156115ce57848110156115845761157d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613552565b95506115c6565b6115c66040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a23565b60010161152b565b50848860050154146115e257600588018590555b5050505050505050505050565b6000546001600160a01b0316331461161a5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611644614b29565b6005826001600160601b0316815481106116605761166061563f565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116116875750505050509050919050565b6000546001600160a01b031633146116d15760405163c383977560e01b815260040160405180910390fd5b60095460ff166116f45760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61173282613f5b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117b057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a4600080516020615a4d8339815191525490565b6001600160a01b031614155b156117ce5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611828575060408051601f3d908101601f1916820190925261182591810190615828565b60015b6118505781604051630c76093760e01b81526004016118479190614d5d565b60405180910390fd5b600080516020615a4d833981519152811461188157604051632a87526960e21b815260048101829052602401611847565b600080516020615a4d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561194a576000836001600160a01b0316836040516118e89190615841565b600060405180830381855af49150503d8060008114611923576040519150601f19603f3d011682016040523d82523d6000602084013e611928565b606091505b5050905080610b73576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461199b5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615a4d83398151915290565b600781815481106119be57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611a2057611a2061563f565b6000918252602082206003600490920201908101805491935090611a469060019061566b565b81548110611a5657611a5661563f565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a8b57611a8b61563f565b90600052602060002090600c020190508060050154826003015410611b2a5782546001600160601b031660001901611acc576001600160ff1b039350611b57565b6003820154611adc90600261579c565b611ae7906001615815565b81546005805490916001600160601b0316908110611b0757611b0761563f565b90600052602060002090600c020160040154611b23919061579c565b9350611b57565b6003820154611b3a90600261579c565b611b45906001615815565b8160040154611b54919061579c565b93505b505050919050565b6000546001600160a01b03163314611b8a5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611ba59190615841565b60006040518083038185875af1925050503d8060008114611be2576040519150601f19603f3d011682016040523d82523d6000602084013e611be7565b606091505b5050905080610b73576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611c2d57604051636f1dac1d60e01b815260040160405180910390fd5b61194a338383600080613f89565b6000546001600160a01b03163314611c665760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b60016000611cc6614144565b8054909150600160401b900460ff1680611ced575080546001600160401b03808416911610155b15611d0a5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611d3d8c8c8c8c8c8c8c8c8c8c614168565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611dbd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e7557506000546001600160a01b03163314155b15611e9357604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611eb757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611f1a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611f3857611f3861563f565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f9a575080546005805488926001600160601b0316908110611f8657611f8661563f565b90600052602060002090600c020160020154115b15611fb857604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561203357866005836001018381548110611fdf57611fdf61563f565b906000526020600020015481548110611ffa57611ffa61563f565b90600052602060002090600c020160020154101561202b57604051639717078960e01b815260040160405180910390fd5b600101611fbb565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120769060068301908490614b47565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516120ba9695949392919061585d565b60405180910390a25050505050505050565b61213260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106121455761214561563f565b906000526020600020906004020160030182815481106121675761216761563f565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561221657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121f8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061226d5761226d61563f565b600091825260209091206004918202019150600182015460ff16600481111561229857612298614f5a565b146122b657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156122e15760405163c977f8d360e01b815260040160405180910390fd5b60006122ec83611203565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123e75760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106124045761240461563f565b90600052602060002090600c020160020154111561243557604051639717078960e01b815260040160405180910390fd5b80516000036124575760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661247e57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612540578381815181106124d1576124d161563f565b602002602001015160001480612504575060065484518590839081106124f9576124f961563f565b602002602001015110155b1561252257604051633d58a98960e11b815260040160405180910390fd5b61253883858381518110610af857610af861563f565b6001016124b6565b5060016000908152600a8201602052604090205460ff16612574576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125ac916001840191614b85565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125ef9060068301908790614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612621918691899101615890565b600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061266f5761266f61563f565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906126df908e908e908e908e908e908e908d906158a9565b60405180910390a35050505050505050505050565b6006818154811061270457600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106127365761273661563f565b6000918252602090912060049091020190506003600182015460ff16600481111561276357612763614f5a565b036127bb576002810154815460058054929550916001600160601b039091169081106127915761279161563f565b600091825260209091206009600c90920201015460028201546127b49190615815565b91506127c4565b60009250600091505b50915091565b6000546001600160a01b031633146127f55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612822826133c7565b34101561284257604051630e3360f160e21b815260040160405180910390fd5b6111018383600034614488565b6000546001600160a01b0316331461287a5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6128a583611a0a565b3410156128c557604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128da576128da61563f565b6000918252602090912060049091020190506003600182015460ff16600481111561290757612907614f5a565b14612925576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061293b9060019061566b565b8154811061294b5761294b61563f565b90600052602060002090600b0201905060068160000154815481106129725761297261563f565b6000918252602090912001546001600160a01b031633146129a65760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129e9576129e961563f565b90600052602060002090600c020160050154846003015410612af2576005836001600160601b031681548110612a2157612a2161563f565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a5457612a5461563f565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a8057600191505b84546001600160601b03848116911614612af257845460038601546001600160601b0390911690612ab39060019061566b565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b3557612b3561563f565b90600052602060002090600c02019050806004015434612b5591906157c9565b826003018190555061271081600301548260020154612b74919061579c565b612b7e91906157c9565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612bb59161566b565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bf357600080fd5b505af1158015612c07573d6000803e3d6000fd5b505086548454149150612ced90505784546003870154612c299060019061566b565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c7757612c7761563f565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612cba918d918d918d9190600401615928565b600060405180830381600087803b158015612cd457600080fd5b505af1158015612ce8573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d5d919061569b565b60405180910390a2505050505050505050565b60008060078381548110612d8657612d8661563f565b906000526020600020906004020190508060030160018260030180549050612dae919061566b565b81548110612dbe57612dbe61563f565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e035760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e9657612e9661563f565b90600052602060002090600402019050600060018260030180549050612ebc919061566b565b90506000826003018281548110612ed557612ed561563f565b600091825260208220600b909102019150600184015460ff166004811115612eff57612eff614f5a565b14612f1d57604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f3657612f3661563f565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f6b575060038401546006850154105b156131735760006001600160a01b03841663d2b8035a8a84612f8c81615958565b9550612f989087615815565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fff9190615971565b90506001600160a01b0381166130155750612f55565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261304b92869290910161598e565b600060405180830381600087803b15801561306557600080fd5b505af1158015613079573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130c6918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361316d5760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561315457600080fd5b505af1158015613168573d6000803e3d6000fd5b505050505b50612f55565b8084600a0160008282546131879190615815565b90915550505050505050505050565b60006131db826103da86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133c792505050565b949350505050565b6000546001600160a01b0316331461320e5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003600061323c614144565b8054909150600160401b900460ff1680613263575080546001600160401b03808416911610155b156132805760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03821660009081526008602052604081205460ff1661331a5760405163e51cf7bf60e01b815260040160405180910390fd5b613325858585613196565b82101561334557604051630e3360f160e21b815260040160405180910390fd5b61335a6001600160a01b03841633308561476f565b613377576040516312171d8360e31b815260040160405180910390fd5b6133bb8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506144889050565b90505b95945050505050565b60008060006133d58461484b565b5091509150806005836001600160601b0316815481106133f7576133f761563f565b90600052602060002090600c0201600401546131db919061579c565b6004546001600160a01b0316331461343e57604051639d6cab9960e01b815260040160405180910390fd5b61344c848484846001613f89565b5050505050565b6000600782815481106134685761346861563f565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134a0576134a061563f565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134e7576134e761563f565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061356c5761356c61563f565b906000526020600020906004020190506000816003018460200151815481106135975761359761563f565b90600052602060002090600b02019050600060068260000154815481106135c0576135c061563f565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061366a9190615828565b905061271081111561367b57506127105b600061271061368a838261566b565b8560010154613699919061579c565b6136a391906157c9565b9050808760c0018181516136b79190615815565b90525060e08701516006850180546000929081106136d7576136d761563f565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161371891859187910161598e565b600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061377b91859187910161598e565b600060405180830381600087803b15801561379557600080fd5b505af11580156137a9573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137e9876159a7565b60098b015460405161380b9392916000916001600160a01b03909116906159c3565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613896919061567e565b6138fc576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138c991859101614d5d565b600060405180830381600087803b1580156138e357600080fd5b505af11580156138f7573d6000803e3d6000fd5b505050505b6001886060015161390d919061566b565b8860e0015114801561392157506040880151155b15613a125760098501546001600160a01b031661396a576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613991565b6000546002860154600987015461398f926001600160a01b03918216929116906148d2565b505b60005460c08901516002546139b4926001600160a01b03918216929116906148d2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a0993909290916001600160a01b03909116906159e7565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a3c57613a3c61563f565b90600052602060002090600402019050600081600301836020015181548110613a6757613a6761563f565b90600052602060002090600b0201905060006006826000015481548110613a9057613a9061563f565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613acf91615a06565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b539190615828565b9050612710811115613b6457506127105b60008360060186606001518760e00151613b7e9190615a06565b81548110613b8e57613b8e61563f565b600091825260208220015460018601546001600160a01b03909116925061271090613bba90859061579c565b613bc491906157c9565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613bf691869186910161598e565b600060405180830381600087803b158015613c1057600080fd5b505af1158015613c24573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c5791869101614d5d565b602060405180830381865afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c98919061567e565b613cb557600254613cb3906001600160a01b031683836148d2565b505b60006127108489604001518a60c00151613ccf91906157c9565b613cd9919061579c565b613ce391906157c9565b905080866008016000828254613cf99190615815565b925050819055506000612710858a604001518960020154613d1a91906157c9565b613d24919061579c565b613d2e91906157c9565b905080876007016000828254613d449190615815565b9091555050600254613d60906001600160a01b031685846148d2565b5060098701546001600160a01b0316613d9e576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613db9565b6009870154613db7906001600160a01b031685836148d2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e09928c928a928a92909116906159c3565b60405180910390a4600189606001516002613e24919061579c565b613e2e919061566b565b8960e0015103613f5057600087600801548a60c00151613e4e919061566b565b9050600088600701548960020154613e66919061566b565b905081151580613e7557508015155b156115e2578115613e9f57600054600254613e9d916001600160a01b039182169116846148d2565b505b8015613f065760098901546001600160a01b0316613ee557600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f06565b60005460098a0154613f04916001600160a01b039182169116836148d2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126df91879187916001600160a01b03909116906159e7565b505050505050505050565b6000546001600160a01b03163314613f865760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fac57506005546001600160601b03861610155b15613fc457613fbc82600461499f565b5060006133be565b8315801590613fff57506005856001600160601b031681548110613fea57613fea61563f565b90600052602060002090600c02016002015484105b1561400f57613fbc82600561499f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a69190615a1a565b9194509250905060008160088111156140c1576140c1614f5a565b146140dc576140d0858261499f565b600093505050506133be565b8215614109576002546140fa906001600160a01b03168a308661476f565b614109576140d085600161499f565b811561413557600254614126906001600160a01b03168a846148d2565b614135576140d085600261499f565b50600198975050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614170614ae8565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261426292879101615890565b600060405180830381600087803b15801561427c57600080fd5b505af1158015614290573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516142fe916001840191602090910190614b85565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561434d9060068301908690614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161438091600191889101615890565b600060405180830381600087803b15801561439a57600080fd5b505af11580156143ae573d6000803e3d6000fd5b5060009250600191506143be9050565b6040519080825280602002602001820160405280156143e7578160200160208202803683370190505b5090506001816000815181106143ff576143ff61563f565b60209081029190910181019190915282548751918801516040808a015160608b015191516001600160601b03909416946001947f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee694614465948f9491928e908b906158a9565b60405180910390a361447a60018060016134ca565b505050505050505050505050565b60008060006144968661484b565b92505091506005826001600160601b0316815481106144b7576144b761563f565b60009182526020808320848452600a600c90930201919091019052604090205460ff166144f75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106145825761458261563f565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106145b8576145b861563f565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614603576145fe8a84600401546110b0565b614609565b82600401545b9050614615818a6157c9565b6003808401919091558683558301546002840154612710916146369161579c565b61464091906157c9565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156146b357600080fd5b505af11580156146c7573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147019493929190615928565b600060405180830381600087803b15801561471b57600080fd5b505af115801561472f573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516147d49190615841565b6000604051808303816000865af19150503d8060008114614811576040519150601f19603f3d011682016040523d82523d6000602084013e614816565b606091505b5091509150818015614840575080511580614840575080806020019051810190614840919061567e565b979650505050505050565b600080600060408451106148c0575050506020810151604082015160608301516001600160601b038316158061488c57506005546001600160601b03841610155b1561489657600192505b816000036148a357600391505b8015806148b257506006548110155b156148bb575060015b6148cb565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016148f492919061598e565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516149299190615841565b6000604051808303816000865af19150503d8060008114614966576040519150601f19603f3d011682016040523d82523d6000602084013e61496b565b606091505b5091509150818015614995575080511580614995575080806020019051810190614995919061567e565b9695505050505050565b60018260018111156149b3576149b3614f5a565b036149bc575050565b60018160088111156149d0576149d0614f5a565b036149ee57604051630f323ed960e11b815260040160405180910390fd5b6002816008811115614a0257614a02614f5a565b03614a205760405163e45e13a360e01b815260040160405180910390fd5b6003816008811115614a3457614a34614f5a565b03614a5257604051631d91d0ed60e31b815260040160405180910390fd5b6004816008811115614a6657614a66614f5a565b03614a84576040516321f1774b60e11b815260040160405180910390fd5b6005816008811115614a9857614a98614f5a565b03614ab657604051630caac6b360e31b815260040160405180910390fd5b6008816008811115614aca57614aca614f5a565b0361194c57604051633e57962f60e21b815260040160405180910390fd5b614af0614b0f565b614b0d57604051631afcd79f60e31b815260040160405180910390fd5b565b6000614b19614144565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614b75579160200282015b82811115614b75578251825591602001919060010190614b5a565b50614b81929150614bbf565b5090565b828054828255906000526020600020908101928215614b755791602002820182811115614b75578251825591602001919060010190614b5a565b5b80821115614b815760008155600101614bc0565b6001600160a01b0381168114613f8657600080fd5b600060208284031215614bfb57600080fd5b8135614c0681614bd4565b9392505050565b80356001600160601b0381168114614c2457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614c6757614c67614c29565b604052919050565b600082601f830112614c8057600080fd5b813560206001600160401b03821115614c9b57614c9b614c29565b8160051b614caa828201614c3f565b9283528481018201928281019087851115614cc457600080fd5b83870192505b8483101561484057823582529183019190830190614cca565b8015158114613f8657600080fd5b8035614c2481614ce3565b600080600060608486031215614d1157600080fd5b614d1a84614c0d565b925060208401356001600160401b03811115614d3557600080fd5b614d4186828701614c6f565b9250506040840135614d5281614ce3565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614d8357600080fd5b5035919050565b60008060408385031215614d9d57600080fd5b8235614da881614bd4565b946020939093013593505050565b600080600060608486031215614dcb57600080fd5b505081359360208301359350604090920135919050565b8035614c2481614bd4565b600060208284031215614dff57600080fd5b61110182614c0d565b8060005b6004811015610b73578151845260209384019390910190600101614e0c565b608081016111048284614e08565b600082601f830112614e4a57600080fd5b81356001600160401b03811115614e6357614e63614c29565b614e76601f8201601f1916602001614c3f565b818152846020838601011115614e8b57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ebb57600080fd5b8235614ec681614bd4565b915060208301356001600160401b03811115614ee157600080fd5b614eed85828601614e39565b9150509250929050565b60005b83811015614f12578181015183820152602001614efa565b50506000910152565b60008151808452614f33816020860160208601614ef7565b601f01601f19169290920160200192915050565b6020815260006111016020830184614f1b565b634e487b7160e01b600052602160045260246000fd5b60058110614f8e57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614fbe6040830186614f70565b9215156060820152608001529392505050565b600080600060608486031215614fe657600080fd5b8335614ff181614bd4565b92506020840135915060408401356001600160401b0381111561501357600080fd5b61501f86828701614e39565b9150509250925092565b6000806040838503121561503c57600080fd5b614da883614c0d565b6000806040838503121561505857600080fd5b823561506381614bd4565b9150602083013561507381614ce3565b809150509250929050565b600082601f83011261508f57600080fd5b604051608081018181106001600160401b03821117156150b1576150b1614c29565b6040528060808401858111156150c657600080fd5b845b818110156150e05780358352602092830192016150c8565b509195945050505050565b6000806000806000806000806000806102008b8d03121561510b57600080fd5b8a3561511681614bd4565b995060208b013561512681614bd4565b985060408b013561513681614bd4565b975060608b013561514681614bd4565b965060808b013561515681614bd4565b955061516460a08c01614cf1565b94506151738c60c08d0161507e565b93506151838c6101408d0161507e565b92506101c08b01356001600160401b0381111561519f57600080fd5b6151ab8d828e01614e39565b9250506151bb6101e08c01614de2565b90509295989b9194979a5092959850565b6000806000606084860312156151e157600080fd5b83356151ec81614bd4565b925060208401356001600160401b038116811461520857600080fd5b9150604084013560ff81168114614d5257600080fd5b6000806000806000806000610140888a03121561523a57600080fd5b61524388614c0d565b9650602088013561525381614ce3565b955060408801359450606088013593506080880135925060a0880135915061527e8960c08a0161507e565b905092959891949750929550565b6000806040838503121561529f57600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156152e85781516001600160a01b0316875295820195908201906001016152c3565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261534e6101808501836152ae565b60e08601516101008681019190915286015161012080870191909152860151909250610140615387818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c0312156153b757600080fd5b6153c08a614c0d565b985060208a01356153d081614ce3565b975060408a0135965060608a0135955060808a0135945060a08a013593506153fb8b60c08c0161507e565b92506101408a01356001600160401b038082111561541857600080fd5b6154248d838e01614e39565b93506101608c013591508082111561543b57600080fd5b506154488c828d01614c6f565b9150509295985092959850929598565b6000806040838503121561546b57600080fd5b8235915060208301356001600160401b03811115614ee157600080fd5b60008060006060848603121561549d57600080fd5b833592506020840135915060408401356001600160401b0381111561501357600080fd5b60008083601f8401126154d357600080fd5b5081356001600160401b038111156154ea57600080fd5b60208301915083602082850101111561550257600080fd5b9250929050565b60008060006040848603121561551e57600080fd5b83356001600160401b0381111561553457600080fd5b615540868287016154c1565b9094509250506020840135614d5281614bd4565b60008060008060006080868803121561556c57600080fd5b8535945060208601356001600160401b0381111561558957600080fd5b615595888289016154c1565b90955093505060408601356155a981614bd4565b949793965091946060013592915050565b6000602082840312156155cc57600080fd5b81356001600160401b038111156155e257600080fd5b6131db84828501614e39565b6000806000806080858703121561560457600080fd5b843561560f81614bd4565b935061561d60208601614c0d565b925060408501359150606085013561563481614ce3565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561110457611104615655565b60006020828403121561569057600080fd5b8151614c0681614ce3565b602081016111048284614f70565b600181815b808511156156e45781600019048211156156ca576156ca615655565b808516156156d757918102915b93841c93908002906156ae565b509250929050565b6000826156fb57506001611104565b8161570857506000611104565b816001811461571e576002811461572857615744565b6001915050611104565b60ff84111561573957615739615655565b50506001821b611104565b5060208310610133831016604e8410600b8410161715615767575081810a611104565b61577183836156a9565b806000190482111561578557615785615655565b029392505050565b600061110160ff8416836156ec565b808202811582820484141761110457611104615655565b634e487b7160e01b600052601260045260246000fd5b6000826157d8576157d86157b3565b500490565b6000806000606084860312156157f257600080fd5b83519250602084015161580481614ce3565b6040850151909250614d5281614ce3565b8082018082111561110457611104615655565b60006020828403121561583a57600080fd5b5051919050565b60008251615853818460208701614ef7565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261484060a0830184614e08565b8281526040602082015260006131db6040830184614f1b565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526158dd60a0860188614e08565b610120850192909252845190819052610160840191602086019160005b81811015615916578351855293820193928201926001016158fa565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006159476080830185614f1b565b905082606083015295945050505050565b60006001820161596a5761596a615655565b5060010190565b60006020828403121561598357600080fd5b8151614c0681614bd4565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016159bc576159bc615655565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615a1557615a156157b3565b500690565b600080600060608486031215615a2f57600080fd5b8351925060208401519150604084015160098110614d5257600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209d3f5f848e5c977c06ce8a04a67787edb996e48a4f1a486ddef204a4e19f4a0664736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106102b35760003560e01c806382d0223711610170578063cf0c38f8116100cc578063ec918b6511610085578063ec918b6514610920578063f6506db414610935578063f7434ea914610955578063fbb519e714610975578063fbf405b014610995578063fc6f8f16146109b5578063fe524c39146109d557600080fd5b8063cf0c38f81461086b578063d07368bd1461088b578063d2b8035a146108ab578063d4d1d76a146108cb578063d98493f6146108e0578063e4c0aaf41461090057600080fd5b8063acdbf51d11610129578063acdbf51d14610790578063afe15cfb146107b0578063b0049637146107e5578063c13517e114610805578063c258bb1914610818578063c356990214610838578063c71f42531461084b57600080fd5b806382d02237146106ce5780638456cb59146106ee57806386541b24146107035780638a9bb02a146107235780638bb0487514610750578063a072b86c1461077057600080fd5b80633cfd11841161021f578063564a565d116101d8578063564a565d146105e357806359ec827e146106145780635c975abb14610634578063751accd01461064e5780637717a6e81461066e5780637934c0be1461068e5780637b4f3cc5146106ae57600080fd5b80633cfd11841461051b5780633f4ba83a14610548578063452a93201461055d5780634f1ef2861461057d57806352d1902d1461059057806354fd4d50146105a557600080fd5b806319b815291161027157806319b81529146103ed5780631c3db16d1461041d5780631f5a0dd21461045a5780632d29a47b146104bb5780632e1daf2f146104db5780632fcb4f04146104fb57600080fd5b8062f5822c146102b85780630219da79146102da5780630b7414bc146103525780630c340a2414610372578063115d53761461039f5780631860592b146103bf575b600080fd5b3480156102c457600080fd5b506102d86102d3366004614be9565b6109f5565b005b3480156102e657600080fd5b506103256102f5366004614be9565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561035e57600080fd5b506102d861036d366004614cfc565b610a42565b34801561037e57600080fd5b50600054610392906001600160a01b031681565b6040516103499190614d5d565b3480156103ab57600080fd5b506102d86103ba366004614d71565b610b79565b3480156103cb57600080fd5b506103df6103da366004614d8a565b6110b0565b604051908152602001610349565b3480156103f957600080fd5b5061040d610408366004614d71565b61110a565b6040519015158152602001610349565b34801561042957600080fd5b5061043d610438366004614d71565b611203565b604080519384529115156020840152151590820152606001610349565b34801561046657600080fd5b5061047a610475366004614d71565b611304565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610349565b3480156104c757600080fd5b506102d86104d6366004614db6565b611363565b3480156104e757600080fd5b50600454610392906001600160a01b031681565b34801561050757600080fd5b506102d8610516366004614be9565b6115ef565b34801561052757600080fd5b5061053b610536366004614ded565b61163c565b6040516103499190614e2b565b34801561055457600080fd5b506102d86116a6565b34801561056957600080fd5b50600154610392906001600160a01b031681565b6102d861058b366004614ea8565b611729565b34801561059c57600080fd5b506103df611950565b3480156105b157600080fd5b506105d6604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516103499190614f47565b3480156105ef57600080fd5b506106036105fe366004614d71565b6119ae565b604051610349959493929190614f92565b34801561062057600080fd5b506103df61062f366004614d71565b611a0a565b34801561064057600080fd5b5060095461040d9060ff1681565b34801561065a57600080fd5b506102d8610669366004614fd1565b611b5f565b34801561067a57600080fd5b506102d8610689366004615029565b611c09565b34801561069a57600080fd5b506102d86106a9366004615045565b611c3b565b3480156106ba57600080fd5b506102d86106c93660046150eb565b611cba565b3480156106da57600080fd5b506102d86106e93660046151cc565b611d92565b3480156106fa57600080fd5b506102d8611e4f565b34801561070f57600080fd5b506102d861071e36600461521e565b611eef565b34801561072f57600080fd5b5061074361073e36600461528c565b6120cc565b60405161034991906152f3565b34801561075c57600080fd5b506102d861076b366004614d71565b612258565b34801561077c57600080fd5b506102d861078b366004615398565b6123bc565b34801561079c57600080fd5b506103926107ab366004614d71565b6126f4565b3480156107bc57600080fd5b506107d06107cb366004614d71565b61271e565b60408051928352602083019190915201610349565b3480156107f157600080fd5b506102d8610800366004614be9565b6127ca565b6103df610813366004615458565b612817565b34801561082457600080fd5b506102d8610833366004614be9565b61284f565b6102d8610846366004615488565b61289c565b34801561085757600080fd5b506103df610866366004614d71565b612d70565b34801561087757600080fd5b50600354610392906001600160a01b031681565b34801561089757600080fd5b506102d86108a6366004614be9565b612dd8565b3480156108b757600080fd5b506102d86108c636600461528c565b612e81565b3480156108d757600080fd5b506006546103df565b3480156108ec57600080fd5b506103df6108fb366004615509565b613196565b34801561090c57600080fd5b506102d861091b366004614be9565b6131e3565b34801561092c57600080fd5b506102d8613230565b34801561094157600080fd5b506103df610950366004615554565b6132e1565b34801561096157600080fd5b506103df6109703660046155ba565b6133c7565b34801561098157600080fd5b506102d86109903660046155ee565b613413565b3480156109a157600080fd5b50600254610392906001600160a01b031681565b3480156109c157600080fd5b506103df6109d0366004614d71565b613453565b3480156109e157600080fd5b5061040d6109f0366004615029565b613482565b6000546001600160a01b03163314610a205760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a6d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b73578115610b0c57828181518110610a9157610a9161563f565b602002602001015160001480610ac457506006548351849083908110610ab957610ab961563f565b602002602001015110155b15610ae257604051633d58a98960e11b815260040160405180910390fd5b610b0784848381518110610af857610af861563f565b602002602001015160016134ca565b610b6b565b6001838281518110610b2057610b2061563f565b602002602001015103610b46576040516356d111fd60e11b815260040160405180910390fd5b610b6b84848381518110610b5c57610b5c61563f565b602002602001015160006134ca565b600101610a70565b50505050565b600060078281548110610b8e57610b8e61563f565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610bc157610bc161563f565b6000918252602082206003850154600c909202019250610be39060019061566b565b90506000836003018281548110610bfc57610bfc61563f565b600091825260208220600b909102019150600185015460ff166004811115610c2657610c26614f5a565b03610d015781158015610c7557506001840154600684019060ff166004811115610c5257610c52614f5a565b60048110610c6257610c6261563f565b01546002850154610c73904261566b565b105b15610c9357604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610cbb576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610cd2576002610cd5565b60015b60018086018054909160ff1990911690836004811115610cf757610cf7614f5a565b0217905550611062565b60018085015460ff166004811115610d1b57610d1b614f5a565b03610e2b576001840154600684019060ff166004811115610d3e57610d3e614f5a565b60048110610d4e57610d4e61563f565b01546002850154610d5f904261566b565b108015610df657506006816000015481548110610d7e57610d7e61563f565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061567e565b155b15610e1457604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610cf7565b6002600185015460ff166004811115610e4657610e46614f5a565b03610f94576001840154600684019060ff166004811115610e6957610e69614f5a565b60048110610e7957610e7961563f565b01546002850154610e8a904261566b565b108015610f2157506006816000015481548110610ea957610ea961563f565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f919061567e565b155b15610f3f57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611062565b6003600185015460ff166004811115610faf57610faf614f5a565b03611029576001840154600684019060ff166004811115610fd257610fd2614f5a565b60048110610fe257610fe261563f565b01546002850154610ff3904261566b565b101561101257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610cf7565b6004600185015460ff16600481111561104457611044614f5a565b03611062576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110a19160ff169061569b565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b0316906110ed90600160481b900460ff16600a61578d565b6110f7908461579c565b61110191906157c9565b90505b92915050565b600080600783815481106111205761112061563f565b60009182526020822060036004909202019081018054919350906111469060019061566b565b815481106111565761115661563f565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061118b5761118b61563f565b90600052602060002090600c020190508060050154826003015410156111b657506000949350505050565b80546005805490916001600160601b03169081106111d6576111d661563f565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061121c5761121c61563f565b60009182526020822060036004909202019081018054919350906112429060019061566b565b815481106112525761125261563f565b90600052602060002090600b020190506000600682600001548154811061127b5761127b61563f565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906157dd565b9199909850909650945050505050565b6005818154811061131457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561138757604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061139d5761139d61563f565b600091825260209091206004918202019150600182015460ff1660048111156113c8576113c8614f5a565b146113e657604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106113fb576113fb61563f565b6000918252602082206004600b9092020190810154909350915061141f8483615815565b60058401546006850154600286015492935090916000906114419083906157c9565b905060008660010154905060008060068960000154815481106114665761146661563f565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190615828565b9150508060000361150257838611156114fd578395505b611522565b61150d84600261579c565b8611156115225761151f84600261579c565b95505b60048801869055865b868110156115ce57848110156115845761157d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613552565b95506115c6565b6115c66040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a23565b60010161152b565b50848860050154146115e257600588018590555b5050505050505050505050565b6000546001600160a01b0316331461161a5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611644614b29565b6005826001600160601b0316815481106116605761166061563f565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116116875750505050509050919050565b6000546001600160a01b031633146116d15760405163c383977560e01b815260040160405180910390fd5b60095460ff166116f45760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61173282613f5b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117b057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a4600080516020615a4d8339815191525490565b6001600160a01b031614155b156117ce5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611828575060408051601f3d908101601f1916820190925261182591810190615828565b60015b6118505781604051630c76093760e01b81526004016118479190614d5d565b60405180910390fd5b600080516020615a4d833981519152811461188157604051632a87526960e21b815260048101829052602401611847565b600080516020615a4d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561194a576000836001600160a01b0316836040516118e89190615841565b600060405180830381855af49150503d8060008114611923576040519150601f19603f3d011682016040523d82523d6000602084013e611928565b606091505b5050905080610b73576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461199b5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615a4d83398151915290565b600781815481106119be57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611a2057611a2061563f565b6000918252602082206003600490920201908101805491935090611a469060019061566b565b81548110611a5657611a5661563f565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a8b57611a8b61563f565b90600052602060002090600c020190508060050154826003015410611b2a5782546001600160601b031660001901611acc576001600160ff1b039350611b57565b6003820154611adc90600261579c565b611ae7906001615815565b81546005805490916001600160601b0316908110611b0757611b0761563f565b90600052602060002090600c020160040154611b23919061579c565b9350611b57565b6003820154611b3a90600261579c565b611b45906001615815565b8160040154611b54919061579c565b93505b505050919050565b6000546001600160a01b03163314611b8a5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611ba59190615841565b60006040518083038185875af1925050503d8060008114611be2576040519150601f19603f3d011682016040523d82523d6000602084013e611be7565b606091505b5050905080610b73576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611c2d57604051636f1dac1d60e01b815260040160405180910390fd5b61194a338383600080613f89565b6000546001600160a01b03163314611c665760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b60016000611cc6614144565b8054909150600160401b900460ff1680611ced575080546001600160401b03808416911610155b15611d0a5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611d3d8c8c8c8c8c8c8c8c8c8c614168565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611dbd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e7557506000546001600160a01b03163314155b15611e9357604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611eb757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611f1a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611f3857611f3861563f565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f9a575080546005805488926001600160601b0316908110611f8657611f8661563f565b90600052602060002090600c020160020154115b15611fb857604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561203357866005836001018381548110611fdf57611fdf61563f565b906000526020600020015481548110611ffa57611ffa61563f565b90600052602060002090600c020160020154101561202b57604051639717078960e01b815260040160405180910390fd5b600101611fbb565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120769060068301908490614b47565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516120ba9695949392919061585d565b60405180910390a25050505050505050565b61213260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106121455761214561563f565b906000526020600020906004020160030182815481106121675761216761563f565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561221657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121f8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061226d5761226d61563f565b600091825260209091206004918202019150600182015460ff16600481111561229857612298614f5a565b146122b657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156122e15760405163c977f8d360e01b815260040160405180910390fd5b60006122ec83611203565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123e75760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106124045761240461563f565b90600052602060002090600c020160020154111561243557604051639717078960e01b815260040160405180910390fd5b80516000036124575760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661247e57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612540578381815181106124d1576124d161563f565b602002602001015160001480612504575060065484518590839081106124f9576124f961563f565b602002602001015110155b1561252257604051633d58a98960e11b815260040160405180910390fd5b61253883858381518110610af857610af861563f565b6001016124b6565b5060016000908152600a8201602052604090205460ff16612574576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125ac916001840191614b85565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125ef9060068301908790614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612621918691899101615890565b600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061266f5761266f61563f565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906126df908e908e908e908e908e908e908d906158a9565b60405180910390a35050505050505050505050565b6006818154811061270457600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106127365761273661563f565b6000918252602090912060049091020190506003600182015460ff16600481111561276357612763614f5a565b036127bb576002810154815460058054929550916001600160601b039091169081106127915761279161563f565b600091825260209091206009600c90920201015460028201546127b49190615815565b91506127c4565b60009250600091505b50915091565b6000546001600160a01b031633146127f55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612822826133c7565b34101561284257604051630e3360f160e21b815260040160405180910390fd5b6111018383600034614488565b6000546001600160a01b0316331461287a5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6128a583611a0a565b3410156128c557604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128da576128da61563f565b6000918252602090912060049091020190506003600182015460ff16600481111561290757612907614f5a565b14612925576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061293b9060019061566b565b8154811061294b5761294b61563f565b90600052602060002090600b0201905060068160000154815481106129725761297261563f565b6000918252602090912001546001600160a01b031633146129a65760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129e9576129e961563f565b90600052602060002090600c020160050154846003015410612af2576005836001600160601b031681548110612a2157612a2161563f565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a5457612a5461563f565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a8057600191505b84546001600160601b03848116911614612af257845460038601546001600160601b0390911690612ab39060019061566b565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b3557612b3561563f565b90600052602060002090600c02019050806004015434612b5591906157c9565b826003018190555061271081600301548260020154612b74919061579c565b612b7e91906157c9565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612bb59161566b565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bf357600080fd5b505af1158015612c07573d6000803e3d6000fd5b505086548454149150612ced90505784546003870154612c299060019061566b565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c7757612c7761563f565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612cba918d918d918d9190600401615928565b600060405180830381600087803b158015612cd457600080fd5b505af1158015612ce8573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d5d919061569b565b60405180910390a2505050505050505050565b60008060078381548110612d8657612d8661563f565b906000526020600020906004020190508060030160018260030180549050612dae919061566b565b81548110612dbe57612dbe61563f565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e035760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e9657612e9661563f565b90600052602060002090600402019050600060018260030180549050612ebc919061566b565b90506000826003018281548110612ed557612ed561563f565b600091825260208220600b909102019150600184015460ff166004811115612eff57612eff614f5a565b14612f1d57604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f3657612f3661563f565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f6b575060038401546006850154105b156131735760006001600160a01b03841663d2b8035a8a84612f8c81615958565b9550612f989087615815565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fff9190615971565b90506001600160a01b0381166130155750612f55565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261304b92869290910161598e565b600060405180830381600087803b15801561306557600080fd5b505af1158015613079573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130c6918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361316d5760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561315457600080fd5b505af1158015613168573d6000803e3d6000fd5b505050505b50612f55565b8084600a0160008282546131879190615815565b90915550505050505050505050565b60006131db826103da86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133c792505050565b949350505050565b6000546001600160a01b0316331461320e5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003600061323c614144565b8054909150600160401b900460ff1680613263575080546001600160401b03808416911610155b156132805760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03821660009081526008602052604081205460ff1661331a5760405163e51cf7bf60e01b815260040160405180910390fd5b613325858585613196565b82101561334557604051630e3360f160e21b815260040160405180910390fd5b61335a6001600160a01b03841633308561476f565b613377576040516312171d8360e31b815260040160405180910390fd5b6133bb8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506144889050565b90505b95945050505050565b60008060006133d58461484b565b5091509150806005836001600160601b0316815481106133f7576133f761563f565b90600052602060002090600c0201600401546131db919061579c565b6004546001600160a01b0316331461343e57604051639d6cab9960e01b815260040160405180910390fd5b61344c848484846001613f89565b5050505050565b6000600782815481106134685761346861563f565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134a0576134a061563f565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134e7576134e761563f565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061356c5761356c61563f565b906000526020600020906004020190506000816003018460200151815481106135975761359761563f565b90600052602060002090600b02019050600060068260000154815481106135c0576135c061563f565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061366a9190615828565b905061271081111561367b57506127105b600061271061368a838261566b565b8560010154613699919061579c565b6136a391906157c9565b9050808760c0018181516136b79190615815565b90525060e08701516006850180546000929081106136d7576136d761563f565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161371891859187910161598e565b600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061377b91859187910161598e565b600060405180830381600087803b15801561379557600080fd5b505af11580156137a9573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137e9876159a7565b60098b015460405161380b9392916000916001600160a01b03909116906159c3565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613896919061567e565b6138fc576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138c991859101614d5d565b600060405180830381600087803b1580156138e357600080fd5b505af11580156138f7573d6000803e3d6000fd5b505050505b6001886060015161390d919061566b565b8860e0015114801561392157506040880151155b15613a125760098501546001600160a01b031661396a576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613991565b6000546002860154600987015461398f926001600160a01b03918216929116906148d2565b505b60005460c08901516002546139b4926001600160a01b03918216929116906148d2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a0993909290916001600160a01b03909116906159e7565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a3c57613a3c61563f565b90600052602060002090600402019050600081600301836020015181548110613a6757613a6761563f565b90600052602060002090600b0201905060006006826000015481548110613a9057613a9061563f565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613acf91615a06565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b539190615828565b9050612710811115613b6457506127105b60008360060186606001518760e00151613b7e9190615a06565b81548110613b8e57613b8e61563f565b600091825260208220015460018601546001600160a01b03909116925061271090613bba90859061579c565b613bc491906157c9565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613bf691869186910161598e565b600060405180830381600087803b158015613c1057600080fd5b505af1158015613c24573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c5791869101614d5d565b602060405180830381865afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c98919061567e565b613cb557600254613cb3906001600160a01b031683836148d2565b505b60006127108489604001518a60c00151613ccf91906157c9565b613cd9919061579c565b613ce391906157c9565b905080866008016000828254613cf99190615815565b925050819055506000612710858a604001518960020154613d1a91906157c9565b613d24919061579c565b613d2e91906157c9565b905080876007016000828254613d449190615815565b9091555050600254613d60906001600160a01b031685846148d2565b5060098701546001600160a01b0316613d9e576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613db9565b6009870154613db7906001600160a01b031685836148d2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e09928c928a928a92909116906159c3565b60405180910390a4600189606001516002613e24919061579c565b613e2e919061566b565b8960e0015103613f5057600087600801548a60c00151613e4e919061566b565b9050600088600701548960020154613e66919061566b565b905081151580613e7557508015155b156115e2578115613e9f57600054600254613e9d916001600160a01b039182169116846148d2565b505b8015613f065760098901546001600160a01b0316613ee557600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f06565b60005460098a0154613f04916001600160a01b039182169116836148d2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126df91879187916001600160a01b03909116906159e7565b505050505050505050565b6000546001600160a01b03163314613f865760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fac57506005546001600160601b03861610155b15613fc457613fbc82600461499f565b5060006133be565b8315801590613fff57506005856001600160601b031681548110613fea57613fea61563f565b90600052602060002090600c02016002015484105b1561400f57613fbc82600561499f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a69190615a1a565b9194509250905060008160088111156140c1576140c1614f5a565b146140dc576140d0858261499f565b600093505050506133be565b8215614109576002546140fa906001600160a01b03168a308661476f565b614109576140d085600161499f565b811561413557600254614126906001600160a01b03168a846148d2565b614135576140d085600261499f565b50600198975050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614170614ae8565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261426292879101615890565b600060405180830381600087803b15801561427c57600080fd5b505af1158015614290573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516142fe916001840191602090910190614b85565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561434d9060068301908690614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161438091600191889101615890565b600060405180830381600087803b15801561439a57600080fd5b505af11580156143ae573d6000803e3d6000fd5b5060009250600191506143be9050565b6040519080825280602002602001820160405280156143e7578160200160208202803683370190505b5090506001816000815181106143ff576143ff61563f565b60209081029190910181019190915282548751918801516040808a015160608b015191516001600160601b03909416946001947f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee694614465948f9491928e908b906158a9565b60405180910390a361447a60018060016134ca565b505050505050505050505050565b60008060006144968661484b565b92505091506005826001600160601b0316815481106144b7576144b761563f565b60009182526020808320848452600a600c90930201919091019052604090205460ff166144f75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106145825761458261563f565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106145b8576145b861563f565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614603576145fe8a84600401546110b0565b614609565b82600401545b9050614615818a6157c9565b6003808401919091558683558301546002840154612710916146369161579c565b61464091906157c9565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156146b357600080fd5b505af11580156146c7573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147019493929190615928565b600060405180830381600087803b15801561471b57600080fd5b505af115801561472f573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516147d49190615841565b6000604051808303816000865af19150503d8060008114614811576040519150601f19603f3d011682016040523d82523d6000602084013e614816565b606091505b5091509150818015614840575080511580614840575080806020019051810190614840919061567e565b979650505050505050565b600080600060408451106148c0575050506020810151604082015160608301516001600160601b038316158061488c57506005546001600160601b03841610155b1561489657600192505b816000036148a357600391505b8015806148b257506006548110155b156148bb575060015b6148cb565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016148f492919061598e565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516149299190615841565b6000604051808303816000865af19150503d8060008114614966576040519150601f19603f3d011682016040523d82523d6000602084013e61496b565b606091505b5091509150818015614995575080511580614995575080806020019051810190614995919061567e565b9695505050505050565b60018260018111156149b3576149b3614f5a565b036149bc575050565b60018160088111156149d0576149d0614f5a565b036149ee57604051630f323ed960e11b815260040160405180910390fd5b6002816008811115614a0257614a02614f5a565b03614a205760405163e45e13a360e01b815260040160405180910390fd5b6003816008811115614a3457614a34614f5a565b03614a5257604051631d91d0ed60e31b815260040160405180910390fd5b6004816008811115614a6657614a66614f5a565b03614a84576040516321f1774b60e11b815260040160405180910390fd5b6005816008811115614a9857614a98614f5a565b03614ab657604051630caac6b360e31b815260040160405180910390fd5b6008816008811115614aca57614aca614f5a565b0361194c57604051633e57962f60e21b815260040160405180910390fd5b614af0614b0f565b614b0d57604051631afcd79f60e31b815260040160405180910390fd5b565b6000614b19614144565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614b75579160200282015b82811115614b75578251825591602001919060010190614b5a565b50614b81929150614bbf565b5090565b828054828255906000526020600020908101928215614b755791602002820182811115614b75578251825591602001919060010190614b5a565b5b80821115614b815760008155600101614bc0565b6001600160a01b0381168114613f8657600080fd5b600060208284031215614bfb57600080fd5b8135614c0681614bd4565b9392505050565b80356001600160601b0381168114614c2457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614c6757614c67614c29565b604052919050565b600082601f830112614c8057600080fd5b813560206001600160401b03821115614c9b57614c9b614c29565b8160051b614caa828201614c3f565b9283528481018201928281019087851115614cc457600080fd5b83870192505b8483101561484057823582529183019190830190614cca565b8015158114613f8657600080fd5b8035614c2481614ce3565b600080600060608486031215614d1157600080fd5b614d1a84614c0d565b925060208401356001600160401b03811115614d3557600080fd5b614d4186828701614c6f565b9250506040840135614d5281614ce3565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614d8357600080fd5b5035919050565b60008060408385031215614d9d57600080fd5b8235614da881614bd4565b946020939093013593505050565b600080600060608486031215614dcb57600080fd5b505081359360208301359350604090920135919050565b8035614c2481614bd4565b600060208284031215614dff57600080fd5b61110182614c0d565b8060005b6004811015610b73578151845260209384019390910190600101614e0c565b608081016111048284614e08565b600082601f830112614e4a57600080fd5b81356001600160401b03811115614e6357614e63614c29565b614e76601f8201601f1916602001614c3f565b818152846020838601011115614e8b57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ebb57600080fd5b8235614ec681614bd4565b915060208301356001600160401b03811115614ee157600080fd5b614eed85828601614e39565b9150509250929050565b60005b83811015614f12578181015183820152602001614efa565b50506000910152565b60008151808452614f33816020860160208601614ef7565b601f01601f19169290920160200192915050565b6020815260006111016020830184614f1b565b634e487b7160e01b600052602160045260246000fd5b60058110614f8e57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614fbe6040830186614f70565b9215156060820152608001529392505050565b600080600060608486031215614fe657600080fd5b8335614ff181614bd4565b92506020840135915060408401356001600160401b0381111561501357600080fd5b61501f86828701614e39565b9150509250925092565b6000806040838503121561503c57600080fd5b614da883614c0d565b6000806040838503121561505857600080fd5b823561506381614bd4565b9150602083013561507381614ce3565b809150509250929050565b600082601f83011261508f57600080fd5b604051608081018181106001600160401b03821117156150b1576150b1614c29565b6040528060808401858111156150c657600080fd5b845b818110156150e05780358352602092830192016150c8565b509195945050505050565b6000806000806000806000806000806102008b8d03121561510b57600080fd5b8a3561511681614bd4565b995060208b013561512681614bd4565b985060408b013561513681614bd4565b975060608b013561514681614bd4565b965060808b013561515681614bd4565b955061516460a08c01614cf1565b94506151738c60c08d0161507e565b93506151838c6101408d0161507e565b92506101c08b01356001600160401b0381111561519f57600080fd5b6151ab8d828e01614e39565b9250506151bb6101e08c01614de2565b90509295989b9194979a5092959850565b6000806000606084860312156151e157600080fd5b83356151ec81614bd4565b925060208401356001600160401b038116811461520857600080fd5b9150604084013560ff81168114614d5257600080fd5b6000806000806000806000610140888a03121561523a57600080fd5b61524388614c0d565b9650602088013561525381614ce3565b955060408801359450606088013593506080880135925060a0880135915061527e8960c08a0161507e565b905092959891949750929550565b6000806040838503121561529f57600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156152e85781516001600160a01b0316875295820195908201906001016152c3565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261534e6101808501836152ae565b60e08601516101008681019190915286015161012080870191909152860151909250610140615387818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c0312156153b757600080fd5b6153c08a614c0d565b985060208a01356153d081614ce3565b975060408a0135965060608a0135955060808a0135945060a08a013593506153fb8b60c08c0161507e565b92506101408a01356001600160401b038082111561541857600080fd5b6154248d838e01614e39565b93506101608c013591508082111561543b57600080fd5b506154488c828d01614c6f565b9150509295985092959850929598565b6000806040838503121561546b57600080fd5b8235915060208301356001600160401b03811115614ee157600080fd5b60008060006060848603121561549d57600080fd5b833592506020840135915060408401356001600160401b0381111561501357600080fd5b60008083601f8401126154d357600080fd5b5081356001600160401b038111156154ea57600080fd5b60208301915083602082850101111561550257600080fd5b9250929050565b60008060006040848603121561551e57600080fd5b83356001600160401b0381111561553457600080fd5b615540868287016154c1565b9094509250506020840135614d5281614bd4565b60008060008060006080868803121561556c57600080fd5b8535945060208601356001600160401b0381111561558957600080fd5b615595888289016154c1565b90955093505060408601356155a981614bd4565b949793965091946060013592915050565b6000602082840312156155cc57600080fd5b81356001600160401b038111156155e257600080fd5b6131db84828501614e39565b6000806000806080858703121561560457600080fd5b843561560f81614bd4565b935061561d60208601614c0d565b925060408501359150606085013561563481614ce3565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561110457611104615655565b60006020828403121561569057600080fd5b8151614c0681614ce3565b602081016111048284614f70565b600181815b808511156156e45781600019048211156156ca576156ca615655565b808516156156d757918102915b93841c93908002906156ae565b509250929050565b6000826156fb57506001611104565b8161570857506000611104565b816001811461571e576002811461572857615744565b6001915050611104565b60ff84111561573957615739615655565b50506001821b611104565b5060208310610133831016604e8410600b8410161715615767575081810a611104565b61577183836156a9565b806000190482111561578557615785615655565b029392505050565b600061110160ff8416836156ec565b808202811582820484141761110457611104615655565b634e487b7160e01b600052601260045260246000fd5b6000826157d8576157d86157b3565b500490565b6000806000606084860312156157f257600080fd5b83519250602084015161580481614ce3565b6040850151909250614d5281614ce3565b8082018082111561110457611104615655565b60006020828403121561583a57600080fd5b5051919050565b60008251615853818460208701614ef7565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261484060a0830184614e08565b8281526040602082015260006131db6040830184614f1b565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526158dd60a0860188614e08565b610120850192909252845190819052610160840191602086019160005b81811015615916578351855293820193928201926001016158fa565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006159476080830185614f1b565b905082606083015295945050505050565b60006001820161596a5761596a615655565b5060010190565b60006020828403121561598357600080fd5b8151614c0681614bd4565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016159bc576159bc615655565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615a1557615a156157b3565b500690565b600080600060608486031215615a2f57600080fd5b8351925060208401519150604084015160098110614d5257600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209d3f5f848e5c977c06ce8a04a67787edb996e48a4f1a486ddef204a4e19f4a0664736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -1787,6 +1907,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -1838,6 +1963,7 @@ } }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -1918,6 +2044,12 @@ "_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." + } + }, "changeJurorProsecutionModule(address)": { "details": "Changes the `jurorProsecutionModule` storage variable.", "params": { @@ -1937,7 +2069,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],bytes,uint256[])": { "details": "Creates a court under a specified parent court.", @@ -2002,7 +2134,7 @@ } }, "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.", + "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.", @@ -2038,12 +2170,13 @@ "timesPerPeriod": "The timesPerPeriod array for the given court." } }, - "initialize(address,address,address,address,bool,uint256[4],uint256[4],bytes,address)": { + "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],bytes,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.", "_jurorProsecutionModule": "The address of the juror prosecution module.", "_pinakion": "The address of the token contract.", @@ -2067,6 +2200,9 @@ "_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." }, @@ -2086,6 +2222,9 @@ "_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": { @@ -2094,6 +2233,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "KlerosCore Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.", "version": 1 }, @@ -2103,18 +2251,8 @@ { "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 @@ -2122,7 +2260,7 @@ "storageLayout": { "storage": [ { - "astId": 3081, + "astId": 8616, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "governor", "offset": 0, @@ -2130,60 +2268,76 @@ "type": "t_address" }, { - "astId": 3084, + "astId": 8618, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "pinakion", + "label": "guardian", "offset": 0, "slot": "1", - "type": "t_contract(IERC20)1042" + "type": "t_address" }, { - "astId": 3086, + "astId": 8621, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", - "label": "jurorProsecutionModule", + "label": "pinakion", "offset": 0, "slot": "2", + "type": "t_contract(IERC20)1755" + }, + { + "astId": 8623, + "contract": "src/arbitration/KlerosCore.sol:KlerosCore", + "label": "jurorProsecutionModule", + "offset": 0, + "slot": "3", "type": "t_address" }, { - "astId": 3089, + "astId": 8626, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "sortitionModule", "offset": 0, - "slot": "3", - "type": "t_contract(ISortitionModule)17351" + "slot": "4", + "type": "t_contract(ISortitionModule)23277" }, { - "astId": 3093, + "astId": 8630, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "courts", "offset": 0, - "slot": "4", - "type": "t_array(t_struct(Court)3004_storage)dyn_storage" + "slot": "5", + "type": "t_array(t_struct(Court)8535_storage)dyn_storage" }, { - "astId": 3097, + "astId": 8634, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disputeKits", "offset": 0, - "slot": "5", - "type": "t_array(t_contract(IDisputeKit)17190)dyn_storage" + "slot": "6", + "type": "t_array(t_contract(IDisputeKit)23114)dyn_storage" }, { - "astId": 3101, + "astId": 8638, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disputes", "offset": 0, - "slot": "6", - "type": "t_array(t_struct(Dispute)3021_storage)dyn_storage" + "slot": "7", + "type": "t_array(t_struct(Dispute)8552_storage)dyn_storage" }, { - "astId": 3107, + "astId": 8644, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "currencyRates", "offset": 0, - "slot": "7", - "type": "t_mapping(t_contract(IERC20)1042,t_struct(CurrencyRate)3066_storage)" + "slot": "8", + "type": "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)8601_storage)" + }, + { + "astId": 8646, + "contract": "src/arbitration/KlerosCore.sol:KlerosCore", + "label": "paused", + "offset": 0, + "slot": "9", + "type": "t_bool" } ], "types": { @@ -2198,28 +2352,28 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_contract(IDisputeKit)17190)dyn_storage": { - "base": "t_contract(IDisputeKit)17190", + "t_array(t_contract(IDisputeKit)23114)dyn_storage": { + "base": "t_contract(IDisputeKit)23114", "encoding": "dynamic_array", "label": "contract IDisputeKit[]", "numberOfBytes": "32" }, - "t_array(t_struct(Court)3004_storage)dyn_storage": { - "base": "t_struct(Court)3004_storage", + "t_array(t_struct(Court)8535_storage)dyn_storage": { + "base": "t_struct(Court)8535_storage", "encoding": "dynamic_array", - "label": "struct KlerosCore.Court[]", + "label": "struct KlerosCoreBase.Court[]", "numberOfBytes": "32" }, - "t_array(t_struct(Dispute)3021_storage)dyn_storage": { - "base": "t_struct(Dispute)3021_storage", + "t_array(t_struct(Dispute)8552_storage)dyn_storage": { + "base": "t_struct(Dispute)8552_storage", "encoding": "dynamic_array", - "label": "struct KlerosCore.Dispute[]", + "label": "struct KlerosCoreBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)3046_storage)dyn_storage": { - "base": "t_struct(Round)3046_storage", + "t_array(t_struct(Round)8577_storage)dyn_storage": { + "base": "t_struct(Round)8577_storage", "encoding": "dynamic_array", - "label": "struct KlerosCore.Round[]", + "label": "struct KlerosCoreBase.Round[]", "numberOfBytes": "32" }, "t_array(t_uint256)4_storage": { @@ -2239,37 +2393,37 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IArbitrableV2)16951": { + "t_contract(IArbitrableV2)22871": { "encoding": "inplace", "label": "contract IArbitrableV2", "numberOfBytes": "20" }, - "t_contract(IDisputeKit)17190": { + "t_contract(IDisputeKit)23114": { "encoding": "inplace", "label": "contract IDisputeKit", "numberOfBytes": "20" }, - "t_contract(IERC20)1042": { + "t_contract(IERC20)1755": { "encoding": "inplace", "label": "contract IERC20", "numberOfBytes": "20" }, - "t_contract(ISortitionModule)17351": { + "t_contract(ISortitionModule)23277": { "encoding": "inplace", "label": "contract ISortitionModule", "numberOfBytes": "20" }, - "t_enum(Period)2978": { + "t_enum(Period)8509": { "encoding": "inplace", - "label": "enum KlerosCore.Period", + "label": "enum KlerosCoreBase.Period", "numberOfBytes": "1" }, - "t_mapping(t_contract(IERC20)1042,t_struct(CurrencyRate)3066_storage)": { + "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)8601_storage)": { "encoding": "mapping", - "key": "t_contract(IERC20)1042", - "label": "mapping(contract IERC20 => struct KlerosCore.CurrencyRate)", + "key": "t_contract(IERC20)1755", + "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)3066_storage" + "value": "t_struct(CurrencyRate)8601_storage" }, "t_mapping(t_uint256,t_bool)": { "encoding": "mapping", @@ -2278,12 +2432,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_struct(Court)3004_storage": { + "t_struct(Court)8535_storage": { "encoding": "inplace", - "label": "struct KlerosCore.Court", + "label": "struct KlerosCoreBase.Court", "members": [ { - "astId": 2980, + "astId": 8511, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "parent", "offset": 0, @@ -2291,7 +2445,7 @@ "type": "t_uint96" }, { - "astId": 2982, + "astId": 8513, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "hiddenVotes", "offset": 12, @@ -2299,7 +2453,7 @@ "type": "t_bool" }, { - "astId": 2985, + "astId": 8516, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "children", "offset": 0, @@ -2307,7 +2461,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 2987, + "astId": 8518, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "minStake", "offset": 0, @@ -2315,7 +2469,7 @@ "type": "t_uint256" }, { - "astId": 2989, + "astId": 8520, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "alpha", "offset": 0, @@ -2323,7 +2477,7 @@ "type": "t_uint256" }, { - "astId": 2991, + "astId": 8522, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "feeForJuror", "offset": 0, @@ -2331,7 +2485,7 @@ "type": "t_uint256" }, { - "astId": 2993, + "astId": 8524, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "jurorsForCourtJump", "offset": 0, @@ -2339,7 +2493,7 @@ "type": "t_uint256" }, { - "astId": 2997, + "astId": 8528, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "timesPerPeriod", "offset": 0, @@ -2347,7 +2501,7 @@ "type": "t_array(t_uint256)4_storage" }, { - "astId": 3001, + "astId": 8532, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "supportedDisputeKits", "offset": 0, @@ -2355,7 +2509,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 3003, + "astId": 8534, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disabled", "offset": 0, @@ -2365,12 +2519,12 @@ ], "numberOfBytes": "384" }, - "t_struct(CurrencyRate)3066_storage": { + "t_struct(CurrencyRate)8601_storage": { "encoding": "inplace", - "label": "struct KlerosCore.CurrencyRate", + "label": "struct KlerosCoreBase.CurrencyRate", "members": [ { - "astId": 3061, + "astId": 8596, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "feePaymentAccepted", "offset": 0, @@ -2378,7 +2532,7 @@ "type": "t_bool" }, { - "astId": 3063, + "astId": 8598, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "rateInEth", "offset": 1, @@ -2386,7 +2540,7 @@ "type": "t_uint64" }, { - "astId": 3065, + "astId": 8600, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "rateDecimals", "offset": 9, @@ -2396,12 +2550,12 @@ ], "numberOfBytes": "32" }, - "t_struct(Dispute)3021_storage": { + "t_struct(Dispute)8552_storage": { "encoding": "inplace", - "label": "struct KlerosCore.Dispute", + "label": "struct KlerosCoreBase.Dispute", "members": [ { - "astId": 3006, + "astId": 8537, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "courtID", "offset": 0, @@ -2409,23 +2563,23 @@ "type": "t_uint96" }, { - "astId": 3009, + "astId": 8540, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "arbitrated", "offset": 12, "slot": "0", - "type": "t_contract(IArbitrableV2)16951" + "type": "t_contract(IArbitrableV2)22871" }, { - "astId": 3012, + "astId": 8543, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "period", "offset": 0, "slot": "1", - "type": "t_enum(Period)2978" + "type": "t_enum(Period)8509" }, { - "astId": 3014, + "astId": 8545, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "ruled", "offset": 1, @@ -2433,7 +2587,7 @@ "type": "t_bool" }, { - "astId": 3016, + "astId": 8547, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "lastPeriodChange", "offset": 0, @@ -2441,22 +2595,22 @@ "type": "t_uint256" }, { - "astId": 3020, + "astId": 8551, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "rounds", "offset": 0, "slot": "3", - "type": "t_array(t_struct(Round)3046_storage)dyn_storage" + "type": "t_array(t_struct(Round)8577_storage)dyn_storage" } ], "numberOfBytes": "128" }, - "t_struct(Round)3046_storage": { + "t_struct(Round)8577_storage": { "encoding": "inplace", - "label": "struct KlerosCore.Round", + "label": "struct KlerosCoreBase.Round", "members": [ { - "astId": 3023, + "astId": 8554, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "disputeKitID", "offset": 0, @@ -2464,7 +2618,7 @@ "type": "t_uint256" }, { - "astId": 3025, + "astId": 8556, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "pnkAtStakePerJuror", "offset": 0, @@ -2472,7 +2626,7 @@ "type": "t_uint256" }, { - "astId": 3027, + "astId": 8558, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "totalFeesForJurors", "offset": 0, @@ -2480,7 +2634,7 @@ "type": "t_uint256" }, { - "astId": 3029, + "astId": 8560, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "nbVotes", "offset": 0, @@ -2488,7 +2642,7 @@ "type": "t_uint256" }, { - "astId": 3031, + "astId": 8562, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "repartitions", "offset": 0, @@ -2496,7 +2650,7 @@ "type": "t_uint256" }, { - "astId": 3033, + "astId": 8564, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "pnkPenalties", "offset": 0, @@ -2504,7 +2658,7 @@ "type": "t_uint256" }, { - "astId": 3036, + "astId": 8567, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "drawnJurors", "offset": 0, @@ -2512,7 +2666,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 3038, + "astId": 8569, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "sumFeeRewardPaid", "offset": 0, @@ -2520,7 +2674,7 @@ "type": "t_uint256" }, { - "astId": 3040, + "astId": 8571, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "sumPnkRewardPaid", "offset": 0, @@ -2528,15 +2682,15 @@ "type": "t_uint256" }, { - "astId": 3043, + "astId": 8574, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "feeToken", "offset": 0, "slot": "9", - "type": "t_contract(IERC20)1042" + "type": "t_contract(IERC20)1755" }, { - "astId": 3045, + "astId": 8576, "contract": "src/arbitration/KlerosCore.sol:KlerosCore", "label": "drawIterations", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json index a48f542b4..4cbefc9b7 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json @@ -141,6 +141,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -214,6 +221,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -264,33 +284,19 @@ "0xAA637C9E2831614158d7eB193D03af4a7223C56E", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] + "methodName": "initialize2", + "args": [] }, - "implementation": "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + "implementation": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", "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/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json index f21e42dbc..28ed3acb4 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + "address": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", "abi": [ { "inputs": [], @@ -138,6 +138,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -210,43 +217,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0x9b5099b7a7d302303636f3a2bc16e684266c9c7a9d000747f82e6826678906a7", + "transactionHash": "0x3dd223be8d1474c4936ad70c762f9eb31db332674f590bdac13dcf50df3ac755", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xAA637C9E2831614158d7eB193D03af4a7223C56E", - "transactionIndex": 1, - "gasUsed": "718485", - "logsBloom": "0x00000000010000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000002000000000000000000000000000000000000000000000", - "blockHash": "0x255f541ed416c77581e2bcd3af75c554f9489216329a580fefe93c7730ff222f", - "transactionHash": "0x9b5099b7a7d302303636f3a2bc16e684266c9c7a9d000747f82e6826678906a7", + "contractAddress": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", + "transactionIndex": 2, + "gasUsed": "781799", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000200000000000000000000000000000000000000000000000000000000", + "blockHash": "0x87a55ebc4f2479d4a72885ecc369f34e72ffca71e8c60e55f44d1cfbdd713227", + "transactionHash": "0x3dd223be8d1474c4936ad70c762f9eb31db332674f590bdac13dcf50df3ac755", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3084567, - "transactionHash": "0x9b5099b7a7d302303636f3a2bc16e684266c9c7a9d000747f82e6826678906a7", - "address": "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + "transactionIndex": 2, + "blockNumber": 139232389, + "transactionHash": "0x3dd223be8d1474c4936ad70c762f9eb31db332674f590bdac13dcf50df3ac755", + "address": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x255f541ed416c77581e2bcd3af75c554f9489216329a580fefe93c7730ff222f" + "logIndex": 2, + "blockHash": "0x87a55ebc4f2479d4a72885ecc369f34e72ffca71e8c60e55f44d1cfbdd713227" } ], - "blockNumber": 3084567, - "cumulativeGasUsed": "718485", + "blockNumber": 139232389, + "cumulativeGasUsed": "883514", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":[],\"name\":\"initialize2\",\"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\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a policy for each court.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"PolicyRegistry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0x3616d00a695cf960373d73a56d727fba4988a6c67f4e9084d1aab18f6db72e73\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610cb66100fc6000396000818161029e015281816102c701526104c40152610cb66000f3fe6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", "devdoc": { "details": "A contract to maintain a policy for each court.", "errors": { @@ -255,6 +275,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -284,6 +309,7 @@ } }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -298,7 +324,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "initialize(address)": { "details": "Constructs the `PolicyRegistry` contract.", @@ -325,6 +351,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "PolicyRegistry", "version": 1 }, @@ -334,18 +369,8 @@ { "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 @@ -353,7 +378,7 @@ "storageLayout": { "storage": [ { - "astId": 7764, + "astId": 13671, "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", "label": "governor", "offset": 0, @@ -361,7 +386,7 @@ "type": "t_address" }, { - "astId": 7768, + "astId": 13675, "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", "label": "policies", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json index 5d8667b3c..f82b04689 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json @@ -99,7 +99,7 @@ "type": "uint256" } ], - "name": "StakeDelayedAlreadyTransferred", + "name": "StakeDelayedAlreadyTransferredDeposited", "type": "event" }, { @@ -197,6 +197,12 @@ "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" } ], "name": "StakeSet", @@ -216,29 +222,16 @@ "type": "event" }, { - "inputs": [], - "name": "DEFAULT_K", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STAKE_PATHS", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_governor", + "type": "address" } ], - "stateMutability": "view", + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -558,6 +551,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -581,7 +581,7 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], @@ -618,12 +618,12 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "jurorAccount", "type": "address" }, { "internalType": "uint96", - "name": "", + "name": "courtId", "type": "uint96" } ], @@ -865,9 +865,9 @@ "type": "uint256" }, { - "internalType": "bool", - "name": "succeeded", - "type": "bool" + "internalType": "enum StakingResult", + "name": "stakingResult", + "type": "uint8" } ], "stateMutability": "nonpayable", @@ -957,6 +957,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1007,38 +1020,19 @@ "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a54e7a16d7460e38a8f324ef46782fb520d58ce800000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf48360000000000000000000000000000000000000000000000000000000000000014" ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - 180, - 600, - "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - 20 - ] + "methodName": "initialize3", + "args": [] }, - "implementation": "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + "implementation": "0x45129beB9B84BFb07bA885085C1D60437494a93f", "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/arbitrumSepoliaDevnet/SortitionModule_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json index 586e2d7f6..3af7793d6 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + "address": "0x45129beB9B84BFb07bA885085C1D60437494a93f", "abi": [ { "inputs": [], @@ -96,7 +96,7 @@ "type": "uint256" } ], - "name": "StakeDelayedAlreadyTransferred", + "name": "StakeDelayedAlreadyTransferredDeposited", "type": "event" }, { @@ -194,6 +194,12 @@ "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" } ], "name": "StakeSet", @@ -213,29 +219,16 @@ "type": "event" }, { - "inputs": [], - "name": "DEFAULT_K", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STAKE_PATHS", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_governor", + "type": "address" } ], - "stateMutability": "view", + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -555,6 +548,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -578,7 +578,7 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], @@ -615,12 +615,12 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "jurorAccount", "type": "address" }, { "internalType": "uint96", - "name": "", + "name": "courtId", "type": "uint96" } ], @@ -862,9 +862,9 @@ "type": "uint256" }, { - "internalType": "bool", - "name": "succeeded", - "type": "bool" + "internalType": "enum StakingResult", + "name": "stakingResult", + "type": "uint8" } ], "stateMutability": "nonpayable", @@ -953,43 +953,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xc637eeeec2e54425a4176f8539b86a9198072dc66045184b8af03369d1d5f64f", + "transactionHash": "0x02dc03ccae821281050d53d9a7d60fddbf1a070288a3dbfb825b20b8d5edab5f", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + "contractAddress": "0x45129beB9B84BFb07bA885085C1D60437494a93f", "transactionIndex": 1, - "gasUsed": "33971097", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000800000000000000000000000080000000000080000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0e760033b43be44fcfefd9289381a7163d0d7649235cbe8e57c4e4e1b00ce33c", - "transactionHash": "0xc637eeeec2e54425a4176f8539b86a9198072dc66045184b8af03369d1d5f64f", + "gasUsed": "2793212", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe4d5d8ceff454042479c8b8d08785b87738847981daad660159d0289d8c76f63", + "transactionHash": "0x02dc03ccae821281050d53d9a7d60fddbf1a070288a3dbfb825b20b8d5edab5f", "logs": [ { "transactionIndex": 1, - "blockNumber": 3638844, - "transactionHash": "0xc637eeeec2e54425a4176f8539b86a9198072dc66045184b8af03369d1d5f64f", - "address": "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + "blockNumber": 139232413, + "transactionHash": "0x02dc03ccae821281050d53d9a7d60fddbf1a070288a3dbfb825b20b8d5edab5f", + "address": "0x45129beB9B84BFb07bA885085C1D60437494a93f", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0x0e760033b43be44fcfefd9289381a7163d0d7649235cbe8e57c4e4e1b00ce33c" + "blockHash": "0xe4d5d8ceff454042479c8b8d08785b87738847981daad660159d0289d8c76f63" } ], - "blockNumber": 3638844, - "cumulativeGasUsed": "33971097", + "blockNumber": 139232413, + "cumulativeGasUsed": "2793212", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "3f329281196df29e7a5c0426794280b8", - "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\":[],\"name\":\"DEFAULT_K\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_STAKE_PATHS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"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\":\"bool\",\"name\":\"succeeded\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"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)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_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.\",\"succeeded\":\"True if the call succeeded, false otherwise.\"}},\"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\":\"SortitionModule\",\"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/SortitionModule.sol\":\"SortitionModule\"},\"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 {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 {Constants} from \\\"../libraries/Constants.sol\\\";\\nimport {OnError} from \\\"../libraries/Types.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 IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 => 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 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 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\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\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 _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 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 governor = _governor;\\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(Constants.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(Constants.FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = Constants.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(Constants.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(Constants.GENERAL_COURT, Constants.DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `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 == Constants.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[Constants.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 != Constants.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] == Constants.DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, Constants.NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[dispute.courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == Constants.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 = Constants.DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n Round storage round = dispute.rounds[_round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRoundCache = round.pnkPenalties; // For saving gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\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 pnkPenaltiesInRoundCache = _executePenalties(\\n ExecuteParams(_disputeID, _round, coherentCount, numberOfVotesInRound, pnkPenaltiesInRoundCache, i)\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams(_disputeID, _round, coherentCount, numberOfVotesInRound, pnkPenaltiesInRoundCache, i)\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRoundCache) {\\n round.pnkPenalties = pnkPenaltiesInRoundCache; // 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 );\\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 == Constants.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 );\\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 == Constants.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 == Constants.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 == Constants.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 == Constants.FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, bool sortitionSuccess) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (!sortitionSuccess) {\\n _stakingFailed(_onError);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError);\\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) internal pure {\\n if (_onError == OnError.Return) return;\\n revert StakingFailed();\\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 == Constants.FORKING_COURT || courtID >= courts.length) {\\n courtID = Constants.GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = Constants.DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == Constants.NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = Constants.DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = Constants.GENERAL_COURT;\\n minJurors = Constants.DEFAULT_NB_OF_JURORS;\\n disputeKitID = Constants.DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\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 StakingFailed();\\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}\\n\",\"keccak256\":\"0x43205bc90f6965b5c1380effd2c29994f6dfea074696e39d5df037343a768d6b\",\"license\":\"MIT\"},\"src/arbitration/SortitionModule.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 \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is ISortitionModule, UUPSProxiable, Initializable {\\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 uint256 public constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\n uint256 public constant DEFAULT_K = 6; // Default number of children per node.\\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 // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _core The KlerosCore.\\n /// @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 function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\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 // * 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 `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\\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 succeeded True if the call succeeded, false otherwise.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, bool succeeded) {\\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, false); // 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, true);\\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 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 == Constants.GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currenCourtID, , , , , , ) = core.courts(currenCourtID);\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, true);\\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 // 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 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\":\"0x4dd725bb26738ca3d7caa389f80fd50c10de2a9925b3f1d7e70348885c108102\",\"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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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 /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\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\":\"0x7fe6b1d9b991cc327cc5895f34208a7b1e3b6ebf8efb20fcb9f3ff0f40d2d209\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\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, bool succeeded);\\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\":\"0xa6d79053edfe04f7d3c8ad9b9ce3f182e45f2f74be40a77a304a93168549c474\",\"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/// @title Constants\\nlibrary Constants {\\n // Courts\\n uint96 public constant FORKING_COURT = 0; // Index of the forking court.\\n uint96 public constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n // Dispute Kits\\n uint256 public constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\n uint256 public constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n // Defaults\\n uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\n IERC20 public constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n}\\n\",\"keccak256\":\"0xde8fd28a18669261b052aebb00bf09ec592bb9298fa5efc76ca8606e0c7dbb25\",\"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/libraries/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\",\"keccak256\":\"0xc7deebd8227dfaa46a36ae8d2c24fe1b5d5c776ab963b44943829ab4058b5701\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051612e7e62000103600039600081816112550152818161127e01526114760152612e7e6000f3fe6080604052600436106102465760003560e01c80637dc38f1411610139578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b0146106c6578063dd5e5cb514610712578063e534710d14610732578063f216de4c1461076a578063f2f4eb261461078a578063f6b4d82d146107aa57600080fd5b8063c15726181461061a578063ccbac9f514610630578063d09f392d14610646578063d1c1df4814610666578063d605787b146106a657600080fd5b8063b1c9fe6e116100fd578063b1c9fe6e1461058b578063b4a61608146105b9578063b5d69e99146105ce578063b888adfa146105ee578063c057eca71461060457600080fd5b80637dc38f14146104d8578063823cfd70146104ee578063965af6c71461050e578063a2473cc11461052e578063a5861b901461054e57600080fd5b80634c70a0d6116101c757806354812d171161018b57806354812d171461041757806356acb050146104375780635d2d78461461044d5780636624192f1461046d57806376fa9fc5146104b857600080fd5b80634c70a0d6146103825780634dbbebbc146103a25780634f1ef286146103c257806352d1902d146103d5578063543f8a36146103ea57600080fd5b80631b92bbbe1161020e5780631b92bbbe146102ee57806321e1625e1461030457806321ea9b3f1461032457806335975f4a14610342578063477a655c1461036257600080fd5b8063034327441461024b5780630b274f2e146102745780630b51806d1461028b5780630c340a24146102a05780630e083ec9146102d8575b600080fd5b34801561025757600080fd5b5061026160065481565b6040519081526020015b60405180910390f35b34801561028057600080fd5b50610289610814565b005b34801561029757600080fd5b50610261600681565b3480156102ac57600080fd5b506000546102c0906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b3480156102e457600080fd5b50610261600a5481565b3480156102fa57600080fd5b5061026160035481565b34801561031057600080fd5b5061028961031f366004612852565b610bec565b34801561033057600080fd5b5061028961033f36600461287e565b50565b34801561034e57600080fd5b5061028961035d36600461287e565b610c8f565b34801561036e57600080fd5b5061028961037d36600461293a565b610e7d565b34801561038e57600080fd5b506102c061039d366004612981565b610f74565b3480156103ae57600080fd5b506102896103bd366004612852565b611158565b6102896103d03660046129ad565b611241565b3480156103e157600080fd5b50610261611469565b3480156103f657600080fd5b5061040a6104053660046129e7565b6114c7565b60405161026b9190612a04565b34801561042357600080fd5b50610289610432366004612a51565b611565565b34801561044357600080fd5b50610261600b5481565b34801561045957600080fd5b50610289610468366004612ab8565b61168b565b34801561047957600080fd5b506104a86104883660046129e7565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161026b565b3480156104c457600080fd5b506102616104d3366004612ab8565b6116ce565b3480156104e457600080fd5b5061026160095481565b3480156104fa57600080fd5b5061028961050936600461287e565b611729565b34801561051a57600080fd5b50610289610529366004612852565b611758565b34801561053a57600080fd5b50610261610549366004612aef565b6117f3565b34801561055a57600080fd5b5061056e610569366004612b36565b61181d565b60408051938452602084019290925215159082015260600161026b565b34801561059757600080fd5b506001546105ac90600160a01b900460ff1681565b60405161026b9190612b9f565b3480156105c557600080fd5b50610261600481565b3480156105da57600080fd5b506102896105e93660046129e7565b611be4565b3480156105fa57600080fd5b5061026160045481565b34801561061057600080fd5b5061026160025481565b34801561062657600080fd5b5061026160055481565b34801561063c57600080fd5b5061026160085481565b34801561065257600080fd5b50610289610661366004612ab8565b611cc6565b34801561067257600080fd5b50610686610681366004612aef565b611d00565b60408051948552602085019390935291830152606082015260800161026b565b3480156106b257600080fd5b506007546102c0906001600160a01b031681565b3480156106d257600080fd5b506106fd6106e13660046129e7565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161026b565b34801561071e57600080fd5b5061028961072d36600461287e565b611d3f565b34801561073e57600080fd5b5061026161074d366004612aef565b600f60209081526000928352604080842090915290825290205481565b34801561077657600080fd5b50610289610785366004612852565b611d6e565b34801561079657600080fd5b506001546102c0906001600160a01b031681565b3480156107b657600080fd5b506108046107c536600461287e565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161026b9493929190612bc7565b6000600154600160a01b900460ff16600281111561083457610834612b89565b036109a7576002546004546108499042612c0e565b10156108b15760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109135760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a8565b6007546009546001600160a01b0390911690637363ae1f906109359043612c21565b6040518263ffffffff1660e01b815260040161095391815260200190565b600060405180830381600087803b15801561096d57600080fd5b505af1158015610981573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610ba1565b60018054600160a01b900460ff1660028111156109c6576109c6612b89565b03610abe576007546009546005546001600160a01b03909216916313cf9054916109ef91612c21565b6040518263ffffffff1660e01b8152600401610a0d91815260200190565b6020604051808303816000875af1158015610a2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a509190612c34565b6008819055600003610aa45760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a8565b600180546002919060ff60a01b1916600160a01b8361099d565b6002600154600160a01b900460ff166002811115610ade57610ade612b89565b03610ba1576006541580610b005750600354600454610afd9042612c0e565b10155b610b935760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a8565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610be291600160a01b90910460ff1690612b9f565b60405180910390a1565b6001546001600160a01b03163314610c165760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0382166000908152600d602052604081206002018054839290610c41908490612c21565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610caf57610caf612b89565b14610cfc5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a8565b6000600a54600183600b54610d119190612c21565b610d1b9190612c0e565b11610d265781610d41565b600b54600a54610d369190612c0e565b610d41906001612c21565b9050600081600b54610d539190612c21565b600b549091505b81811015610e75576000818152600e6020526040902080546001600160a01b031615610e625760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610dd69490821693600160a01b9092046001600160601b031692909160ff1690600401612bc7565b600060405180830381600087803b158015610df057600080fd5b505af1158015610e04573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b5080610e6d81612c91565b915050610d5a565b50600b555050565b6001546001600160a01b03163314610ea75760405162461bcd60e51b81526004016108a890612c4d565b6000828152600c6020526040812090610ebf83611de6565b825490915015610f085760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a8565b60018111610f585760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a8565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff166002811115610f9657610f96612b89565b14610fd25760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a8565b6000848152600c6020526040812060028101805491929091610ff657610ff6612caa565b9060005260206000200154600003611012576000915050611151565b60008160020160008154811061102a5761102a612caa565b9060005260206000200154600854868660405160200161105d939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6110809190612cd6565b905060005b60028301548354611097908390612cea565b6110a2906001612c21565b10156111315760015b8354811161112b576000818386600001546110c69190612cea565b6110d09190612c21565b905060008560020182815481106110e9576110e9612caa565b9060005260206000200154905080851061110e576111078186612c0e565b9450611116565b50915061112b565b5050808061112390612c91565b9150506110ab565b50611085565b600081815260048401602052604090205461114b90611e01565b93505050505b9392505050565b6000546001600160a01b031633146111825760405162461bcd60e51b81526004016108a890612d01565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156111c1576111c1612b89565b0361123d576007546009546001600160a01b0390911690637363ae1f906111e89043612c21565b6040518263ffffffff1660e01b815260040161120691815260200190565b600060405180830381600087803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b50504360055550505b5050565b61124a82611e2c565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806112c857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166112bc600080516020612e298339815191525490565b6001600160a01b031614155b156112e65760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611340575060408051601f3d908101601f1916820190925261133d91810190612c34565b60015b61136857604051630c76093760e01b81526001600160a01b03831660048201526024016108a8565b600080516020612e29833981519152811461139957604051632a87526960e21b8152600481018290526024016108a8565b600080516020612e298339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611464576000836001600160a01b0316836040516114009190612d43565b600060405180830381855af49150503d806000811461143b576040519150601f19603f3d011682016040523d82523d6000602084013e611440565b606091505b5050905080611462576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114b45760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612e2983398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561155957602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116115165790505b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806115af5750805467ffffffffffffffff808416911610155b156115cc5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600080546001600160a01b038b81166001600160a01b031992831617909255600180548b841690831617815560028a905560038990554260045560078054938916939092169290921790556009859055600b55815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116b55760405162461bcd60e51b81526004016108a890612c4d565b600680549060006116c583612d72565b91905055505050565b6000828152600c60209081526040808320848452600381019092528220548083036116fe57600092505050611723565b81600201818154811061171357611713612caa565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117535760405162461bcd60e51b81526004016108a890612d01565b600255565b6001546001600160a01b031633146117825760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0382166000908152600d6020526040812060020180548392906117ad908490612c0e565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610c83565b6000806118008484611e56565b90506118156001600160601b038416826116ce565b949350505050565b600154600090819081906001600160a01b0316331461184e5760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0387166000908152600d602052604081209061187189896117f3565b82549091508715801561188d575060048110158061188d575081155b156118a5576000806000955095509550505050611bda565b6000600154600160a01b900460ff1660028111156118c5576118c5612b89565b14611a7f576118d4898b611e9e565b94506000600e6000600a600081546118eb90612c91565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611a235760028101805460ff191660011790556119ce848b8b86612155565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611a71565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060019350611bda92505050565b818810611a9f5786611a9a57611a97838a8a85612155565b95505b611ab8565b611aab838a8a85612235565b611ab59086612c21565b94505b6000611ac48b8b611e56565b905060008a5b81611b8257611ae36001600160601b0382168c8561242c565b6000196001600160601b03821601611afe5760019150611aca565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b739190612d89565b50949550611aca945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506001955050505050505b9450945094915050565b6001546001600160a01b03163314611c0e5760405162461bcd60e51b81526004016108a890612c4d565b6000611c19826114c7565b80519091505b801561146457600180546001600160a01b03169063fbb519e79085908590611c479086612c0e565b81518110611c5757611c57612caa565b60200260200101516000806040518563ffffffff1660e01b8152600401611c819493929190612bc7565b600060405180830381600087803b158015611c9b57600080fd5b505af1158015611caf573d6000803e3d6000fd5b505050508080611cbe90612d72565b915050611c1f565b6001546001600160a01b03163314611cf05760405162461bcd60e51b81526004016108a890612c4d565b600680549060006116c583612c91565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611d3287876117f3565b9054949793965094505050565b6000546001600160a01b03163314611d695760405162461bcd60e51b81526004016108a890612d01565b600355565b6001546001600160a01b03163314611d985760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0382166000908152600d6020526040902060018101548211611dda5781816001016000828254611dcf9190612c0e565b909155506114649050565b60006001820155505050565b60006020825110611df957506020015190565b506006919050565b600060405160005b6014811015611e245783811a81600c84010153600101611e09565b505192915050565b6000546001600160a01b0316331461033f5760405162461bcd60e51b81526004016108a890612d01565b600060405160005b6014811015611e79578481600c011a81830153600101611e5e565b5060145b6020811015611e955783811a81830153600101611e7d565b50519392505050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561214e576000818152600e60205260409020600281015460ff1615612101576000611ef885876117f3565b90506000818360010154611f0c9190612c0e565b6001600160a01b0387166000908152600d602052604090206001810154919650869250908210611f3e57806001015495505b85816001016000828254611f529190612c0e565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036120fd5780545b80156120fb576001600160601b03891682611fc7600184612c0e565b81548110611fd757611fd7612caa565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036120e9578154829061201390600190612c0e565b8154811061202357612023612caa565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906120579084612c0e565b8154811061206757612067612caa565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806120b3576120b3612dfe565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556120fb565b806120f381612d72565b915050611fab565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561216f576000612183565b856001015486600201546121839190612c0e565b905061218f8184612c21565b84101561219d5760006121b2565b806121a88486612c0e565b6121b29190612c0e565b9150826000036121f7578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156122095783612224565b8383876001015461221a9190612c0e565b6122249190612c21565b866001018190555050949350505050565b60028401546000906122478484612c0e565b6122519190612c21565b85600101541061226c576122658383612c0e565b9050612292565b8460020154856001015410612292578460020154856001015461228f9190612c0e565b90505b826000036123ef5784545b80156123ed576001600160601b038516866122b9600184612c0e565b815481106122c9576122c9612caa565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123db578554869061230590600190612c0e565b8154811061231557612315612caa565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906123499084612c0e565b8154811061235957612359612caa565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806123a5576123a5612dfe565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123ed565b806123e581612d72565b91505061229d565b505b8185600101541015612401578261241c565b828286600101546124129190612c0e565b61241c9190612c21565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036125f95783156125f45760018201546000036125475750600281018054600180820183556000928352602090922081018590559081148015906124a65750815461249a600183612c0e565b6124a49190612cd6565b155b156125425781546000906124ba9083612e14565b60008181526004850160205260408120549192506124d9846001612c21565b9050846002018560020184815481106124f4576124f4612caa565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125c2565b60018083018054909161255991612c0e565b8154811061256957612569612caa565b906000526020600020015490508160010180548061258957612589612dfe565b60019003818190600052602060002001600090559055838260020182815481106125b5576125b5612caa565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556125f48582600187612780565b612779565b8360000361269757600082600201828154811061261857612618612caa565b90600052602060002001549050600083600201838154811061263c5761263c612caa565b6000918252602080832090910192909255600180860180549182018155825282822001849055858152600385018252604080822082905584825260048601909252908120819055612691908790849084612780565b50612779565b8160020181815481106126ac576126ac612caa565b90600052602060002001548414612779576000848360020183815481106126d5576126d5612caa565b90600052602060002001541115905060008161271b578584600201848154811061270157612701612caa565b90600052602060002001546127169190612c0e565b612746565b83600201838154811061273057612730612caa565b9060005260206000200154866127469190612c0e565b90508584600201848154811061275e5761275e612caa565b60009182526020909120015561277687848484612780565b50505b5050505050565b6000848152600c60205260409020835b80156128355781546127a3600183612c0e565b6127ad9190612e14565b9050836127e457828260020182815481106127ca576127ca612caa565b90600052602060002001546127df9190612c0e565b61280f565b828260020182815481106127fa576127fa612caa565b906000526020600020015461280f9190612c21565b82600201828154811061282457612824612caa565b600091825260209091200155612790565b505050505050565b6001600160a01b038116811461033f57600080fd5b6000806040838503121561286557600080fd5b82356128708161283d565b946020939093013593505050565b60006020828403121561289057600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126128be57600080fd5b813567ffffffffffffffff808211156128d9576128d9612897565b604051601f8301601f19908116603f0116810190828211818310171561290157612901612897565b8160405283815286602085880101111561291a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561294d57600080fd5b82359150602083013567ffffffffffffffff81111561296b57600080fd5b612977858286016128ad565b9150509250929050565b60008060006060848603121561299657600080fd5b505081359360208301359350604090920135919050565b600080604083850312156129c057600080fd5b82356129cb8161283d565b9150602083013567ffffffffffffffff81111561296b57600080fd5b6000602082840312156129f957600080fd5b81356111518161283d565b6020808252825182820181905260009190848201906040850190845b81811015612a455783516001600160601b031683529284019291840191600101612a20565b50909695505050505050565b60008060008060008060c08789031215612a6a57600080fd5b8635612a758161283d565b95506020870135612a858161283d565b945060408701359350606087013592506080870135612aa38161283d565b8092505060a087013590509295509295509295565b60008060408385031215612acb57600080fd5b50508035926020909101359150565b6001600160601b038116811461033f57600080fd5b60008060408385031215612b0257600080fd5b8235612b0d8161283d565b91506020830135612b1d81612ada565b809150509250929050565b801515811461033f57600080fd5b60008060008060808587031215612b4c57600080fd5b8435612b578161283d565b93506020850135612b6781612ada565b9250604085013591506060850135612b7e81612b28565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612bc157634e487b7160e01b600052602160045260246000fd5b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172357611723612bf8565b8082018082111561172357611723612bf8565b600060208284031215612c4657600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b600060018201612ca357612ca3612bf8565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612ce557612ce5612cc0565b500690565b808202811582820484141761172357611723612bf8565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b6000825160005b81811015612d645760208186018101518583015201612d4a565b506000920191825250919050565b600081612d8157612d81612bf8565b506000190190565b600080600080600080600060e0888a031215612da457600080fd5b8751612daf81612ada565b6020890151909750612dc081612b28565b8096505060408801519450606088015193506080880151925060a0880151915060c0880151612dee81612b28565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b600082612e2357612e23612cc0565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122096a3d02e0db395d3df3fc713d6999d1c1e4d07c048a1fdcb01d322750a00dd6164736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102465760003560e01c80637dc38f1411610139578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b0146106c6578063dd5e5cb514610712578063e534710d14610732578063f216de4c1461076a578063f2f4eb261461078a578063f6b4d82d146107aa57600080fd5b8063c15726181461061a578063ccbac9f514610630578063d09f392d14610646578063d1c1df4814610666578063d605787b146106a657600080fd5b8063b1c9fe6e116100fd578063b1c9fe6e1461058b578063b4a61608146105b9578063b5d69e99146105ce578063b888adfa146105ee578063c057eca71461060457600080fd5b80637dc38f14146104d8578063823cfd70146104ee578063965af6c71461050e578063a2473cc11461052e578063a5861b901461054e57600080fd5b80634c70a0d6116101c757806354812d171161018b57806354812d171461041757806356acb050146104375780635d2d78461461044d5780636624192f1461046d57806376fa9fc5146104b857600080fd5b80634c70a0d6146103825780634dbbebbc146103a25780634f1ef286146103c257806352d1902d146103d5578063543f8a36146103ea57600080fd5b80631b92bbbe1161020e5780631b92bbbe146102ee57806321e1625e1461030457806321ea9b3f1461032457806335975f4a14610342578063477a655c1461036257600080fd5b8063034327441461024b5780630b274f2e146102745780630b51806d1461028b5780630c340a24146102a05780630e083ec9146102d8575b600080fd5b34801561025757600080fd5b5061026160065481565b6040519081526020015b60405180910390f35b34801561028057600080fd5b50610289610814565b005b34801561029757600080fd5b50610261600681565b3480156102ac57600080fd5b506000546102c0906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b3480156102e457600080fd5b50610261600a5481565b3480156102fa57600080fd5b5061026160035481565b34801561031057600080fd5b5061028961031f366004612852565b610bec565b34801561033057600080fd5b5061028961033f36600461287e565b50565b34801561034e57600080fd5b5061028961035d36600461287e565b610c8f565b34801561036e57600080fd5b5061028961037d36600461293a565b610e7d565b34801561038e57600080fd5b506102c061039d366004612981565b610f74565b3480156103ae57600080fd5b506102896103bd366004612852565b611158565b6102896103d03660046129ad565b611241565b3480156103e157600080fd5b50610261611469565b3480156103f657600080fd5b5061040a6104053660046129e7565b6114c7565b60405161026b9190612a04565b34801561042357600080fd5b50610289610432366004612a51565b611565565b34801561044357600080fd5b50610261600b5481565b34801561045957600080fd5b50610289610468366004612ab8565b61168b565b34801561047957600080fd5b506104a86104883660046129e7565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161026b565b3480156104c457600080fd5b506102616104d3366004612ab8565b6116ce565b3480156104e457600080fd5b5061026160095481565b3480156104fa57600080fd5b5061028961050936600461287e565b611729565b34801561051a57600080fd5b50610289610529366004612852565b611758565b34801561053a57600080fd5b50610261610549366004612aef565b6117f3565b34801561055a57600080fd5b5061056e610569366004612b36565b61181d565b60408051938452602084019290925215159082015260600161026b565b34801561059757600080fd5b506001546105ac90600160a01b900460ff1681565b60405161026b9190612b9f565b3480156105c557600080fd5b50610261600481565b3480156105da57600080fd5b506102896105e93660046129e7565b611be4565b3480156105fa57600080fd5b5061026160045481565b34801561061057600080fd5b5061026160025481565b34801561062657600080fd5b5061026160055481565b34801561063c57600080fd5b5061026160085481565b34801561065257600080fd5b50610289610661366004612ab8565b611cc6565b34801561067257600080fd5b50610686610681366004612aef565b611d00565b60408051948552602085019390935291830152606082015260800161026b565b3480156106b257600080fd5b506007546102c0906001600160a01b031681565b3480156106d257600080fd5b506106fd6106e13660046129e7565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161026b565b34801561071e57600080fd5b5061028961072d36600461287e565b611d3f565b34801561073e57600080fd5b5061026161074d366004612aef565b600f60209081526000928352604080842090915290825290205481565b34801561077657600080fd5b50610289610785366004612852565b611d6e565b34801561079657600080fd5b506001546102c0906001600160a01b031681565b3480156107b657600080fd5b506108046107c536600461287e565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161026b9493929190612bc7565b6000600154600160a01b900460ff16600281111561083457610834612b89565b036109a7576002546004546108499042612c0e565b10156108b15760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109135760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a8565b6007546009546001600160a01b0390911690637363ae1f906109359043612c21565b6040518263ffffffff1660e01b815260040161095391815260200190565b600060405180830381600087803b15801561096d57600080fd5b505af1158015610981573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610ba1565b60018054600160a01b900460ff1660028111156109c6576109c6612b89565b03610abe576007546009546005546001600160a01b03909216916313cf9054916109ef91612c21565b6040518263ffffffff1660e01b8152600401610a0d91815260200190565b6020604051808303816000875af1158015610a2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a509190612c34565b6008819055600003610aa45760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a8565b600180546002919060ff60a01b1916600160a01b8361099d565b6002600154600160a01b900460ff166002811115610ade57610ade612b89565b03610ba1576006541580610b005750600354600454610afd9042612c0e565b10155b610b935760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a8565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610be291600160a01b90910460ff1690612b9f565b60405180910390a1565b6001546001600160a01b03163314610c165760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0382166000908152600d602052604081206002018054839290610c41908490612c21565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610caf57610caf612b89565b14610cfc5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a8565b6000600a54600183600b54610d119190612c21565b610d1b9190612c0e565b11610d265781610d41565b600b54600a54610d369190612c0e565b610d41906001612c21565b9050600081600b54610d539190612c21565b600b549091505b81811015610e75576000818152600e6020526040902080546001600160a01b031615610e625760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610dd69490821693600160a01b9092046001600160601b031692909160ff1690600401612bc7565b600060405180830381600087803b158015610df057600080fd5b505af1158015610e04573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b5080610e6d81612c91565b915050610d5a565b50600b555050565b6001546001600160a01b03163314610ea75760405162461bcd60e51b81526004016108a890612c4d565b6000828152600c6020526040812090610ebf83611de6565b825490915015610f085760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a8565b60018111610f585760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a8565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff166002811115610f9657610f96612b89565b14610fd25760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a8565b6000848152600c6020526040812060028101805491929091610ff657610ff6612caa565b9060005260206000200154600003611012576000915050611151565b60008160020160008154811061102a5761102a612caa565b9060005260206000200154600854868660405160200161105d939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6110809190612cd6565b905060005b60028301548354611097908390612cea565b6110a2906001612c21565b10156111315760015b8354811161112b576000818386600001546110c69190612cea565b6110d09190612c21565b905060008560020182815481106110e9576110e9612caa565b9060005260206000200154905080851061110e576111078186612c0e565b9450611116565b50915061112b565b5050808061112390612c91565b9150506110ab565b50611085565b600081815260048401602052604090205461114b90611e01565b93505050505b9392505050565b6000546001600160a01b031633146111825760405162461bcd60e51b81526004016108a890612d01565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156111c1576111c1612b89565b0361123d576007546009546001600160a01b0390911690637363ae1f906111e89043612c21565b6040518263ffffffff1660e01b815260040161120691815260200190565b600060405180830381600087803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b50504360055550505b5050565b61124a82611e2c565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806112c857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166112bc600080516020612e298339815191525490565b6001600160a01b031614155b156112e65760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611340575060408051601f3d908101601f1916820190925261133d91810190612c34565b60015b61136857604051630c76093760e01b81526001600160a01b03831660048201526024016108a8565b600080516020612e29833981519152811461139957604051632a87526960e21b8152600481018290526024016108a8565b600080516020612e298339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611464576000836001600160a01b0316836040516114009190612d43565b600060405180830381855af49150503d806000811461143b576040519150601f19603f3d011682016040523d82523d6000602084013e611440565b606091505b5050905080611462576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114b45760405163703e46dd60e11b815260040160405180910390fd5b50600080516020612e2983398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561155957602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116115165790505b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806115af5750805467ffffffffffffffff808416911610155b156115cc5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600080546001600160a01b038b81166001600160a01b031992831617909255600180548b841690831617815560028a905560038990554260045560078054938916939092169290921790556009859055600b55815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116b55760405162461bcd60e51b81526004016108a890612c4d565b600680549060006116c583612d72565b91905055505050565b6000828152600c60209081526040808320848452600381019092528220548083036116fe57600092505050611723565b81600201818154811061171357611713612caa565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117535760405162461bcd60e51b81526004016108a890612d01565b600255565b6001546001600160a01b031633146117825760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0382166000908152600d6020526040812060020180548392906117ad908490612c0e565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610c83565b6000806118008484611e56565b90506118156001600160601b038416826116ce565b949350505050565b600154600090819081906001600160a01b0316331461184e5760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0387166000908152600d602052604081209061187189896117f3565b82549091508715801561188d575060048110158061188d575081155b156118a5576000806000955095509550505050611bda565b6000600154600160a01b900460ff1660028111156118c5576118c5612b89565b14611a7f576118d4898b611e9e565b94506000600e6000600a600081546118eb90612c91565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611a235760028101805460ff191660011790556119ce848b8b86612155565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611a71565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060019350611bda92505050565b818810611a9f5786611a9a57611a97838a8a85612155565b95505b611ab8565b611aab838a8a85612235565b611ab59086612c21565b94505b6000611ac48b8b611e56565b905060008a5b81611b8257611ae36001600160601b0382168c8561242c565b6000196001600160601b03821601611afe5760019150611aca565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b739190612d89565b50949550611aca945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506001955050505050505b9450945094915050565b6001546001600160a01b03163314611c0e5760405162461bcd60e51b81526004016108a890612c4d565b6000611c19826114c7565b80519091505b801561146457600180546001600160a01b03169063fbb519e79085908590611c479086612c0e565b81518110611c5757611c57612caa565b60200260200101516000806040518563ffffffff1660e01b8152600401611c819493929190612bc7565b600060405180830381600087803b158015611c9b57600080fd5b505af1158015611caf573d6000803e3d6000fd5b505050508080611cbe90612d72565b915050611c1f565b6001546001600160a01b03163314611cf05760405162461bcd60e51b81526004016108a890612c4d565b600680549060006116c583612c91565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611d3287876117f3565b9054949793965094505050565b6000546001600160a01b03163314611d695760405162461bcd60e51b81526004016108a890612d01565b600355565b6001546001600160a01b03163314611d985760405162461bcd60e51b81526004016108a890612c4d565b6001600160a01b0382166000908152600d6020526040902060018101548211611dda5781816001016000828254611dcf9190612c0e565b909155506114649050565b60006001820155505050565b60006020825110611df957506020015190565b506006919050565b600060405160005b6014811015611e245783811a81600c84010153600101611e09565b505192915050565b6000546001600160a01b0316331461033f5760405162461bcd60e51b81526004016108a890612d01565b600060405160005b6014811015611e79578481600c011a81830153600101611e5e565b5060145b6020811015611e955783811a81830153600101611e7d565b50519392505050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561214e576000818152600e60205260409020600281015460ff1615612101576000611ef885876117f3565b90506000818360010154611f0c9190612c0e565b6001600160a01b0387166000908152600d602052604090206001810154919650869250908210611f3e57806001015495505b85816001016000828254611f529190612c0e565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036120fd5780545b80156120fb576001600160601b03891682611fc7600184612c0e565b81548110611fd757611fd7612caa565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036120e9578154829061201390600190612c0e565b8154811061202357612023612caa565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906120579084612c0e565b8154811061206757612067612caa565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806120b3576120b3612dfe565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556120fb565b806120f381612d72565b915050611fab565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561216f576000612183565b856001015486600201546121839190612c0e565b905061218f8184612c21565b84101561219d5760006121b2565b806121a88486612c0e565b6121b29190612c0e565b9150826000036121f7578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156122095783612224565b8383876001015461221a9190612c0e565b6122249190612c21565b866001018190555050949350505050565b60028401546000906122478484612c0e565b6122519190612c21565b85600101541061226c576122658383612c0e565b9050612292565b8460020154856001015410612292578460020154856001015461228f9190612c0e565b90505b826000036123ef5784545b80156123ed576001600160601b038516866122b9600184612c0e565b815481106122c9576122c9612caa565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123db578554869061230590600190612c0e565b8154811061231557612315612caa565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906123499084612c0e565b8154811061235957612359612caa565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806123a5576123a5612dfe565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123ed565b806123e581612d72565b91505061229d565b505b8185600101541015612401578261241c565b828286600101546124129190612c0e565b61241c9190612c21565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036125f95783156125f45760018201546000036125475750600281018054600180820183556000928352602090922081018590559081148015906124a65750815461249a600183612c0e565b6124a49190612cd6565b155b156125425781546000906124ba9083612e14565b60008181526004850160205260408120549192506124d9846001612c21565b9050846002018560020184815481106124f4576124f4612caa565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6125c2565b60018083018054909161255991612c0e565b8154811061256957612569612caa565b906000526020600020015490508160010180548061258957612589612dfe565b60019003818190600052602060002001600090559055838260020182815481106125b5576125b5612caa565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556125f48582600187612780565b612779565b8360000361269757600082600201828154811061261857612618612caa565b90600052602060002001549050600083600201838154811061263c5761263c612caa565b6000918252602080832090910192909255600180860180549182018155825282822001849055858152600385018252604080822082905584825260048601909252908120819055612691908790849084612780565b50612779565b8160020181815481106126ac576126ac612caa565b90600052602060002001548414612779576000848360020183815481106126d5576126d5612caa565b90600052602060002001541115905060008161271b578584600201848154811061270157612701612caa565b90600052602060002001546127169190612c0e565b612746565b83600201838154811061273057612730612caa565b9060005260206000200154866127469190612c0e565b90508584600201848154811061275e5761275e612caa565b60009182526020909120015561277687848484612780565b50505b5050505050565b6000848152600c60205260409020835b80156128355781546127a3600183612c0e565b6127ad9190612e14565b9050836127e457828260020182815481106127ca576127ca612caa565b90600052602060002001546127df9190612c0e565b61280f565b828260020182815481106127fa576127fa612caa565b906000526020600020015461280f9190612c21565b82600201828154811061282457612824612caa565b600091825260209091200155612790565b505050505050565b6001600160a01b038116811461033f57600080fd5b6000806040838503121561286557600080fd5b82356128708161283d565b946020939093013593505050565b60006020828403121561289057600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126128be57600080fd5b813567ffffffffffffffff808211156128d9576128d9612897565b604051601f8301601f19908116603f0116810190828211818310171561290157612901612897565b8160405283815286602085880101111561291a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561294d57600080fd5b82359150602083013567ffffffffffffffff81111561296b57600080fd5b612977858286016128ad565b9150509250929050565b60008060006060848603121561299657600080fd5b505081359360208301359350604090920135919050565b600080604083850312156129c057600080fd5b82356129cb8161283d565b9150602083013567ffffffffffffffff81111561296b57600080fd5b6000602082840312156129f957600080fd5b81356111518161283d565b6020808252825182820181905260009190848201906040850190845b81811015612a455783516001600160601b031683529284019291840191600101612a20565b50909695505050505050565b60008060008060008060c08789031215612a6a57600080fd5b8635612a758161283d565b95506020870135612a858161283d565b945060408701359350606087013592506080870135612aa38161283d565b8092505060a087013590509295509295509295565b60008060408385031215612acb57600080fd5b50508035926020909101359150565b6001600160601b038116811461033f57600080fd5b60008060408385031215612b0257600080fd5b8235612b0d8161283d565b91506020830135612b1d81612ada565b809150509250929050565b801515811461033f57600080fd5b60008060008060808587031215612b4c57600080fd5b8435612b578161283d565b93506020850135612b6781612ada565b9250604085013591506060850135612b7e81612b28565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612bc157634e487b7160e01b600052602160045260246000fd5b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172357611723612bf8565b8082018082111561172357611723612bf8565b600060208284031215612c4657600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b600060018201612ca357612ca3612bf8565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612ce557612ce5612cc0565b500690565b808202811582820484141761172357611723612bf8565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b6000825160005b81811015612d645760208186018101518583015201612d4a565b506000920191825250919050565b600081612d8157612d81612bf8565b506000190190565b600080600080600080600060e0888a031215612da457600080fd5b8751612daf81612ada565b6020890151909750612dc081612b28565b8096505060408801519450606088015193506080880151925060a0880151915060c0880151612dee81612b28565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b600082612e2357612e23612cc0565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122096a3d02e0db395d3df3fc713d6999d1c1e4d07c048a1fdcb01d322750a00dd6164736f6c63430008120033", + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "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\":\"StakeDelayedAlreadyTransferredDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferredWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedNotTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountAllCourts\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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.\"},\"StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens withdrawn.\",\"_courtID\":\"The ID of the court.\"}},\"StakeDelayedNotTransferred(address,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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.\"}},\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModule\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"events\":{\"StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are already deposited.\"},\"StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are already withdrawn.\"},\"StakeDelayedNotTransferred(address,uint256,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are not transferred yet.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/SortitionModule.sol\":\"SortitionModule\"},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"license\":\"MIT\"},\"src/arbitration/SortitionModule.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 {SortitionModuleBase, KlerosCore, RNG} from \\\"./SortitionModuleBase.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is SortitionModuleBase {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\n __SortitionModuleBase_initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n }\\n\\n function initialize3() external reinitializer(3) {\\n // NOP\\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 virtual override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x895d41c99597957e112739427d8bed728f2ebf2f6a69bc913c037d654d171c40\",\"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} from \\\"./KlerosCore.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {RNG} from \\\"../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, Initializable, UUPSProxiable {\\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 /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are not transferred yet.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayedNotTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are already deposited.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayedAlreadyTransferredDeposited(address indexed _address, uint256 _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are already withdrawn.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens withdrawn.\\n event StakeDelayedAlreadyTransferredWithdrawn(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __SortitionModuleBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal onlyInitializing {\\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 governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\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 // Nullify the index so the delayed stake won't get deleted before its own execution.\\n delete latestDelayedStakeIndex[delayedStake.account][delayedStake.courtID];\\n core.setStakeBySortitionModule(\\n delayedStake.account,\\n delayedStake.courtID,\\n delayedStake.stake,\\n delayedStake.alreadyTransferred\\n );\\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 (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n pnkWithdrawal = _deleteDelayedStake(_courtID, _account);\\n if (phase != Phase.staking) {\\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 StakeDelayedAlreadyTransferredDeposited(_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, juror.stakedPnk);\\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\":\"0xc5ebae59558c74b41b8a45d4705115cbe9fac373e1828d0589b6cc71ffd9011c\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161311762000103600039600081816112d90152818161130201526114fa01526131176000f3fe6080604052600436106102515760003560e01c8063823cfd7011610139578063d09f392d116100b6578063e4c0aaf41161007a578063e4c0aaf414610743578063e534710d14610763578063ec918b651461079b578063f216de4c146107b0578063f2f4eb26146107d0578063f6b4d82d146107f057600080fd5b8063d09f392d14610657578063d1c1df4814610677578063d605787b146106b7578063dca5f6b0146106d7578063dd5e5cb51461072357600080fd5b8063b5d69e99116100fd578063b5d69e99146105df578063b888adfa146105ff578063c057eca714610615578063c15726181461062b578063ccbac9f51461064157600080fd5b8063823cfd7014610522578063965af6c714610542578063a2473cc114610562578063a5861b9014610582578063b1c9fe6e146105b157600080fd5b80634dbbebbc116101d257806354fd4d501161019657806354fd4d501461042d57806356acb0501461046b5780635d2d7846146104815780636624192f146104a157806376fa9fc5146104ec5780637dc38f141461050c57600080fd5b80634dbbebbc146103985780634f1ef286146103b857806352d1902d146103cb578063543f8a36146103e057806354812d171461040d57600080fd5b806321e1625e1161021957806321e1625e146102fa57806321ea9b3f1461031a57806335975f4a14610338578063477a655c146103585780634c70a0d61461037857600080fd5b806303432744146102565780630b274f2e1461027f5780630c340a24146102965780630e083ec9146102ce5780631b92bbbe146102e4575b600080fd5b34801561026257600080fd5b5061026c60065481565b6040519081526020015b60405180910390f35b34801561028b57600080fd5b5061029461085a565b005b3480156102a257600080fd5b506000546102b6906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b3480156102da57600080fd5b5061026c600a5481565b3480156102f057600080fd5b5061026c60035481565b34801561030657600080fd5b50610294610315366004612a8c565b610c32565b34801561032657600080fd5b50610294610335366004612ab8565b50565b34801561034457600080fd5b50610294610353366004612ab8565b610cd5565b34801561036457600080fd5b50610294610373366004612b73565b610f01565b34801561038457600080fd5b506102b6610393366004612bb9565b610ff8565b3480156103a457600080fd5b506102946103b3366004612a8c565b6111dc565b6102946103c6366004612be5565b6112c5565b3480156103d757600080fd5b5061026c6114ed565b3480156103ec57600080fd5b506104006103fb366004612c1e565b61154b565b6040516102769190612c3b565b34801561041957600080fd5b50610294610428366004612c88565b6115e9565b34801561043957600080fd5b5061045e604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102769190612d13565b34801561047757600080fd5b5061026c600b5481565b34801561048d57600080fd5b5061029461049c366004612d46565b6116b9565b3480156104ad57600080fd5b506104dc6104bc366004612c1e565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610276565b3480156104f857600080fd5b5061026c610507366004612d46565b6116fc565b34801561051857600080fd5b5061026c60095481565b34801561052e57600080fd5b5061029461053d366004612ab8565b611757565b34801561054e57600080fd5b5061029461055d366004612a8c565b611786565b34801561056e57600080fd5b5061026c61057d366004612d7d565b611821565b34801561058e57600080fd5b506105a261059d366004612dc4565b61184b565b60405161027693929190612e2d565b3480156105bd57600080fd5b506001546105d290600160a01b900460ff1681565b6040516102769190612e59565b3480156105eb57600080fd5b506102946105fa366004612c1e565b611898565b34801561060b57600080fd5b5061026c60045481565b34801561062157600080fd5b5061026c60025481565b34801561063757600080fd5b5061026c60055481565b34801561064d57600080fd5b5061026c60085481565b34801561066357600080fd5b50610294610672366004612d46565b61197a565b34801561068357600080fd5b50610697610692366004612d7d565b6119b4565b604080519485526020850193909352918301526060820152608001610276565b3480156106c357600080fd5b506007546102b6906001600160a01b031681565b3480156106e357600080fd5b5061070e6106f2366004612c1e565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610276565b34801561072f57600080fd5b5061029461073e366004612ab8565b6119f3565b34801561074f57600080fd5b5061029461075e366004612c1e565b611a22565b34801561076f57600080fd5b5061026c61077e366004612d7d565b600f60209081526000928352604080842090915290825290205481565b3480156107a757600080fd5b50610294611a6e565b3480156107bc57600080fd5b506102946107cb366004612a8c565b611b1f565b3480156107dc57600080fd5b506001546102b6906001600160a01b031681565b3480156107fc57600080fd5b5061084a61080b366004612ab8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102769493929190612e73565b6000600154600160a01b900460ff16600281111561087a5761087a612e17565b036109ed5760025460045461088f9042612eba565b10156108f75760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109595760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108ee565b6007546009546001600160a01b0390911690637363ae1f9061097b9043612ecd565b6040518263ffffffff1660e01b815260040161099991815260200190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610be7565b60018054600160a01b900460ff166002811115610a0c57610a0c612e17565b03610b04576007546009546005546001600160a01b03909216916313cf905491610a3591612ecd565b6040518263ffffffff1660e01b8152600401610a5391815260200190565b6020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190612ee0565b6008819055600003610aea5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108ee565b600180546002919060ff60a01b1916600160a01b836109e3565b6002600154600160a01b900460ff166002811115610b2457610b24612e17565b03610be7576006541580610b465750600354600454610b439042612eba565b10155b610bd95760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108ee565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c2891600160a01b90910460ff1690612e59565b60405180910390a1565b6001546001600160a01b03163314610c5c5760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d602052604081206002018054839290610c87908490612ecd565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610cf557610cf5612e17565b14610d425760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108ee565b600b54600a541015610d965760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108ee565b6000600a54600183600b54610dab9190612ecd565b610db59190612eba565b11610dc05781610ddb565b600b54600a54610dd09190612eba565b610ddb906001612ecd565b9050600081600b54610ded9190612ecd565b600b549091505b81811015610ef9576000818152600e6020526040902080546001600160a01b031615610ef05780546001600160a01b038082166000908152600f602090815260408083206001600160601b03600160a01b9687900481168552925280832092909255600180548654918701546002880154945163fbb519e760e01b81529186169663fbb519e796610e999690851695919094041692909160ff90911690600401612e73565b600060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050506000838152600e602052604081208181556001810191909155600201805460ff19169055505b50600101610df4565b50600b555050565b6001546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016108ee90612ef9565b6000828152600c6020526040812090610f4383611b97565b825490915015610f8c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108ee565b60018111610fdc5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108ee565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff16600281111561101a5761101a612e17565b146110565760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108ee565b6000848152600c602052604081206002810180549192909161107a5761107a612f3d565b90600052602060002001546000036110965760009150506111d5565b6000816002016000815481106110ae576110ae612f3d565b906000526020600020015460085486866040516020016110e1939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111049190612f69565b905060005b6002830154835461111b908390612f7d565b611126906001612ecd565b10156111b55760015b835481116111af5760008183866000015461114a9190612f7d565b6111549190612ecd565b9050600085600201828154811061116d5761116d612f3d565b906000526020600020015490508085106111925761118b8186612eba565b945061119a565b5091506111af565b505080806111a790612f94565b91505061112f565b50611109565b60008181526004840160205260409020546111cf90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146112065760405162461bcd60e51b81526004016108ee90612fad565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff16600281111561124557611245612e17565b036112c1576007546009546001600160a01b0390911690637363ae1f9061126c9043612ecd565b6040518263ffffffff1660e01b815260040161128a91815260200190565b600060405180830381600087803b1580156112a457600080fd5b505af11580156112b8573d6000803e3d6000fd5b50504360055550505b5050565b6112ce82611bdd565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061134c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113406000805160206130c28339815191525490565b6001600160a01b031614155b1561136a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c4575060408051601f3d908101601f191682019092526113c191810190612ee0565b60015b6113ec57604051630c76093760e01b81526001600160a01b03831660048201526024016108ee565b6000805160206130c2833981519152811461141d57604051632a87526960e21b8152600481018290526024016108ee565b6000805160206130c28339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156114e8576000836001600160a01b0316836040516114849190612fef565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114e6576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115385760405163703e46dd60e11b815260040160405180910390fd5b506000805160206130c283398151915290565b6001600160a01b0381166000908152600d60209081526040918290208054835181840281018401909452808452606093928301828280156115dd57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161159a5790505b50505050509050919050565b600160006115f5611c07565b8054909150600160401b900460ff168061161c575080546001600160401b03808416911610155b156116395760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611668888888888888611c2b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116e35760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f38361300b565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361172c57600092505050611751565b81600201818154811061174157611741612f3d565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117815760405162461bcd60e51b81526004016108ee90612fad565b600255565b6001546001600160a01b031633146117b05760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040812060020180548392906117db908490612eba565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610cc9565b60008061182e8484611c8b565b90506118436001600160601b038416826116fc565b949350505050565b600154600090819081906001600160a01b0316331461187c5760405162461bcd60e51b81526004016108ee90612ef9565b61188887878787611cd3565b9199909850909650945050505050565b6001546001600160a01b031633146118c25760405162461bcd60e51b81526004016108ee90612ef9565b60006118cd8261154b565b80519091505b80156114e857600180546001600160a01b03169063fbb519e790859085906118fb9086612eba565b8151811061190b5761190b612f3d565b60200260200101516000806040518563ffffffff1660e01b81526004016119359493929190612e73565b600060405180830381600087803b15801561194f57600080fd5b505af1158015611963573d6000803e3d6000fd5b5050505080806119729061300b565b9150506118d3565b6001546001600160a01b031633146119a45760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f383612f94565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119e68787611821565b9054949793965094505050565b6000546001600160a01b03163314611a1d5760405162461bcd60e51b81526004016108ee90612fad565b600355565b6000546001600160a01b03163314611a4c5760405162461bcd60e51b81526004016108ee90612fad565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036000611a7a611c07565b8054909150600160401b900460ff1680611aa1575080546001600160401b03808416911610155b15611abe5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612eba565b909155506114e89050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b031633146103355760405162461bcd60e51b81526004016108ee90612fad565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b611c33612097565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b6014811015611cae578481600c011a81830153600101611c93565b5060145b6020811015611cca5783811a81830153600101611cb2565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611cfa8989611821565b825490915081158015611d0e575060048110155b15611d2657600080600395509550955050505061208d565b81158015611d32575087155b15611d4a57600080600895509550955050505061208d565b611d54898b6120be565b94506000600154600160a01b900460ff166002811115611d7657611d76612e17565b14611f24576000600e6000600a60008154611d9090612f94565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611ec85760028101805460ff19166001179055611e73848b8b86612375565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f040c97ed4ca4c864eb1463d1115e1ff278ce453e2e100ed2f5d45ab06f3d579d910160405180910390a2611f16565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b506000935061208d92505050565b818810611f445786611f3f57611f3c838a8a85612375565b95505b611f5d565b611f50838a8a85612455565b611f5a9086612ecd565b94505b6000611f698b8b611c8b565b905060008a5b8161202757611f886001600160601b0382168c8561264c565b6000196001600160601b03821601611fa35760019150611f6f565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120189190613022565b50949550611f6f945050505050565b6001860154604080516001600160601b038f168152602081018e9052908101919091526001600160a01b038e16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2506000955050505050505b9450945094915050565b61209f6129a0565b6120bc57604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561236e576000818152600e60205260409020600281015460ff16156123215760006121188587611821565b9050600081836001015461212c9190612eba565b6001600160a01b0387166000908152600d60205260409020600181015491965086925090821061215e57806001015495505b858160010160008282546121729190612eba565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a38260000361231d5780545b801561231b576001600160601b038916826121e7600184612eba565b815481106121f7576121f7612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603612309578154829061223390600190612eba565b8154811061224357612243612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122779084612eba565b8154811061228757612287612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122d3576122d3613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561231b565b806123138161300b565b9150506121cb565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561238f5760006123a3565b856001015486600201546123a39190612eba565b90506123af8184612ecd565b8410156123bd5760006123d2565b806123c88486612eba565b6123d29190612eba565b915082600003612417578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124295783612444565b8383876001015461243a9190612eba565b6124449190612ecd565b866001018190555050949350505050565b60028401546000906124678484612eba565b6124719190612ecd565b85600101541061248c576124858383612eba565b90506124b2565b84600201548560010154106124b257846002015485600101546124af9190612eba565b90505b8260000361260f5784545b801561260d576001600160601b038516866124d9600184612eba565b815481106124e9576124e9612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036125fb578554869061252590600190612eba565b8154811061253557612535612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125699084612eba565b8154811061257957612579612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806125c5576125c5613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561260d565b806126058161300b565b9150506124bd565b505b8185600101541015612621578261263c565b828286600101546126329190612eba565b61263c9190612ecd565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128195783156128145760018201546000036127675750600281018054600180820183556000928352602090922081018590559081148015906126c6575081546126ba600183612eba565b6126c49190612f69565b155b156127625781546000906126da90836130ad565b60008181526004850160205260408120549192506126f9846001612ecd565b90508460020185600201848154811061271457612714612f3d565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6127e2565b60018083018054909161277991612eba565b8154811061278957612789612f3d565b90600052602060002001549050816001018054806127a9576127a9613097565b60019003818190600052602060002001600090559055838260020182815481106127d5576127d5612f3d565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561281485826001876129ba565b612999565b836000036128b757600082600201828154811061283857612838612f3d565b90600052602060002001549050600083600201838154811061285c5761285c612f3d565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556128b19087908490846129ba565b50612999565b8160020181815481106128cc576128cc612f3d565b90600052602060002001548414612999576000848360020183815481106128f5576128f5612f3d565b90600052602060002001541115905060008161293b578584600201848154811061292157612921612f3d565b90600052602060002001546129369190612eba565b612966565b83600201838154811061295057612950612f3d565b9060005260206000200154866129669190612eba565b90508584600201848154811061297e5761297e612f3d565b600091825260209091200155612996878484846129ba565b50505b5050505050565b60006129aa611c07565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612a6f5781546129dd600183612eba565b6129e791906130ad565b905083612a1e5782826002018281548110612a0457612a04612f3d565b9060005260206000200154612a199190612eba565b612a49565b82826002018281548110612a3457612a34612f3d565b9060005260206000200154612a499190612ecd565b826002018281548110612a5e57612a5e612f3d565b6000918252602090912001556129ca565b505050505050565b6001600160a01b038116811461033557600080fd5b60008060408385031215612a9f57600080fd5b8235612aaa81612a77565b946020939093013593505050565b600060208284031215612aca57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612af857600080fd5b81356001600160401b0380821115612b1257612b12612ad1565b604051601f8301601f19908116603f01168101908282118183101715612b3a57612b3a612ad1565b81604052838152866020858801011115612b5357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612b8657600080fd5b8235915060208301356001600160401b03811115612ba357600080fd5b612baf85828601612ae7565b9150509250929050565b600080600060608486031215612bce57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612bf857600080fd5b8235612c0381612a77565b915060208301356001600160401b03811115612ba357600080fd5b600060208284031215612c3057600080fd5b81356111d581612a77565b6020808252825182820181905260009190848201906040850190845b81811015612c7c5783516001600160601b031683529284019291840191600101612c57565b50909695505050505050565b60008060008060008060c08789031215612ca157600080fd5b8635612cac81612a77565b95506020870135612cbc81612a77565b945060408701359350606087013592506080870135612cda81612a77565b8092505060a087013590509295509295509295565b60005b83811015612d0a578181015183820152602001612cf2565b50506000910152565b6020815260008251806020840152612d32816040850160208701612cef565b601f01601f19169190910160400192915050565b60008060408385031215612d5957600080fd5b50508035926020909101359150565b6001600160601b038116811461033557600080fd5b60008060408385031215612d9057600080fd5b8235612d9b81612a77565b91506020830135612dab81612d68565b809150509250929050565b801515811461033557600080fd5b60008060008060808587031215612dda57600080fd5b8435612de581612a77565b93506020850135612df581612d68565b9250604085013591506060850135612e0c81612db6565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160098310612e4b57612e4b612e17565b826040830152949350505050565b6020810160038310612e6d57612e6d612e17565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561175157611751612ea4565b8082018082111561175157611751612ea4565b600060208284031215612ef257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500690565b808202811582820484141761175157611751612ea4565b600060018201612fa657612fa6612ea4565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251613001818460208701612cef565b9190910192915050565b60008161301a5761301a612ea4565b506000190190565b600080600080600080600060e0888a03121561303d57600080fd5b875161304881612d68565b602089015190975061305981612db6565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161308781612db6565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b6000826130bc576130bc612f53565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205df31a379a3344b7416d4590b65130aa7a2e941ece6783087fde76eddcdc9dd064736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106102515760003560e01c8063823cfd7011610139578063d09f392d116100b6578063e4c0aaf41161007a578063e4c0aaf414610743578063e534710d14610763578063ec918b651461079b578063f216de4c146107b0578063f2f4eb26146107d0578063f6b4d82d146107f057600080fd5b8063d09f392d14610657578063d1c1df4814610677578063d605787b146106b7578063dca5f6b0146106d7578063dd5e5cb51461072357600080fd5b8063b5d69e99116100fd578063b5d69e99146105df578063b888adfa146105ff578063c057eca714610615578063c15726181461062b578063ccbac9f51461064157600080fd5b8063823cfd7014610522578063965af6c714610542578063a2473cc114610562578063a5861b9014610582578063b1c9fe6e146105b157600080fd5b80634dbbebbc116101d257806354fd4d501161019657806354fd4d501461042d57806356acb0501461046b5780635d2d7846146104815780636624192f146104a157806376fa9fc5146104ec5780637dc38f141461050c57600080fd5b80634dbbebbc146103985780634f1ef286146103b857806352d1902d146103cb578063543f8a36146103e057806354812d171461040d57600080fd5b806321e1625e1161021957806321e1625e146102fa57806321ea9b3f1461031a57806335975f4a14610338578063477a655c146103585780634c70a0d61461037857600080fd5b806303432744146102565780630b274f2e1461027f5780630c340a24146102965780630e083ec9146102ce5780631b92bbbe146102e4575b600080fd5b34801561026257600080fd5b5061026c60065481565b6040519081526020015b60405180910390f35b34801561028b57600080fd5b5061029461085a565b005b3480156102a257600080fd5b506000546102b6906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b3480156102da57600080fd5b5061026c600a5481565b3480156102f057600080fd5b5061026c60035481565b34801561030657600080fd5b50610294610315366004612a8c565b610c32565b34801561032657600080fd5b50610294610335366004612ab8565b50565b34801561034457600080fd5b50610294610353366004612ab8565b610cd5565b34801561036457600080fd5b50610294610373366004612b73565b610f01565b34801561038457600080fd5b506102b6610393366004612bb9565b610ff8565b3480156103a457600080fd5b506102946103b3366004612a8c565b6111dc565b6102946103c6366004612be5565b6112c5565b3480156103d757600080fd5b5061026c6114ed565b3480156103ec57600080fd5b506104006103fb366004612c1e565b61154b565b6040516102769190612c3b565b34801561041957600080fd5b50610294610428366004612c88565b6115e9565b34801561043957600080fd5b5061045e604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102769190612d13565b34801561047757600080fd5b5061026c600b5481565b34801561048d57600080fd5b5061029461049c366004612d46565b6116b9565b3480156104ad57600080fd5b506104dc6104bc366004612c1e565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610276565b3480156104f857600080fd5b5061026c610507366004612d46565b6116fc565b34801561051857600080fd5b5061026c60095481565b34801561052e57600080fd5b5061029461053d366004612ab8565b611757565b34801561054e57600080fd5b5061029461055d366004612a8c565b611786565b34801561056e57600080fd5b5061026c61057d366004612d7d565b611821565b34801561058e57600080fd5b506105a261059d366004612dc4565b61184b565b60405161027693929190612e2d565b3480156105bd57600080fd5b506001546105d290600160a01b900460ff1681565b6040516102769190612e59565b3480156105eb57600080fd5b506102946105fa366004612c1e565b611898565b34801561060b57600080fd5b5061026c60045481565b34801561062157600080fd5b5061026c60025481565b34801561063757600080fd5b5061026c60055481565b34801561064d57600080fd5b5061026c60085481565b34801561066357600080fd5b50610294610672366004612d46565b61197a565b34801561068357600080fd5b50610697610692366004612d7d565b6119b4565b604080519485526020850193909352918301526060820152608001610276565b3480156106c357600080fd5b506007546102b6906001600160a01b031681565b3480156106e357600080fd5b5061070e6106f2366004612c1e565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610276565b34801561072f57600080fd5b5061029461073e366004612ab8565b6119f3565b34801561074f57600080fd5b5061029461075e366004612c1e565b611a22565b34801561076f57600080fd5b5061026c61077e366004612d7d565b600f60209081526000928352604080842090915290825290205481565b3480156107a757600080fd5b50610294611a6e565b3480156107bc57600080fd5b506102946107cb366004612a8c565b611b1f565b3480156107dc57600080fd5b506001546102b6906001600160a01b031681565b3480156107fc57600080fd5b5061084a61080b366004612ab8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102769493929190612e73565b6000600154600160a01b900460ff16600281111561087a5761087a612e17565b036109ed5760025460045461088f9042612eba565b10156108f75760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109595760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108ee565b6007546009546001600160a01b0390911690637363ae1f9061097b9043612ecd565b6040518263ffffffff1660e01b815260040161099991815260200190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610be7565b60018054600160a01b900460ff166002811115610a0c57610a0c612e17565b03610b04576007546009546005546001600160a01b03909216916313cf905491610a3591612ecd565b6040518263ffffffff1660e01b8152600401610a5391815260200190565b6020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190612ee0565b6008819055600003610aea5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108ee565b600180546002919060ff60a01b1916600160a01b836109e3565b6002600154600160a01b900460ff166002811115610b2457610b24612e17565b03610be7576006541580610b465750600354600454610b439042612eba565b10155b610bd95760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108ee565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c2891600160a01b90910460ff1690612e59565b60405180910390a1565b6001546001600160a01b03163314610c5c5760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d602052604081206002018054839290610c87908490612ecd565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610cf557610cf5612e17565b14610d425760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108ee565b600b54600a541015610d965760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108ee565b6000600a54600183600b54610dab9190612ecd565b610db59190612eba565b11610dc05781610ddb565b600b54600a54610dd09190612eba565b610ddb906001612ecd565b9050600081600b54610ded9190612ecd565b600b549091505b81811015610ef9576000818152600e6020526040902080546001600160a01b031615610ef05780546001600160a01b038082166000908152600f602090815260408083206001600160601b03600160a01b9687900481168552925280832092909255600180548654918701546002880154945163fbb519e760e01b81529186169663fbb519e796610e999690851695919094041692909160ff90911690600401612e73565b600060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050506000838152600e602052604081208181556001810191909155600201805460ff19169055505b50600101610df4565b50600b555050565b6001546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016108ee90612ef9565b6000828152600c6020526040812090610f4383611b97565b825490915015610f8c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108ee565b60018111610fdc5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108ee565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff16600281111561101a5761101a612e17565b146110565760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108ee565b6000848152600c602052604081206002810180549192909161107a5761107a612f3d565b90600052602060002001546000036110965760009150506111d5565b6000816002016000815481106110ae576110ae612f3d565b906000526020600020015460085486866040516020016110e1939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111049190612f69565b905060005b6002830154835461111b908390612f7d565b611126906001612ecd565b10156111b55760015b835481116111af5760008183866000015461114a9190612f7d565b6111549190612ecd565b9050600085600201828154811061116d5761116d612f3d565b906000526020600020015490508085106111925761118b8186612eba565b945061119a565b5091506111af565b505080806111a790612f94565b91505061112f565b50611109565b60008181526004840160205260409020546111cf90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146112065760405162461bcd60e51b81526004016108ee90612fad565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff16600281111561124557611245612e17565b036112c1576007546009546001600160a01b0390911690637363ae1f9061126c9043612ecd565b6040518263ffffffff1660e01b815260040161128a91815260200190565b600060405180830381600087803b1580156112a457600080fd5b505af11580156112b8573d6000803e3d6000fd5b50504360055550505b5050565b6112ce82611bdd565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061134c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113406000805160206130c28339815191525490565b6001600160a01b031614155b1561136a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c4575060408051601f3d908101601f191682019092526113c191810190612ee0565b60015b6113ec57604051630c76093760e01b81526001600160a01b03831660048201526024016108ee565b6000805160206130c2833981519152811461141d57604051632a87526960e21b8152600481018290526024016108ee565b6000805160206130c28339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156114e8576000836001600160a01b0316836040516114849190612fef565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114e6576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115385760405163703e46dd60e11b815260040160405180910390fd5b506000805160206130c283398151915290565b6001600160a01b0381166000908152600d60209081526040918290208054835181840281018401909452808452606093928301828280156115dd57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161159a5790505b50505050509050919050565b600160006115f5611c07565b8054909150600160401b900460ff168061161c575080546001600160401b03808416911610155b156116395760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611668888888888888611c2b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116e35760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f38361300b565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361172c57600092505050611751565b81600201818154811061174157611741612f3d565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117815760405162461bcd60e51b81526004016108ee90612fad565b600255565b6001546001600160a01b031633146117b05760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040812060020180548392906117db908490612eba565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610cc9565b60008061182e8484611c8b565b90506118436001600160601b038416826116fc565b949350505050565b600154600090819081906001600160a01b0316331461187c5760405162461bcd60e51b81526004016108ee90612ef9565b61188887878787611cd3565b9199909850909650945050505050565b6001546001600160a01b031633146118c25760405162461bcd60e51b81526004016108ee90612ef9565b60006118cd8261154b565b80519091505b80156114e857600180546001600160a01b03169063fbb519e790859085906118fb9086612eba565b8151811061190b5761190b612f3d565b60200260200101516000806040518563ffffffff1660e01b81526004016119359493929190612e73565b600060405180830381600087803b15801561194f57600080fd5b505af1158015611963573d6000803e3d6000fd5b5050505080806119729061300b565b9150506118d3565b6001546001600160a01b031633146119a45760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f383612f94565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119e68787611821565b9054949793965094505050565b6000546001600160a01b03163314611a1d5760405162461bcd60e51b81526004016108ee90612fad565b600355565b6000546001600160a01b03163314611a4c5760405162461bcd60e51b81526004016108ee90612fad565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036000611a7a611c07565b8054909150600160401b900460ff1680611aa1575080546001600160401b03808416911610155b15611abe5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612eba565b909155506114e89050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b031633146103355760405162461bcd60e51b81526004016108ee90612fad565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b611c33612097565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b6014811015611cae578481600c011a81830153600101611c93565b5060145b6020811015611cca5783811a81830153600101611cb2565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611cfa8989611821565b825490915081158015611d0e575060048110155b15611d2657600080600395509550955050505061208d565b81158015611d32575087155b15611d4a57600080600895509550955050505061208d565b611d54898b6120be565b94506000600154600160a01b900460ff166002811115611d7657611d76612e17565b14611f24576000600e6000600a60008154611d9090612f94565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611ec85760028101805460ff19166001179055611e73848b8b86612375565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f040c97ed4ca4c864eb1463d1115e1ff278ce453e2e100ed2f5d45ab06f3d579d910160405180910390a2611f16565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b506000935061208d92505050565b818810611f445786611f3f57611f3c838a8a85612375565b95505b611f5d565b611f50838a8a85612455565b611f5a9086612ecd565b94505b6000611f698b8b611c8b565b905060008a5b8161202757611f886001600160601b0382168c8561264c565b6000196001600160601b03821601611fa35760019150611f6f565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120189190613022565b50949550611f6f945050505050565b6001860154604080516001600160601b038f168152602081018e9052908101919091526001600160a01b038e16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2506000955050505050505b9450945094915050565b61209f6129a0565b6120bc57604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561236e576000818152600e60205260409020600281015460ff16156123215760006121188587611821565b9050600081836001015461212c9190612eba565b6001600160a01b0387166000908152600d60205260409020600181015491965086925090821061215e57806001015495505b858160010160008282546121729190612eba565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a38260000361231d5780545b801561231b576001600160601b038916826121e7600184612eba565b815481106121f7576121f7612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603612309578154829061223390600190612eba565b8154811061224357612243612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122779084612eba565b8154811061228757612287612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122d3576122d3613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561231b565b806123138161300b565b9150506121cb565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561238f5760006123a3565b856001015486600201546123a39190612eba565b90506123af8184612ecd565b8410156123bd5760006123d2565b806123c88486612eba565b6123d29190612eba565b915082600003612417578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124295783612444565b8383876001015461243a9190612eba565b6124449190612ecd565b866001018190555050949350505050565b60028401546000906124678484612eba565b6124719190612ecd565b85600101541061248c576124858383612eba565b90506124b2565b84600201548560010154106124b257846002015485600101546124af9190612eba565b90505b8260000361260f5784545b801561260d576001600160601b038516866124d9600184612eba565b815481106124e9576124e9612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036125fb578554869061252590600190612eba565b8154811061253557612535612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125699084612eba565b8154811061257957612579612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806125c5576125c5613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561260d565b806126058161300b565b9150506124bd565b505b8185600101541015612621578261263c565b828286600101546126329190612eba565b61263c9190612ecd565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128195783156128145760018201546000036127675750600281018054600180820183556000928352602090922081018590559081148015906126c6575081546126ba600183612eba565b6126c49190612f69565b155b156127625781546000906126da90836130ad565b60008181526004850160205260408120549192506126f9846001612ecd565b90508460020185600201848154811061271457612714612f3d565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6127e2565b60018083018054909161277991612eba565b8154811061278957612789612f3d565b90600052602060002001549050816001018054806127a9576127a9613097565b60019003818190600052602060002001600090559055838260020182815481106127d5576127d5612f3d565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561281485826001876129ba565b612999565b836000036128b757600082600201828154811061283857612838612f3d565b90600052602060002001549050600083600201838154811061285c5761285c612f3d565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556128b19087908490846129ba565b50612999565b8160020181815481106128cc576128cc612f3d565b90600052602060002001548414612999576000848360020183815481106128f5576128f5612f3d565b90600052602060002001541115905060008161293b578584600201848154811061292157612921612f3d565b90600052602060002001546129369190612eba565b612966565b83600201838154811061295057612950612f3d565b9060005260206000200154866129669190612eba565b90508584600201848154811061297e5761297e612f3d565b600091825260209091200155612996878484846129ba565b50505b5050505050565b60006129aa611c07565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612a6f5781546129dd600183612eba565b6129e791906130ad565b905083612a1e5782826002018281548110612a0457612a04612f3d565b9060005260206000200154612a199190612eba565b612a49565b82826002018281548110612a3457612a34612f3d565b9060005260206000200154612a499190612ecd565b826002018281548110612a5e57612a5e612f3d565b6000918252602090912001556129ca565b505050505050565b6001600160a01b038116811461033557600080fd5b60008060408385031215612a9f57600080fd5b8235612aaa81612a77565b946020939093013593505050565b600060208284031215612aca57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612af857600080fd5b81356001600160401b0380821115612b1257612b12612ad1565b604051601f8301601f19908116603f01168101908282118183101715612b3a57612b3a612ad1565b81604052838152866020858801011115612b5357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612b8657600080fd5b8235915060208301356001600160401b03811115612ba357600080fd5b612baf85828601612ae7565b9150509250929050565b600080600060608486031215612bce57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612bf857600080fd5b8235612c0381612a77565b915060208301356001600160401b03811115612ba357600080fd5b600060208284031215612c3057600080fd5b81356111d581612a77565b6020808252825182820181905260009190848201906040850190845b81811015612c7c5783516001600160601b031683529284019291840191600101612c57565b50909695505050505050565b60008060008060008060c08789031215612ca157600080fd5b8635612cac81612a77565b95506020870135612cbc81612a77565b945060408701359350606087013592506080870135612cda81612a77565b8092505060a087013590509295509295509295565b60005b83811015612d0a578181015183820152602001612cf2565b50506000910152565b6020815260008251806020840152612d32816040850160208701612cef565b601f01601f19169190910160400192915050565b60008060408385031215612d5957600080fd5b50508035926020909101359150565b6001600160601b038116811461033557600080fd5b60008060408385031215612d9057600080fd5b8235612d9b81612a77565b91506020830135612dab81612d68565b809150509250929050565b801515811461033557600080fd5b60008060008060808587031215612dda57600080fd5b8435612de581612a77565b93506020850135612df581612d68565b9250604085013591506060850135612e0c81612db6565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160098310612e4b57612e4b612e17565b826040830152949350505050565b6020810160038310612e6d57612e6d612e17565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561175157611751612ea4565b8082018082111561175157611751612ea4565b600060208284031215612ef257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500690565b808202811582820484141761175157611751612ea4565b600060018201612fa657612fa6612ea4565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251613001818460208701612cef565b9190910192915050565b60008161301a5761301a612ea4565b506000190190565b600080600080600080600060e0888a03121561303d57600080fd5b875161304881612d68565b602089015190975061305981612db6565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161308781612db6565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b6000826130bc576130bc612f53565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205df31a379a3344b7416d4590b65130aa7a2e941ece6783087fde76eddcdc9dd064736f6c63430008180033", "devdoc": { "details": "A factory of trees that keeps track of staked values for sortition.", "errors": { @@ -998,6 +1011,11 @@ "details": "The contract is already initialized." } ], + "InvalidImplementation(address)": [ + { + "details": "The `implementation` is not UUPS-compliant" + } + ], "NotInitializing()": [ { "details": "The contract is not initializing." @@ -1018,7 +1036,44 @@ "Initialized(uint64)": { "details": "Triggered when the contract has been initialized or reinitialized." }, + "StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_courtID": "The ID of the court." + } + }, + "StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens withdrawn.", + "_courtID": "The ID of the court." + } + }, + "StakeDelayedNotTransferred(address,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_courtID": "The ID of the court." + } + }, + "StakeLocked(address,uint256,bool)": { + "params": { + "_address": "The address of the juror.", + "_relativeAmount": "The amount of tokens locked.", + "_unlock": "Whether the stake is locked or unlocked." + } + }, + "StakeSet(address,uint256,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_amountAllCourts": "The amount of tokens staked in all courts.", + "_courtID": "The ID of the court." + } + }, "Upgraded(address)": { + "details": "Emitted when the `implementation` has been successfully upgraded.", "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." } @@ -1026,6 +1081,12 @@ }, "kind": "dev", "methods": { + "changeGovernor(address)": { + "details": "Changes the governor of the contract.", + "params": { + "_governor": "The new governor." + } + }, "changeMaxDrawingTime(uint256)": { "details": "Changes the `maxDrawingTime` storage variable.", "params": { @@ -1046,7 +1107,7 @@ } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createTree(bytes32,bytes)": { "details": "Create a sortition sum tree at the specified key.", @@ -1082,6 +1143,7 @@ "details": "Initializer (constructor equivalent for upgradable contracts).", "params": { "_core": "The KlerosCore.", + "_governor": "The governor.", "_maxDrawingTime": "Time after which the drawing phase can be switched", "_minStakingTime": "Minimal time to stake", "_rng": "The random number generator.", @@ -1114,7 +1176,7 @@ "returns": { "pnkDeposit": "The amount of PNK to be deposited.", "pnkWithdrawal": "The amount of PNK to be withdrawn.", - "succeeded": "True if the call succeeded, false otherwise." + "stakingResult": "The result of the staking operation." } }, "stakeOf(address,uint96)": { @@ -1145,6 +1207,15 @@ } } }, + "stateVariables": { + "version": { + "details": "Returns the version of the implementation.", + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, "title": "SortitionModule", "version": 1 }, @@ -1154,16 +1225,23 @@ { "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." + "StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)": { + "notice": "Emitted when a juror's stake is delayed and tokens are already deposited." + }, + "StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)": { + "notice": "Emitted when a juror's stake is delayed and tokens are already withdrawn." + }, + "StakeDelayedNotTransferred(address,uint256,uint256)": { + "notice": "Emitted when a juror's stake is delayed and tokens are not transferred yet." + }, + "StakeLocked(address,uint256,bool)": { + "notice": "Emitted when a juror's stake is locked." + }, + "StakeSet(address,uint256,uint256,uint256)": { + "notice": "Emitted when a juror stakes in a court." } }, "kind": "user", @@ -1173,7 +1251,7 @@ "storageLayout": { "storage": [ { - "astId": 3582, + "astId": 13901, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "governor", "offset": 0, @@ -1181,23 +1259,23 @@ "type": "t_address" }, { - "astId": 3585, + "astId": 13904, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)3519" + "type": "t_contract(KlerosCore)8475" }, { - "astId": 3588, + "astId": 13907, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "phase", "offset": 20, "slot": "1", - "type": "t_enum(Phase)5779" + "type": "t_enum(Phase)23160" }, { - "astId": 3590, + "astId": 13909, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "minStakingTime", "offset": 0, @@ -1205,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 3592, + "astId": 13911, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "maxDrawingTime", "offset": 0, @@ -1213,7 +1291,7 @@ "type": "t_uint256" }, { - "astId": 3594, + "astId": 13913, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "lastPhaseChange", "offset": 0, @@ -1221,7 +1299,7 @@ "type": "t_uint256" }, { - "astId": 3596, + "astId": 13915, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "randomNumberRequestBlock", "offset": 0, @@ -1229,7 +1307,7 @@ "type": "t_uint256" }, { - "astId": 3598, + "astId": 13917, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "disputesWithoutJurors", "offset": 0, @@ -1237,15 +1315,15 @@ "type": "t_uint256" }, { - "astId": 3601, + "astId": 13920, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "rng", "offset": 0, "slot": "7", - "type": "t_contract(RNG)6482" + "type": "t_contract(RNG)35312" }, { - "astId": 3603, + "astId": 13922, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "randomNumber", "offset": 0, @@ -1253,7 +1331,7 @@ "type": "t_uint256" }, { - "astId": 3605, + "astId": 13924, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "rngLookahead", "offset": 0, @@ -1261,7 +1339,7 @@ "type": "t_uint256" }, { - "astId": 3607, + "astId": 13926, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "delayedStakeWriteIndex", "offset": 0, @@ -1269,7 +1347,7 @@ "type": "t_uint256" }, { - "astId": 3609, + "astId": 13928, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "delayedStakeReadIndex", "offset": 0, @@ -1277,31 +1355,31 @@ "type": "t_uint256" }, { - "astId": 3614, + "astId": 13933, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "sortitionSumTrees", "offset": 0, "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)3557_storage)" + "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)13882_storage)" }, { - "astId": 3619, + "astId": 13938, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "jurors", "offset": 0, "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)3574_storage)" + "type": "t_mapping(t_address,t_struct(Juror)13899_storage)" }, { - "astId": 3624, + "astId": 13943, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "delayedStakes", "offset": 0, "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)3566_storage)" + "type": "t_mapping(t_uint256,t_struct(DelayedStake)13891_storage)" }, { - "astId": 3630, + "astId": 13949, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "latestDelayedStakeIndex", "offset": 0, @@ -1337,17 +1415,17 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(KlerosCore)3519": { + "t_contract(KlerosCore)8475": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" }, - "t_contract(RNG)6482": { + "t_contract(RNG)35312": { "encoding": "inplace", "label": "contract RNG", "numberOfBytes": "20" }, - "t_enum(Phase)5779": { + "t_enum(Phase)23160": { "encoding": "inplace", "label": "enum ISortitionModule.Phase", "numberOfBytes": "1" @@ -1359,19 +1437,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_uint96,t_uint256)" }, - "t_mapping(t_address,t_struct(Juror)3574_storage)": { + "t_mapping(t_address,t_struct(Juror)13899_storage)": { "encoding": "mapping", "key": "t_address", - "label": "mapping(address => struct SortitionModule.Juror)", + "label": "mapping(address => struct SortitionModuleBase.Juror)", "numberOfBytes": "32", - "value": "t_struct(Juror)3574_storage" + "value": "t_struct(Juror)13899_storage" }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)3557_storage)": { + "t_mapping(t_bytes32,t_struct(SortitionSumTree)13882_storage)": { "encoding": "mapping", "key": "t_bytes32", - "label": "mapping(bytes32 => struct SortitionModule.SortitionSumTree)", + "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)3557_storage" + "value": "t_struct(SortitionSumTree)13882_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -1387,12 +1465,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(DelayedStake)3566_storage)": { + "t_mapping(t_uint256,t_struct(DelayedStake)13891_storage)": { "encoding": "mapping", "key": "t_uint256", - "label": "mapping(uint256 => struct SortitionModule.DelayedStake)", + "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", "numberOfBytes": "32", - "value": "t_struct(DelayedStake)3566_storage" + "value": "t_struct(DelayedStake)13891_storage" }, "t_mapping(t_uint96,t_uint256)": { "encoding": "mapping", @@ -1401,12 +1479,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(DelayedStake)3566_storage": { + "t_struct(DelayedStake)13891_storage": { "encoding": "inplace", - "label": "struct SortitionModule.DelayedStake", + "label": "struct SortitionModuleBase.DelayedStake", "members": [ { - "astId": 3559, + "astId": 13884, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "account", "offset": 0, @@ -1414,7 +1492,7 @@ "type": "t_address" }, { - "astId": 3561, + "astId": 13886, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "courtID", "offset": 20, @@ -1422,7 +1500,7 @@ "type": "t_uint96" }, { - "astId": 3563, + "astId": 13888, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "stake", "offset": 0, @@ -1430,7 +1508,7 @@ "type": "t_uint256" }, { - "astId": 3565, + "astId": 13890, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "alreadyTransferred", "offset": 0, @@ -1440,12 +1518,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Juror)3574_storage": { + "t_struct(Juror)13899_storage": { "encoding": "inplace", - "label": "struct SortitionModule.Juror", + "label": "struct SortitionModuleBase.Juror", "members": [ { - "astId": 3569, + "astId": 13894, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "courtIDs", "offset": 0, @@ -1453,7 +1531,7 @@ "type": "t_array(t_uint96)dyn_storage" }, { - "astId": 3571, + "astId": 13896, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "stakedPnk", "offset": 0, @@ -1461,7 +1539,7 @@ "type": "t_uint256" }, { - "astId": 3573, + "astId": 13898, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "lockedPnk", "offset": 0, @@ -1471,12 +1549,12 @@ ], "numberOfBytes": "96" }, - "t_struct(SortitionSumTree)3557_storage": { + "t_struct(SortitionSumTree)13882_storage": { "encoding": "inplace", - "label": "struct SortitionModule.SortitionSumTree", + "label": "struct SortitionModuleBase.SortitionSumTree", "members": [ { - "astId": 3542, + "astId": 13867, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "K", "offset": 0, @@ -1484,7 +1562,7 @@ "type": "t_uint256" }, { - "astId": 3545, + "astId": 13870, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "stack", "offset": 0, @@ -1492,7 +1570,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 3548, + "astId": 13873, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "nodes", "offset": 0, @@ -1500,7 +1578,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 3552, + "astId": 13877, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "IDsToNodeIndexes", "offset": 0, @@ -1508,7 +1586,7 @@ "type": "t_mapping(t_bytes32,t_uint256)" }, { - "astId": 3556, + "astId": 13881, "contract": "src/arbitration/SortitionModule.sol:SortitionModule", "label": "nodeIndexesToIDs", "offset": 0, From 4908b6691f43e60dd2022d27e3386ab8834558b0 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Sat, 5 Apr 2025 11:22:11 +0100 Subject: [PATCH 04/17] chore: core subgraph v0.14.0 deployed to devnet and testnet --- subgraph/core/subgraph.yaml | 38 ++++++++++++++++++------------------- subgraph/package.json | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index 0dff6a838..ed0a0ba18 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -8,9 +8,9 @@ dataSources: name: KlerosCore network: arbitrum-sepolia source: - address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8" + address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479" abi: KlerosCore - startBlock: 3638878 + startBlock: 95250346 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -28,11 +28,11 @@ dataSources: - Counter abis: - name: SortitionModule - file: ../../contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json + file: ../../contracts/deployments/arbitrumSepolia/SortitionModule.json - name: DisputeKitClassic - file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json + file: ../../contracts/deployments/arbitrumSepolia/DisputeKitClassic.json - name: KlerosCore - file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json + file: ../../contracts/deployments/arbitrumSepolia/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -43,7 +43,7 @@ dataSources: handler: handleDraw - event: NewPeriod(indexed uint256,uint8) handler: handleNewPeriod - - event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[]) + - event: CourtCreated(indexed uint96,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[]) handler: handleCourtCreated - event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4]) handler: handleCourtModified @@ -64,9 +64,9 @@ dataSources: name: PolicyRegistry network: arbitrum-sepolia source: - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da" + address: "0x2668c46A14af8997417138B064ca1bEB70769585" abi: PolicyRegistry - startBlock: 3084568 + startBlock: 95247698 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -75,7 +75,7 @@ dataSources: - Court abis: - name: PolicyRegistry - file: ../../contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json + file: ../../contracts/deployments/arbitrumSepolia/PolicyRegistry.json eventHandlers: - event: PolicyUpdate(indexed uint256,string,string) handler: handlePolicyUpdate @@ -84,9 +84,9 @@ dataSources: name: DisputeKitClassic network: arbitrum-sepolia source: - address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b" + address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94" abi: DisputeKitClassic - startBlock: 3638835 + startBlock: 95247789 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -98,9 +98,9 @@ dataSources: - ClassicContribution abis: - name: DisputeKitClassic - file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json + file: ../../contracts/deployments/arbitrumSepolia/DisputeKitClassic.json - name: KlerosCore - file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json + file: ../../contracts/deployments/arbitrumSepolia/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation @@ -119,9 +119,9 @@ dataSources: name: EvidenceModule network: arbitrum-sepolia source: - address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09" + address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397" abi: EvidenceModule - startBlock: 3638735 + startBlock: 95247733 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -131,7 +131,7 @@ dataSources: - ClassicEvidence abis: - name: EvidenceModule - file: ../../contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json + file: ../../contracts/deployments/arbitrumSepolia/EvidenceModule.json eventHandlers: - event: Evidence(indexed uint256,indexed address,string) handler: handleEvidenceEvent @@ -140,9 +140,9 @@ dataSources: name: SortitionModule network: arbitrum-sepolia source: - address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C" + address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD" abi: SortitionModule - startBlock: 3638850 + startBlock: 95250316 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -151,7 +151,7 @@ dataSources: - JurorTokensPerCourt abis: - name: SortitionModule - file: ../../contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json + file: ../../contracts/deployments/arbitrumSepolia/SortitionModule.json eventHandlers: - event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256) handler: handleStakeDelayedAlreadyTransferredDeposited diff --git a/subgraph/package.json b/subgraph/package.json index c44d470c2..9741db307 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/kleros-v2-subgraph", - "version": "0.13.0", + "version": "0.14.0", "drtVersion": "0.11.0", "license": "MIT", "scripts": { From 8b006c1ff1cccdc5cc2167a6fd7e66eb257a8242 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Sat, 5 Apr 2025 11:28:08 +0100 Subject: [PATCH 05/17] chore: release contracts v0.8.0 --- contracts/deployments/arbitrum.ts | 12606 +++++++--- contracts/deployments/arbitrumSepolia.ts | 6795 ++++-- .../deployments/arbitrumSepoliaDevnet.ts | 19293 +++++++++------- contracts/deployments/devnet.viem.ts | 2145 +- contracts/deployments/mainnet.viem.ts | 8216 +++++-- contracts/deployments/testnet.viem.ts | 1785 +- contracts/package.json | 2 +- 7 files changed, 35571 insertions(+), 15271 deletions(-) diff --git a/contracts/deployments/arbitrum.ts b/contracts/deployments/arbitrum.ts index 4fbccb430..66a2a7679 100644 --- a/contracts/deployments/arbitrum.ts +++ b/contracts/deployments/arbitrum.ts @@ -2,50 +2,159 @@ export default { name: "arbitrum", chainId: "42161", contracts: { - DAI: { - address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", + BlockHashRNG: { + address: "0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B", abi: [ { - inputs: [], + inputs: [ + { + internalType: "uint256", + name: "block", + type: "uint256", + }, + ], + name: "randomNumbers", + outputs: [ + { + internalType: "uint256", + name: "number", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_block", + type: "uint256", + }, + ], + name: "receiveRandomness", + outputs: [ + { + internalType: "uint256", + name: "randomNumber", + type: "uint256", + }, + ], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, + internalType: "uint256", + name: "_block", + type: "uint256", + }, + ], + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + }, + ChainlinkRNG: { + address: "0x897d83a7d5F23555eFA15e1BE297d5503522cbA3", + abi: [ + { + inputs: [ + { internalType: "address", - name: "owner", + name: "_governor", type: "address", }, { - indexed: true, internalType: "address", - name: "spender", + name: "_sortitionModule", type: "address", }, { - indexed: false, + internalType: "address", + name: "_vrfCoordinator", + type: "address", + }, + { + internalType: "bytes32", + name: "_keyHash", + type: "bytes32", + }, + { internalType: "uint256", - name: "value", + name: "_subscriptionId", type: "uint256", }, + { + internalType: "uint16", + name: "_requestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "_callbackGasLimit", + type: "uint32", + }, ], - name: "Approval", - type: "event", + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "have", + type: "address", + }, + { + internalType: "address", + name: "want", + type: "address", + }, + ], + name: "OnlyCoordinatorCanFulfill", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "have", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "coordinator", + type: "address", + }, + ], + name: "OnlyOwnerOrCoordinator", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", }, { anonymous: false, inputs: [ { - indexed: true, + indexed: false, internalType: "address", - name: "usr", + name: "vrfCoordinator", type: "address", }, ], - name: "Deny", + name: "CoordinatorSet", type: "event", }, { @@ -54,11 +163,17 @@ export default { { indexed: true, internalType: "address", - name: "usr", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", type: "address", }, ], - name: "Rely", + name: "OwnershipTransferRequested", type: "event", }, { @@ -76,37 +191,57 @@ export default { name: "to", type: "address", }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", + }, { indexed: false, internalType: "uint256", - name: "value", + name: "randomWord", type: "uint256", }, ], - name: "Transfer", + name: "RequestFulfilled", type: "event", }, { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", }, ], - stateMutability: "view", + name: "RequestSent", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "PERMIT_TYPEHASH", + name: "callbackGasLimit", outputs: [ { - internalType: "bytes32", + internalType: "uint32", name: "", - type: "bytes32", + type: "uint32", }, ], stateMutability: "view", @@ -115,48 +250,52 @@ export default { { inputs: [ { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "uint32", + name: "_callbackGasLimit", + type: "uint32", }, ], - stateMutability: "view", + name: "changeCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "spender", + name: "_governor", type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "bytes32", + name: "_keyHash", + type: "bytes32", }, ], - name: "approve", - outputs: [ + name: "changeKeyHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint16", + name: "_requestConfirmations", + type: "uint16", }, ], + name: "changeRequestConfirmations", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -164,96 +303,106 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "_sortitionModule", type: "address", }, ], - name: "balanceOf", - outputs: [ + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "", + name: "_subscriptionId", type: "uint256", }, ], - stateMutability: "view", + name: "changeSubscriptionId", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "from", + name: "_vrfCoordinator", type: "address", }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, ], - name: "burn", + name: "changeVrfCoordinator", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "decimals", + name: "governor", outputs: [ { - internalType: "uint8", + internalType: "address", name: "", - type: "uint8", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "keyHash", + outputs: [ { - internalType: "address", - name: "spender", - type: "address", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastRequestId", + outputs: [ { internalType: "uint256", - name: "subtractedValue", + name: "", type: "uint256", }, ], - name: "decreaseAllowance", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", outputs: [ { - internalType: "bool", + internalType: "address", name: "", - type: "bool", + type: "address", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "usr", - type: "address", + internalType: "uint256", + name: "requestId", + type: "uint256", }, ], - name: "deny", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "deploymentChainId", + name: "randomNumbers", outputs: [ { internalType: "uint256", - name: "", + name: "number", type: "uint256", }, ], @@ -262,54 +411,49 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, { internalType: "uint256", - name: "addedValue", + name: "requestId", type: "uint256", }, - ], - name: "increaseAllowance", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256[]", + name: "randomWords", + type: "uint256[]", }, ], + name: "rawFulfillRandomWords", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "to", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, + ], + name: "receiveRandomness", + outputs: [ { internalType: "uint256", - name: "value", + name: "randomNumber", type: "uint256", }, ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "name", + name: "requestConfirmations", outputs: [ { - internalType: "string", + internalType: "uint16", name: "", - type: "string", + type: "uint16", }, ], stateMutability: "view", @@ -317,87 +461,51 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "nonces", - outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - stateMutability: "view", + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, + inputs: [], + name: "s_vrfCoordinator", + outputs: [ { - internalType: "address", - name: "spender", + internalType: "contract IVRFCoordinatorV2Plus", + name: "", type: "address", }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "usr", + name: "_vrfCoordinator", type: "address", }, ], - name: "rely", + name: "setCoordinator", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "symbol", + name: "sortitionModule", outputs: [ { - internalType: "string", + internalType: "address", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", @@ -405,7 +513,7 @@ export default { }, { inputs: [], - name: "totalSupply", + name: "subscriptionId", outputs: [ { internalType: "uint256", @@ -423,255 +531,404 @@ export default { name: "to", type: "address", }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, ], + name: "transferOwnership", + outputs: [], stateMutability: "nonpayable", type: "function", }, + ], + }, + ChainlinkVRFCoordinator: { + address: "0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e", + abi: [ { inputs: [ { internalType: "address", - name: "from", + name: "blockhashStore", type: "address", }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ { - internalType: "address", - name: "to", - type: "address", + internalType: "uint256", + name: "internalBalance", + type: "uint256", }, { internalType: "uint256", - name: "value", + name: "externalBalance", type: "uint256", }, ], - name: "transferFrom", - outputs: [ + name: "BalanceInvariantViolated", + type: "error", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "blockNum", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "function", + name: "BlockhashNotInStore", + type: "error", }, { - inputs: [], - name: "version", - outputs: [ + inputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "address", + name: "coordinatorAddress", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "CoordinatorAlreadyRegistered", + type: "error", }, { inputs: [ { internalType: "address", - name: "", + name: "coordinatorAddress", type: "address", }, ], - name: "wards", - outputs: [ + name: "CoordinatorNotRegistered", + type: "error", + }, + { + inputs: [], + name: "FailedToSendNative", + type: "error", + }, + { + inputs: [], + name: "FailedToTransferLink", + type: "error", + }, + { + inputs: [ + { + internalType: "uint32", + name: "have", + type: "uint32", + }, + { + internalType: "uint32", + name: "want", + type: "uint32", + }, + ], + name: "GasLimitTooBig", + type: "error", + }, + { + inputs: [ { internalType: "uint256", - name: "", + name: "gasPrice", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxGas", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "GasPriceExceeded", + type: "error", }, - ], - }, - DisputeKitClassicNeo: { - address: "0x70B464be85A547144C72485eBa2577E5D3A45421", - abi: [ { - stateMutability: "payable", - type: "fallback", + inputs: [], + name: "IncorrectCommitment", + type: "error", }, { - stateMutability: "payable", - type: "receive", + inputs: [], + name: "IndexOutOfRange", + type: "error", }, { inputs: [], - name: "AlreadyInitialized", + name: "InsufficientBalance", type: "error", }, { inputs: [], - name: "FailedDelegateCall", + name: "InvalidCalldata", type: "error", }, { inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, { internalType: "address", - name: "implementation", + name: "consumer", type: "address", }, ], - name: "InvalidImplementation", + name: "InvalidConsumer", type: "error", }, { inputs: [], - name: "NotInitializing", + name: "InvalidExtraArgsTag", type: "error", }, { - inputs: [], - name: "UUPSUnauthorizedCallContext", + inputs: [ + { + internalType: "int256", + name: "linkWei", + type: "int256", + }, + ], + name: "InvalidLinkWeiPrice", type: "error", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint8", + name: "premiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "max", + type: "uint8", }, ], - name: "UUPSUnsupportedProxiableUUID", + name: "InvalidPremiumPercentage", type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint16", + name: "have", + type: "uint16", }, { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "uint16", + name: "min", + type: "uint16", }, { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint16", + name: "max", + type: "uint16", }, ], - name: "ChoiceFunded", - type: "event", + name: "InvalidRequestConfirmations", + type: "error", + }, + { + inputs: [], + name: "InvalidSubscription", + type: "error", + }, + { + inputs: [], + name: "LinkAlreadySet", + type: "error", + }, + { + inputs: [ + { + internalType: "uint32", + name: "flatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "flatFeeNativePPM", + type: "uint32", + }, + ], + name: "LinkDiscountTooHigh", + type: "error", + }, + { + inputs: [], + name: "LinkNotSet", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "have", type: "uint256", }, { - indexed: true, + internalType: "uint32", + name: "max", + type: "uint32", + }, + ], + name: "MsgDataTooBig", + type: "error", + }, + { + inputs: [ + { internalType: "address", - name: "_juror", + name: "proposedOwner", type: "address", }, + ], + name: "MustBeRequestedOwner", + type: "error", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "MustBeSubOwner", + type: "error", + }, + { + inputs: [], + name: "NoCorrespondingRequest", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", }, + ], + name: "NoSuchProvingKey", + type: "error", + }, + { + inputs: [ + { + internalType: "uint32", + name: "have", + type: "uint32", + }, + { + internalType: "uint32", + name: "want", + type: "uint32", + }, + ], + name: "NumWordsTooBig", + type: "error", + }, + { + inputs: [], + name: "OnlyCallableFromLink", + type: "error", + }, + { + inputs: [], + name: "PaymentTooLarge", + type: "error", + }, + { + inputs: [], + name: "PendingRequestExists", + type: "error", + }, + { + inputs: [ { - indexed: false, internalType: "bytes32", - name: "_commit", + name: "keyHash", type: "bytes32", }, ], - name: "CommitCast", - type: "event", + name: "ProvingKeyAlreadyRegistered", + type: "error", + }, + { + inputs: [], + name: "Reentrant", + type: "error", + }, + { + inputs: [], + name: "TooManyConsumers", + type: "error", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", }, { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + indexed: false, + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", }, { indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", }, { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", + indexed: false, + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", }, { indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", }, - ], - name: "Contribution", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", }, { indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", }, { indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", }, ], - name: "DisputeCreation", + name: "ConfigSet", type: "event", }, { @@ -679,434 +936,558 @@ export default { inputs: [ { indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "address", + name: "coordinatorAddress", + type: "address", }, ], - name: "Initialized", + name: "CoordinatorDeregistered", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, + indexed: false, internalType: "address", - name: "newImplementation", + name: "coordinatorAddress", type: "address", }, ], - name: "Upgraded", + name: "CoordinatorRegistered", 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", + name: "requestId", type: "uint256", }, { indexed: false, - internalType: "string", - name: "_justification", - type: "string", + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", }, ], - name: "VoteCast", + name: "FallbackWeiPerUnitLinkUsed", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, { indexed: false, internalType: "uint256", - name: "_choice", + name: "amount", type: "uint256", }, + ], + name: "FundsRecovered", + type: "event", + }, + { + anonymous: false, + inputs: [ { - indexed: true, + indexed: false, internalType: "address", - name: "_contributor", + name: "newCoordinator", type: "address", }, { indexed: false, internalType: "uint256", - name: "_amount", + name: "subId", type: "uint256", }, ], - name: "Withdrawal", + name: "MigrationCompleted", type: "event", }, { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "amount", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "NativeFundsRecovered", + type: "event", }, { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "OwnershipTransferRequested", + type: "event", }, { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "OwnershipTransferred", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "maxGas", + type: "uint64", }, ], - name: "areCommitsAllCast", - outputs: [ + name: "ProvingKeyDeregistered", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "maxGas", + type: "uint64", }, ], - stateMutability: "view", - type: "function", + name: "ProvingKeyRegistered", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "requestId", type: "uint256", }, - ], - name: "areVotesAllCast", - outputs: [ { + indexed: false, + internalType: "uint256", + name: "outputSeed", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint96", + name: "payment", + type: "uint96", + }, + { + indexed: false, internalType: "bool", - name: "", + name: "nativePayment", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "success", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "onlyPremium", type: "bool", }, ], - stateMutability: "view", - type: "function", + name: "RandomWordsFulfilled", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + indexed: false, internalType: "uint256", - name: "_coreDisputeID", + name: "requestId", type: "uint256", }, { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + indexed: false, + internalType: "uint256", + name: "preSeed", + type: "uint256", }, { - internalType: "bytes32", - name: "_commit", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + indexed: false, + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + indexed: false, + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", }, ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "RandomWordsRequested", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, { + indexed: false, internalType: "uint256", - name: "_choice", + name: "amountLink", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_salt", + name: "amountNative", type: "uint256", }, - { - internalType: "string", - name: "_justification", - type: "string", - }, ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "SubscriptionCanceled", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, internalType: "address", - name: "_core", + name: "consumer", type: "address", }, ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "SubscriptionConsumerAdded", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address payable", - name: "_governor", - type: "address", + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ { - internalType: "contract KlerosCore", - name: "", + indexed: false, + internalType: "address", + name: "consumer", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionConsumerRemoved", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "subId", type: "uint256", }, - ], - name: "coreDisputeIDToLocal", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "address", + name: "owner", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_numberOfChoices", + name: "oldBalance", type: "uint256", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { + indexed: false, internalType: "uint256", - name: "_nbVotes", + name: "newBalance", type: "uint256", }, ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "SubscriptionFunded", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, - ], - name: "currentRuling", - outputs: [ { + indexed: false, internalType: "uint256", - name: "ruling", + name: "oldNativeBalance", type: "uint256", }, { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", + indexed: false, + internalType: "uint256", + name: "newNativeBalance", + type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionFundedWithNative", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "subId", type: "uint256", }, + { + indexed: false, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, ], - name: "disputes", - outputs: [ + name: "SubscriptionOwnerTransferRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "numberOfChoices", + name: "subId", type: "uint256", }, { - internalType: "bool", - name: "jumped", - type: "bool", + indexed: false, + internalType: "address", + name: "from", + type: "address", }, { - internalType: "bytes", - name: "extraData", - type: "bytes", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionOwnerTransferred", + type: "event", }, { - inputs: [ + inputs: [], + name: "BLOCKHASH_STORE", + outputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "contract BlockhashStoreInterface", + name: "", + type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LINK", + outputs: [ { - internalType: "uint256", - name: "_nonce", - type: "uint256", + internalType: "contract LinkTokenInterface", + name: "", + type: "address", }, ], - name: "draw", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LINK_NATIVE_FEED", outputs: [ { - internalType: "address", - name: "drawnAddress", + internalType: "contract AggregatorV3Interface", + name: "", type: "address", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "MAX_CONSUMERS", + outputs: [ { - internalType: "address", - name: "_destination", - type: "address", + internalType: "uint16", + name: "", + type: "uint16", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_NUM_WORDS", + outputs: [ { - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "uint32", + name: "", + type: "uint32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_REQUEST_CONFIRMATIONS", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint16", + name: "", + type: "uint16", }, ], - name: "executeGovernorProposal", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function", @@ -1115,96 +1496,229 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, + ], + name: "acceptSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "_choice", + name: "subId", type: "uint256", }, + { + internalType: "address", + name: "consumer", + type: "address", + }, ], - name: "fundAppeal", + name: "addConsumer", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, ], - name: "getCoherentCount", + name: "cancelSubscription", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "createSubscription", outputs: [ { internalType: "uint256", - name: "", + name: "subId", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "target", + type: "address", }, + ], + name: "deregisterMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "uint256[2]", + name: "publicProvingKey", + type: "uint256[2]", }, + ], + name: "deregisterProvingKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_voteID", - type: "uint256", + components: [ + { + internalType: "uint256[2]", + name: "pk", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "gamma", + type: "uint256[2]", + }, + { + internalType: "uint256", + name: "c", + type: "uint256", + }, + { + internalType: "uint256", + name: "s", + type: "uint256", + }, + { + internalType: "uint256", + name: "seed", + type: "uint256", + }, + { + internalType: "address", + name: "uWitness", + type: "address", + }, + { + internalType: "uint256[2]", + name: "cGammaWitness", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "sHashWitness", + type: "uint256[2]", + }, + { + internalType: "uint256", + name: "zInv", + type: "uint256", + }, + ], + internalType: "struct VRF.Proof", + name: "proof", + type: "tuple", }, { - internalType: "uint256", - name: "", - type: "uint256", + components: [ + { + internalType: "uint64", + name: "blockNum", + type: "uint64", + }, + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + ], + internalType: "struct VRFTypes.RequestCommitmentV2Plus", + name: "rc", + type: "tuple", }, { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bool", + name: "onlyPremium", + type: "bool", }, ], - name: "getDegreeOfCoherence", + name: "fulfillRandomWords", outputs: [ + { + internalType: "uint96", + name: "payment", + type: "uint96", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "", + name: "subId", type: "uint256", }, ], - stateMutability: "view", + name: "fundSubscriptionWithNative", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "startIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxCount", type: "uint256", }, ], - name: "getFundedChoices", + name: "getActiveSubscriptionIds", outputs: [ { internalType: "uint256[]", - name: "fundedChoices", + name: "ids", type: "uint256[]", }, ], @@ -1215,51 +1729,36 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", + name: "subId", type: "uint256", }, ], - name: "getRoundInfo", + name: "getSubscription", outputs: [ { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", + internalType: "uint96", + name: "balance", + type: "uint96", }, { - internalType: "uint256", - name: "totalVoted", - type: "uint256", + internalType: "uint96", + name: "nativeBalance", + type: "uint96", }, { - internalType: "uint256", - name: "totalCommited", - type: "uint256", + internalType: "uint64", + name: "reqCount", + type: "uint64", }, { - internalType: "uint256", - name: "nbVoters", - type: "uint256", + internalType: "address", + name: "subOwner", + type: "address", }, { - internalType: "uint256", - name: "choiceCount", - type: "uint256", + internalType: "address[]", + name: "consumers", + type: "address[]", }, ], stateMutability: "view", @@ -1268,50 +1767,66 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint256[2]", + name: "publicKey", + type: "uint256[2]", }, + ], + name: "hashOfKey", + outputs: [ { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "_voteID", + name: "subId", type: "uint256", }, - ], - name: "getVoteInfo", - outputs: [ { internalType: "address", - name: "account", + name: "newCoordinator", type: "address", }, + ], + name: "migrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bytes32", - name: "commit", - type: "bytes32", + internalType: "address", + name: "", + type: "address", }, { internalType: "uint256", - name: "choice", + name: "amount", type: "uint256", }, { - internalType: "bool", - name: "voted", - type: "bool", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - stateMutability: "view", + name: "onTokenTransfer", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "owner", outputs: [ { internalType: "address", @@ -1325,17 +1840,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", + internalType: "uint256", + name: "subId", + type: "uint256", }, ], - name: "initialize", + name: "ownerCancelSubscription", outputs: [], stateMutability: "nonpayable", type: "function", @@ -1344,21 +1854,11 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", + name: "subId", type: "uint256", }, ], - name: "isVoteActive", + name: "pendingRequestExists", outputs: [ { internalType: "bool", @@ -1370,64 +1870,125 @@ export default { type: "function", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + inputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "newImplementation", + internalType: "address payable", + name: "to", type: "address", }, + ], + name: "recoverNativeFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "address", + name: "target", + type: "address", }, ], - name: "upgradeToAndCall", + name: "registerMigratableCoordinator", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint256[2]", + name: "publicProvingKey", + type: "uint256[2]", }, { - internalType: "address payable", - name: "_beneficiary", - type: "address", + internalType: "uint64", + name: "maxGas", + type: "uint64", }, + ], + name: "registerProvingKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "_coreRoundID", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "address", + name: "consumer", + type: "address", }, ], - name: "withdrawFeesAndRewards", + name: "removeConsumer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "uint16", + name: "requestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + ], + internalType: "struct VRFV2PlusClient.RandomWordsRequest", + name: "req", + type: "tuple", + }, + ], + name: "requestRandomWords", outputs: [ { internalType: "uint256", - name: "amount", + name: "requestId", type: "uint256", }, ], @@ -1437,200 +1998,344 @@ export default { { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "subId", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "address", + name: "newOwner", + type: "address", }, ], + name: "requestSubscriptionOwnerTransfer", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, - ], - }, - DisputeKitClassicNeo_Implementation: { - address: "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", - abi: [ { inputs: [], - stateMutability: "nonpayable", - type: "constructor", + name: "s_config", + outputs: [ + { + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", + }, + { + internalType: "bool", + name: "reentrancyLock", + type: "bool", + }, + { + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", + }, + { + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [], - name: "AlreadyInitialized", - type: "error", + name: "s_currentSubNonce", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "s_fallbackWeiPerUnitLink", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "s_provingKeyHashes", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "bytes32", - name: "slot", + name: "", type: "bytes32", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "s_provingKeys", + outputs: [ + { + internalType: "bool", + name: "exists", + type: "bool", + }, + { + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "", type: "uint256", }, + ], + name: "s_requestCommitments", + outputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_totalBalance", + outputs: [ { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint96", + name: "", + type: "uint96", }, ], - name: "ChoiceFunded", - type: "event", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_totalNativeBalance", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", }, { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", }, { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", }, { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", + }, + { + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", }, ], - name: "CommitCast", - type: "event", + name: "setConfig", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "link", + type: "address", }, { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "address", + name: "linkNativeFeed", + type: "address", }, + ], + name: "setLINKAndLINKNativeFeed", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, internalType: "address", - name: "_contributor", + name: "recipient", type: "address", }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "address payable", + name: "recipient", + type: "address", }, ], - name: "Contribution", - type: "event", + name: "withdrawNative", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + }, + DAI: { + address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "owner", + type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + indexed: true, + internalType: "address", + name: "spender", + type: "address", }, { indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: "DisputeCreation", + name: "Approval", type: "event", }, { anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + indexed: true, + internalType: "address", + name: "usr", + type: "address", }, ], - name: "Initialized", + name: "Deny", type: "event", }, { @@ -1639,11 +2344,11 @@ export default { { indexed: true, internalType: "address", - name: "newImplementation", + name: "usr", type: "address", }, ], - name: "Upgraded", + name: "Rely", type: "event", }, { @@ -1651,78 +2356,66 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "from", + type: "address", }, { indexed: true, internalType: "address", - name: "_juror", + name: "to", type: "address", }, { indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: true, internalType: "uint256", - name: "_choice", + name: "value", type: "uint256", }, - { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", - }, ], - name: "VoteCast", + name: "Transfer", type: "event", }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: true, internalType: "address", - name: "_contributor", + name: "", type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + name: "allowance", outputs: [ { internalType: "uint256", @@ -1734,34 +2427,38 @@ export default { type: "function", }, { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "", + name: "value", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", + name: "approve", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "balanceOf", outputs: [ { internalType: "uint256", @@ -1774,18 +2471,30 @@ export default { }, { inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, { internalType: "uint256", - name: "_coreDisputeID", + name: "value", type: "uint256", }, ], - name: "areCommitsAllCast", + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "decimals", outputs: [ { - internalType: "bool", + internalType: "uint8", name: "", - type: "bool", + type: "uint8", }, ], stateMutability: "view", @@ -1793,13 +2502,18 @@ export default { }, { inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "_coreDisputeID", + name: "subtractedValue", type: "uint256", }, ], - name: "areVotesAllCast", + name: "decreaseAllowance", outputs: [ { internalType: "bool", @@ -1807,62 +2521,56 @@ export default { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "address", + name: "usr", + type: "address", }, ], - name: "castCommit", + name: "deny", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "deploymentChainId", + outputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "_salt", + name: "addedValue", type: "uint256", }, + ], + name: "increaseAllowance", + outputs: [ { - internalType: "string", - name: "_justification", - type: "string", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "castVote", - outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -1870,36 +2578,28 @@ export default { inputs: [ { internalType: "address", - name: "_core", + name: "to", type: "address", }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address payable", - name: "_governor", - type: "address", + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: "changeGovernor", + name: "mint", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "core", + name: "name", outputs: [ { - internalType: "contract KlerosCore", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", @@ -1908,12 +2608,12 @@ export default { { inputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], - name: "coreDisputeIDToLocal", + name: "nonces", outputs: [ { internalType: "uint256", @@ -1926,28 +2626,43 @@ export default { }, { inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "_coreDisputeID", + name: "value", type: "uint256", }, { internalType: "uint256", - name: "_numberOfChoices", + name: "deadline", type: "uint256", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint8", + name: "v", + type: "uint8", }, { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", }, ], - name: "createDispute", + name: "permit", outputs: [], stateMutability: "nonpayable", type: "function", @@ -1955,57 +2670,38 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "usr", + type: "address", }, ], - name: "currentRuling", + name: "rely", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", outputs: [ { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", + internalType: "string", + name: "", + type: "string", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", + inputs: [], + name: "totalSupply", outputs: [ { internalType: "uint256", - name: "numberOfChoices", + name: "", type: "uint256", }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, ], stateMutability: "view", type: "function", @@ -2013,22 +2709,22 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, { internalType: "uint256", - name: "_nonce", + name: "value", type: "uint256", }, ], - name: "draw", + name: "transfer", outputs: [ { - internalType: "address", - name: "drawnAddress", - type: "address", + internalType: "bool", + name: "", + type: "bool", }, ], stateMutability: "nonpayable", @@ -2038,57 +2734,53 @@ export default { inputs: [ { internalType: "address", - name: "_destination", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", type: "address", }, { internalType: "uint256", - name: "_amount", + name: "value", type: "uint256", }, + ], + name: "transferFrom", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "executeGovernorProposal", - outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, + inputs: [], + name: "version", + outputs: [ { - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "string", + name: "", + type: "string", }, ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "getCoherentCount", + name: "wards", outputs: [ { internalType: "uint256", @@ -2099,212 +2791,340 @@ export default { stateMutability: "view", type: "function", }, + ], + }, + DisputeKitClassicNeo: { + address: "0x70B464be85A547144C72485eBa2577E5D3A45421", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "address", + name: "implementation", + type: "address", }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "uint256", - name: "_voteID", - type: "uint256", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_coreDisputeID", type: "uint256", }, { + indexed: true, internalType: "uint256", - name: "", + name: "_coreRoundID", type: "uint256", }, - ], - name: "getDegreeOfCoherence", - outputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_choice", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "ChoiceFunded", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", name: "_coreDisputeID", type: "uint256", }, - ], - name: "getFundedChoices", - outputs: [ { + indexed: true, + internalType: "address", + name: "_juror", + type: "address", + }, + { + indexed: false, internalType: "uint256[]", - name: "fundedChoices", + name: "_voteIDs", type: "uint256[]", }, + { + indexed: false, + internalType: "bytes32", + name: "_commit", + type: "bytes32", + }, ], - stateMutability: "view", - type: "function", + 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", }, - ], - name: "getRoundInfo", - outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, { - internalType: "bool", - name: "tied", - type: "bool", + indexed: true, + internalType: "address", + name: "_contributor", + type: "address", }, { + indexed: false, internalType: "uint256", - name: "totalVoted", + name: "_amount", type: "uint256", }, + ], + name: "Contribution", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "totalCommited", + name: "_coreDisputeID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "nbVoters", + name: "_numberOfChoices", type: "uint256", }, { - internalType: "uint256", - name: "choiceCount", - type: "uint256", + indexed: false, + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + 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", }, { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + indexed: true, + internalType: "address", + name: "_juror", + type: "address", + }, + { + indexed: false, + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, { + indexed: true, internalType: "uint256", - name: "_voteID", + name: "_choice", type: "uint256", }, + { + indexed: false, + internalType: "string", + name: "_justification", + type: "string", + }, ], - name: "getVoteInfo", - outputs: [ + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "address", - name: "account", - type: "address", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "bytes32", - name: "commit", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "choice", + name: "_choice", type: "uint256", }, { - internalType: "bool", - name: "voted", - type: "bool", + indexed: true, + internalType: "address", + name: "_contributor", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Withdrawal", + type: "event", }, { inputs: [], - name: "governor", + name: "LOSER_APPEAL_PERIOD_MULTIPLIER", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, + inputs: [], + name: "LOSER_STAKE_MULTIPLIER", + outputs: [ { - internalType: "contract KlerosCore", - name: "_core", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "ONE_BASIS_POINT", + outputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WINNER_STAKE_MULTIPLIER", + outputs: [ { internalType: "uint256", - name: "_coreRoundID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "_voteID", + name: "_coreDisputeID", type: "uint256", }, ], - name: "isVoteActive", + name: "areCommitsAllCast", outputs: [ { internalType: "bool", @@ -2316,13 +3136,19 @@ export default { type: "function", }, { - inputs: [], - name: "proxiableUUID", + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + ], + name: "areVotesAllCast", outputs: [ { - internalType: "bytes32", + internalType: "bool", name: "", - type: "bytes32", + type: "bool", }, ], stateMutability: "view", @@ -2331,19 +3157,24 @@ export default { { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", + }, + { + internalType: "bytes32", + name: "_commit", + type: "bytes32", }, ], - name: "upgradeToAndCall", + name: "castCommit", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { @@ -2354,152 +3185,141 @@ export default { type: "uint256", }, { - internalType: "address payable", - name: "_beneficiary", - type: "address", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, { internalType: "uint256", - name: "_coreRoundID", + name: "_choice", type: "uint256", }, { internalType: "uint256", - name: "_choice", + name: "_salt", type: "uint256", }, - ], - name: "withdrawFeesAndRewards", - outputs: [ { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "string", + name: "_justification", + type: "string", }, ], + name: "castVote", + outputs: [], stateMutability: "nonpayable", type: "function", }, - ], - }, - DisputeKitClassicNeo_Proxy: { - address: "0x70B464be85A547144C72485eBa2577E5D3A45421", - abi: [ { inputs: [ { internalType: "address", - name: "_implementation", + name: "_core", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], + name: "changeCore", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + type: "function", }, - ], - }, - DisputeResolverNeo: { - address: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + internalType: "address payable", + name: "_governor", type: "address", }, ], + name: "changeGovernor", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "core", + outputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "contract KlerosCore", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, internalType: "uint256", - name: "_externalDisputeID", + name: "", type: "uint256", }, + ], + name: "coreDisputeIDToLocal", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_templateId", + name: "", type: "uint256", }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, ], - name: "DisputeRequest", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_numberOfChoices", type: "uint256", }, { - indexed: false, + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { internalType: "uint256", - name: "_ruling", + name: "_nbVotes", type: "uint256", }, ], - name: "Ruling", - type: "event", + name: "createDispute", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "arbitrator", + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + ], + name: "currentRuling", outputs: [ { - internalType: "contract IArbitratorV2", - name: "", - type: "address", + internalType: "uint256", + name: "ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", }, ], stateMutability: "view", @@ -2513,13 +3333,23 @@ export default { type: "uint256", }, ], - name: "arbitratorDisputeIDToLocalID", + name: "disputes", outputs: [ { internalType: "uint256", - name: "", + name: "numberOfChoices", type: "uint256", }, + { + internalType: "bool", + name: "jumped", + type: "bool", + }, + { + internalType: "bytes", + name: "extraData", + type: "bytes", + }, ], stateMutability: "view", type: "function", @@ -2527,147 +3357,126 @@ export default { { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_nonce", + type: "uint256", }, ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "draw", + outputs: [ { internalType: "address", - name: "_governor", + name: "drawnAddress", type: "address", }, ], - name: "changeGovernor", - outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + internalType: "address", + name: "_destination", type: "address", }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, ], - name: "changeTemplateRegistry", + name: "executeGovernorProposal", 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", + name: "_coreDisputeID", type: "uint256", }, - ], - name: "createDisputeForTemplate", - outputs: [ { internalType: "uint256", - name: "disputeID", + name: "_choice", type: "uint256", }, ], + name: "fundAppeal", + outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_coreRoundID", type: "uint256", }, ], - name: "createDisputeForTemplateUri", + name: "getCoherentCount", outputs: [ { internalType: "uint256", - name: "disputeID", + name: "", type: "uint256", }, ], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", - name: "", + name: "_coreDisputeID", type: "uint256", }, - ], - name: "disputes", - outputs: [ { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { - internalType: "bool", - name: "isRuled", - type: "bool", + internalType: "uint256", + name: "_voteID", + type: "uint256", }, { internalType: "uint256", - name: "ruling", + name: "", type: "uint256", }, { internalType: "uint256", - name: "numberOfRulingOptions", + name: "", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", + name: "getDegreeOfCoherence", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -2677,156 +3486,117 @@ export default { inputs: [ { internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", + name: "_coreDisputeID", type: "uint256", }, ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", + name: "getFundedChoices", outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", + internalType: "uint256[]", + name: "fundedChoices", + type: "uint256[]", }, ], stateMutability: "view", type: "function", }, - ], - }, - DisputeTemplateRegistry: { - address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_choice", + type: "uint256", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ + name: "getRoundInfo", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_templateId", + name: "winningChoice", type: "uint256", }, { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", + internalType: "bool", + name: "tied", + type: "bool", }, { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", + internalType: "uint256", + name: "totalVoted", + type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "uint256", + name: "totalCommited", + type: "uint256", }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "nbVoters", + type: "uint256", + }, + { + internalType: "uint256", + name: "choiceCount", + type: "uint256", }, ], - name: "Initialized", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voteID", + type: "uint256", }, ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ + name: "getVoteInfo", + outputs: [ { internalType: "address", - name: "_governor", + name: "account", type: "address", }, + { + internalType: "bytes32", + name: "commit", + type: "bytes32", + }, + { + internalType: "uint256", + name: "choice", + type: "uint256", + }, + { + internalType: "bool", + name: "voted", + type: "bool", + }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -2849,62 +3619,54 @@ export default { name: "_governor", type: "address", }, + { + internalType: "contract KlerosCore", + name: "_core", + 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: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_templateData", - type: "string", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "uint256", + name: "_voteID", + type: "uint256", }, ], - name: "setDisputeTemplate", + name: "isVoteActive", outputs: [ { - internalType: "uint256", - name: "templateId", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "templates", + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", @@ -2928,6 +3690,40 @@ export default { 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", + }, { inputs: [ { @@ -2946,8 +3742,8 @@ export default { }, ], }, - DisputeTemplateRegistry_Implementation: { - address: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", + DisputeKitClassicNeo_Implementation: { + address: "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", abi: [ { inputs: [], @@ -3002,42 +3798,23 @@ export default { { indexed: true, internalType: "uint256", - name: "_templateId", + name: "_coreDisputeID", 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", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + indexed: true, + internalType: "uint256", + name: "_choice", + type: "uint256", }, ], - name: "Initialized", + name: "ChoiceFunded", type: "event", }, { @@ -3045,209 +3822,119 @@ export default { inputs: [ { indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { + indexed: true, internalType: "address", - name: "", + name: "_juror", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: false, + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ { + indexed: false, internalType: "bytes32", - name: "", + name: "_commit", type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "CommitCast", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "setDisputeTemplate", - outputs: [ { + indexed: true, internalType: "uint256", - name: "templateId", + name: "_coreRoundID", type: "uint256", }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templates", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_choice", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: true, internalType: "address", - name: "newImplementation", + name: "_contributor", type: "address", }, { - internalType: "bytes", - name: "data", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", + name: "Contribution", + type: "event", }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", - abi: [ { + anonymous: false, inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, { + indexed: false, internalType: "bytes", - name: "_data", + name: "_extraData", type: "bytes", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - EvidenceModule: { - address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "Initialized", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "Upgraded", + type: "event", }, { anonymous: false, @@ -3255,279 +3942,254 @@ export default { { indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "_coreDisputeID", type: "uint256", }, { indexed: true, internalType: "address", - name: "_party", + 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: "_evidence", + name: "_justification", type: "string", }, ], - name: "Evidence", + 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: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_choice", + type: "uint256", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { indexed: true, internalType: "address", - name: "newImplementation", + name: "_contributor", type: "address", }, - ], - name: "Upgraded", + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "Withdrawal", type: "event", }, { inputs: [], - name: "governor", + name: "LOSER_APPEAL_PERIOD_MULTIPLIER", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "LOSER_STAKE_MULTIPLIER", + outputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "ONE_BASIS_POINT", outputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "WINNER_STAKE_MULTIPLIER", + outputs: [ { internalType: "uint256", - name: "_externalDisputeID", + name: "", type: "uint256", }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, + ], + name: "areCommitsAllCast", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, + ], + name: "areVotesAllCast", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - EvidenceModule_Implementation: { - address: "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { internalType: "bytes32", - name: "slot", + name: "_commit", type: "bytes32", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "castCommit", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "_coreDisputeID", type: "uint256", }, { - indexed: true, - internalType: "address", - name: "_party", - type: "address", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", + internalType: "uint256", + name: "_choice", + type: "uint256", }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_salt", + type: "uint256", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "string", + name: "_justification", + type: "string", }, ], - name: "Upgraded", - type: "event", + name: "castVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { internalType: "address", - name: "", + name: "_core", type: "address", }, ], - stateMutability: "view", + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", + internalType: "address payable", name: "_governor", type: "address", }, ], - name: "initialize", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "core", outputs: [ { - internalType: "bytes32", + internalType: "contract KlerosCore", name: "", - type: "bytes32", + type: "address", }, ], stateMutability: "view", @@ -3537,694 +4199,6039 @@ export default { inputs: [ { internalType: "uint256", - name: "_externalDisputeID", + name: "", type: "uint256", }, + ], + name: "coreDisputeIDToLocal", + outputs: [ { - internalType: "string", - name: "_evidence", - type: "string", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, { internalType: "bytes", - name: "data", + name: "_extraData", type: "bytes", }, + { + internalType: "uint256", + name: "_nbVotes", + type: "uint256", + }, ], - name: "upgradeToAndCall", + name: "createDispute", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, - ], - }, - EvidenceModule_Proxy: { - address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", - abi: [ { 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: "_implementation", + 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: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", + type: "function", }, { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_choice", + type: "uint256", + }, + ], + name: "fundAppeal", + outputs: [], stateMutability: "payable", - type: "receive", + type: "function", }, - ], - }, - KlerosCoreNeo: { - address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", - abi: [ { - stateMutability: "payable", - type: "fallback", + 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", }, { - stateMutability: "payable", - type: "receive", + 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: [], - name: "AlreadyInitialized", - type: "error", + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + ], + name: "getFundedChoices", + outputs: [ + { + internalType: "uint256[]", + name: "fundedChoices", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", + 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: [], - 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: [ + { + 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: "EvidenceNotPassedAndNotAppeal", - type: "error", + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "FailedDelegateCall", - type: "error", + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract KlerosCore", + name: "_core", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "GovernorOnly", - type: "error", + 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: "GuardianOrGovernorOnly", - type: "error", + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", }, { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", + 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", }, + ], + }, + DisputeKitClassicNeo_Proxy: { + address: "0x70B464be85A547144C72485eBa2577E5D3A45421", + abi: [ { inputs: [ { internalType: "address", - name: "implementation", + name: "_implementation", type: "address", }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, ], - name: "InvalidImplementation", - type: "error", + stateMutability: "nonpayable", + type: "constructor", }, { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", + stateMutability: "payable", + type: "fallback", }, { - 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", + stateMutability: "payable", + type: "receive", }, + ], + }, + DisputeResolverNeo: { + address: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", + abi: [ { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", + inputs: [ + { + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, + { + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", }, { - inputs: [], - name: "SortitionModuleOnly", - type: "error", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_arbitratorDisputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_templateId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "_templateUri", + type: "string", + }, + ], + name: "DisputeRequest", + type: "event", }, { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", + 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: "StakingLessThanCourtMinStake", - type: "error", + name: "arbitrator", + outputs: [ + { + internalType: "contract IArbitratorV2", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "StakingMoreThanMaxStakePerJuror", - type: "error", + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "arbitratorDisputeIDToLocalID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "StakingMoreThanMaxTotalStaked", - type: "error", + inputs: [ + { + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, + ], + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "StakingTransferFailed", - type: "error", + inputs: [ + { + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", + }, + ], + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "TokenNotAccepted", - type: "error", + 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: [], - name: "TransferFailed", - type: "error", + 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: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + 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", + }, + ], + }, + DisputeResolverRulerNeo: { + address: "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", + 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", + }, + ], + }, + DisputeTemplateRegistry: { + address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_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", + }, + { + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + ], + }, + DisputeTemplateRegistry_Implementation: { + address: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", + 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", + }, + ], + }, + DisputeTemplateRegistry_Proxy: { + address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + }, + EvidenceModule: { + address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "_party", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "_evidence", + type: "string", + }, + ], + name: "Evidence", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "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", + }, + { + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + ], + }, + EvidenceModule_Implementation: { + address: "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", + 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", + }, + ], + }, + EvidenceModule_Proxy: { + address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", + 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", + }, + ], + }, + KlerosCoreNeo: { + address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AppealFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "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", + }, + { + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + ], + }, + KlerosCoreNeo_Implementation: { + address: "0x17c39AB53A7072b167A74a85D47b30385c98ae89", + 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: "bytes32", - name: "slot", - type: "bytes32", + internalType: "address", + name: "_destination", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - 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", + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "WhenPausedOnly", - type: "error", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "WrongDisputeKitIndex", - type: "error", + name: "getDisputeKitsLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, + ], + name: "getNumberOfRounds", + outputs: [ { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "AcceptedFeeToken", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, + ], + name: "getNumberOfVotes", + outputs: [ { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "AppealDecision", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint256", + name: "_round", + type: "uint256", }, ], - name: "AppealPossible", - type: "event", + 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", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", + internalType: "uint96", name: "_courtID", - type: "uint256", + 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", }, { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", + internalType: "contract IDisputeKit", + name: "_disputeKit", + type: "address", }, { - indexed: false, internalType: "bool", name: "_hiddenVotes", type: "bool", }, { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", }, { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", + internalType: "bytes", + name: "_sortitionExtraData", + type: "bytes", }, { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "contract ISortitionModule", + name: "_sortitionModuleAddress", + type: "address", }, { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", + internalType: "contract IERC721", + name: "_jurorNft", + type: "address", }, ], - name: "CourtCreated", - type: "event", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, + ], + name: "isDisputeKitJumping", + outputs: [ { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "CourtJump", - type: "event", + stateMutability: "view", + type: "function", }, { - 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", + name: "_disputeKitID", type: "uint256", }, + ], + name: "isSupported", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "jurorNft", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", + internalType: "contract IERC721", + name: "", + type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "jurorProsecutionModule", + outputs: [ { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "address", + name: "", + type: "address", }, ], - name: "CourtModified", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, 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: [ { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "DisputeCreation", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "pinakion", + outputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", + internalType: "contract IERC20", + name: "", + type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - name: "DisputeKitCreated", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint96", name: "_courtID", type: "uint96", }, { - indexed: true, internalType: "uint256", - name: "_disputeKitID", + name: "_newStake", type: "uint256", }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, ], - name: "DisputeKitEnabled", - type: "event", + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - indexed: true, internalType: "uint256", - name: "_fromDisputeKitID", + name: "_newStake", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - 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", }, ], - name: "DisputeKitJump", - type: "event", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "newImplementation", type: "address", }, { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + ], + }, + KlerosCoreNeo_Proxy: { + address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", + abi: [ + { + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "address", + name: "_implementation", + type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "Draw", - type: "event", + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + }, + KlerosCoreRulerNeo: { + address: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AppealFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "ArbitrationFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "DisputeNotAppealable", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [], + name: "GovernorOnly", + type: "error", + }, + { + inputs: [], + name: "GovernorOrInstructorOnly", + type: "error", + }, + { + inputs: [], + name: "InvalidForkingCourtAsParent", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "address", + name: "implementation", + type: "address", }, ], - name: "Initialized", - type: "event", + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NoRulerSet", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "RulerOnly", + type: "error", + }, + { + inputs: [], + name: "RulingAlreadyExecuted", + type: "error", + }, + { + inputs: [], + name: "RulingModeNotSet", + type: "error", + }, + { + inputs: [], + name: "TokenNotAccepted", + type: "error", + }, + { + inputs: [], + name: "TransferFailed", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, { - 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", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - name: "LeftoverRewardSent", - type: "event", + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + inputs: [], + name: "UnsuccessfulCall", + type: "error", }, { anonymous: false, @@ -4232,23 +10239,17 @@ export default { { indexed: true, internalType: "contract IERC20", - name: "_feeToken", + name: "_token", type: "address", }, { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + indexed: true, + internalType: "bool", + name: "_accepted", + type: "bool", }, ], - name: "NewCurrencyRate", + name: "AcceptedFeeToken", type: "event", }, { @@ -4261,44 +10262,32 @@ export default { type: "uint256", }, { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", + name: "AppealDecision", type: "event", }, { anonymous: false, inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, { indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, ], - name: "Ruling", + name: "AppealPossible", type: "event", }, { @@ -4306,54 +10295,42 @@ export default { inputs: [ { indexed: true, - internalType: "address", - name: "_account", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, { indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "enum KlerosCoreRuler.RulingMode", + name: "mode", + type: "uint8", }, { indexed: true, internalType: "uint256", - name: "_roundID", + name: "_disputeID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_degreeOfCoherency", + name: "_ruling", type: "uint256", }, { indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", + internalType: "bool", + name: "tied", + type: "bool", }, { indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "bool", + name: "overridden", + type: "bool", }, ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", + name: "AutoRuled", type: "event", }, { @@ -4361,413 +10338,520 @@ export default { inputs: [ { indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_courtID", + type: "uint256", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", + indexed: true, + internalType: "uint96", + name: "_parent", + type: "uint96", }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, { + indexed: false, internalType: "uint256", - name: "_numberOfChoices", + name: "_minStake", type: "uint256", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "_disputeID", + name: "_feeForJuror", type: "uint256", }, - ], - name: "appealCost", - outputs: [ { + indexed: false, internalType: "uint256", - name: "cost", + name: "_jurorsForCourtJump", type: "uint256", }, + { + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, ], - stateMutability: "view", - type: "function", + name: "CourtCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, { + indexed: true, internalType: "uint256", - name: "end", + name: "_roundID", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "", - type: "address", + indexed: true, + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", }, - ], - name: "arbitrableWhitelist", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "uint96", + name: "_toCourtID", + type: "uint96", }, ], - stateMutability: "view", - type: "function", + name: "CourtJump", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, - ], - name: "arbitrationCost", - outputs: [ { + indexed: false, internalType: "uint256", - name: "cost", + name: "_minStake", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", }, - ], - name: "arbitrationCost", - outputs: [ { + indexed: false, internalType: "uint256", - name: "cost", + name: "_feeForJuror", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", }, { - internalType: "bool", - name: "_accepted", - type: "bool", + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "CourtModified", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_arbitrable", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "bool", - name: "_allowed", - type: "bool", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "_minStake", + name: "_disputeID", type: "uint256", }, { + indexed: true, internalType: "uint256", - name: "_alpha", + name: "_roundID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_feeForJuror", + name: "_pnkAmount", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_jurorsForCourtJump", + name: "_feeAmount", type: "uint256", }, { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", + 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: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "NewCurrencyRate", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address payable", - name: "_governor", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "enum KlerosCoreRuler.Period", + name: "_period", + type: "uint8", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "NewPeriod", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, internalType: "address", - name: "_guardian", + name: "_oldRuler", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_newRuler", type: "address", }, ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "RulerChanged", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "contract IERC721", - name: "_jurorNft", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, + { + components: [ + { + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", + }, + { + internalType: "uint256", + name: "presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "presetOverridden", + type: "bool", + }, + ], + indexed: false, + internalType: "struct KlerosCoreRuler.RulerSettings", + name: "_settings", + type: "tuple", + }, ], - name: "changeJurorNft", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "RulerSettingsChanged", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", + 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: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", + 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: "_pinakion", + name: "_feeToken", type: "address", }, ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "TokenAndETHShift", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModule", + indexed: true, + internalType: "address", + name: "newImplementation", type: "address", }, ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [ { - internalType: "contract IERC20", - name: "_toToken", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { internalType: "uint256", - name: "_amountInEth", + name: "_numberOfChoices", type: "uint256", }, - ], - name: "convertEthToTokenAmount", - outputs: [ { - internalType: "uint256", + internalType: "bytes", name: "", - type: "uint256", + type: "bytes", + }, + { + internalType: "bool", + name: "_jump", + type: "bool", }, ], - stateMutability: "view", + name: "appeal", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, { internalType: "bool", - name: "hiddenVotes", + name: "_jump", type: "bool", }, + ], + name: "appealCost", + outputs: [ { internalType: "uint256", - name: "minStake", + name: "cost", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "arbitrationCost", + outputs: [ { internalType: "uint256", - name: "alpha", + name: "cost", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "arbitrationCost", + outputs: [ { internalType: "uint256", - name: "feeForJuror", + name: "cost", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, { internalType: "bool", - name: "disabled", + name: "_accepted", type: "bool", }, ], - stateMutability: "view", + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint96", - name: "_parent", + name: "_courtID", type: "uint96", }, { @@ -4800,18 +10884,8 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], - name: "createCourt", + name: "changeCourtParameters", outputs: [], stateMutability: "nonpayable", type: "function", @@ -4819,58 +10893,36 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, - ], - name: "createDispute", - outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - stateMutability: "payable", + name: "changeCurrencyRates", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", + internalType: "address payable", + name: "_governor", type: "address", }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, ], + name: "changeGovernor", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -4878,74 +10930,106 @@ export default { inputs: [ { internalType: "contract IERC20", - name: "", + name: "_pinakion", type: "address", }, ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint64", - name: "rateInEth", - type: "uint64", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", + internalType: "address", + name: "_newRuler", + type: "address", }, ], - stateMutability: "view", + name: "changeRuler", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, - ], - name: "currentRuling", - outputs: [ { internalType: "uint256", - name: "ruling", + name: "_presetRuling", type: "uint256", }, { internalType: "bool", - name: "tied", + name: "_presetTied", type: "bool", }, { internalType: "bool", - name: "overridden", + name: "_presetOverridden", type: "bool", }, ], - stateMutability: "view", + name: "changeRulingModeToAutomaticPreset", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "changeRulingModeToAutomaticRandom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "changeRulingModeToManual", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "contract IERC20", + name: "_toToken", + type: "address", + }, { internalType: "uint256", - name: "", + name: "_amountInEth", type: "uint256", }, ], - name: "disputeKits", + name: "convertEthToTokenAmount", outputs: [ { - internalType: "contract IDisputeKit", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -4959,120 +11043,86 @@ export default { type: "uint256", }, ], - name: "disputes", + name: "courts", outputs: [ { internalType: "uint96", - name: "courtID", + name: "parent", type: "uint96", }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreBase.Period", - name: "period", - type: "uint8", - }, { internalType: "bool", - name: "ruled", + name: "hiddenVotes", type: "bool", }, { internalType: "uint256", - name: "lastPeriodChange", + name: "minStake", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "alpha", type: "uint256", }, { internalType: "uint256", - name: "_iterations", + name: "feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "jurorsForCourtJump", type: "uint256", }, + { + internalType: "bool", + name: "disabled", + type: "bool", + }, ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint96", - name: "_courtID", + name: "_parent", type: "uint96", }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, { internalType: "bool", - name: "_enable", + name: "_hiddenVotes", type: "bool", }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "_minStake", type: "uint256", }, { internalType: "uint256", - name: "_round", + name: "_alpha", type: "uint256", }, { internalType: "uint256", - name: "_iterations", + name: "_feeForJuror", type: "uint256", }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, { internalType: "uint256", - name: "_amount", + name: "_jurorsForCourtJump", type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, ], - name: "executeGovernorProposal", + name: "createCourt", outputs: [], stateMutability: "nonpayable", type: "function", @@ -5081,61 +11131,84 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "_numberOfChoices", type: "uint256", }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", + name: "createDispute", outputs: [ { internalType: "uint256", - name: "", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "_feeAmount", type: "uint256", }, ], - name: "getNumberOfRounds", + name: "createDispute", outputs: [ { internalType: "uint256", - name: "", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IERC20", + name: "", + type: "address", }, ], - name: "getNumberOfVotes", + name: "currencyRates", outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bool", + name: "feePaymentAccepted", + type: "bool", + }, + { + internalType: "uint64", + name: "rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "rateDecimals", + type: "uint8", }, ], stateMutability: "view", @@ -5148,75 +11221,23 @@ export default { name: "_disputeID", type: "uint256", }, + ], + name: "currentRuling", + outputs: [ { internalType: "uint256", - name: "_round", + name: "ruling", 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", + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", }, ], stateMutability: "view", @@ -5225,109 +11246,136 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "getTimesPerPeriod", + name: "disputes", outputs: [ { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", + internalType: "uint96", + name: "courtID", + type: "uint96", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", + internalType: "contract IArbitrableV2", + name: "arbitrated", type: "address", }, + { + internalType: "enum KlerosCoreRuler.Period", + name: "period", + type: "uint8", + }, + { + internalType: "bool", + name: "ruled", + type: "bool", + }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "guardian", - outputs: [ + inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_round", + type: "uint256", }, ], - stateMutability: "view", + name: "execute", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_destination", type: "address", }, { - internalType: "address", - name: "_guardian", - type: "address", + internalType: "uint256", + name: "_amount", + type: "uint256", }, { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", + internalType: "bytes", + name: "_data", + type: "bytes", }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", + internalType: "uint256", + name: "_ruling", + type: "uint256", }, { internalType: "bool", - name: "_hiddenVotes", + name: "tied", type: "bool", }, { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "bool", + name: "overridden", + type: "bool", }, + ], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getNextDisputeID", + outputs: [ { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, + ], + name: "getNumberOfRounds", + outputs: [ { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -5338,12 +11386,12 @@ export default { type: "uint256", }, ], - name: "isDisputeKitJumping", + name: "getNumberOfVotes", outputs: [ { - internalType: "bool", + internalType: "uint256", name: "", - type: "bool", + type: "uint256", }, ], stateMutability: "view", @@ -5352,35 +11400,58 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { internalType: "uint256", - name: "_disputeKitID", + name: "_round", type: "uint256", }, ], - name: "isSupported", + name: "getRoundInfo", outputs: [ { - internalType: "bool", + components: [ + { + internalType: "uint256", + name: "totalFeesForJurors", + type: "uint256", + }, + { + internalType: "uint256", + name: "sumFeeRewardPaid", + type: "uint256", + }, + { + internalType: "contract IERC20", + name: "feeToken", + type: "address", + }, + ], + internalType: "struct KlerosCoreRuler.Round", name: "", - type: "bool", + type: "tuple", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "jurorNft", + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + ], + name: "getTimesPerPeriod", outputs: [ { - internalType: "contract IERC721", - name: "", - type: "address", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, ], stateMutability: "view", @@ -5388,7 +11459,7 @@ export default { }, { inputs: [], - name: "jurorProsecutionModule", + name: "governor", outputs: [ { internalType: "address", @@ -5402,31 +11473,34 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract IERC20", + name: "_pinakion", + type: "address", + }, + { + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "paused", + name: "pinakion", outputs: [ { - internalType: "bool", + internalType: "contract IERC20", name: "", - type: "bool", + type: "address", }, ], stateMutability: "view", @@ -5434,25 +11508,31 @@ export default { }, { inputs: [], - name: "pinakion", + name: "proxiableUUID", outputs: [ { - internalType: "contract IERC20", + internalType: "bytes32", name: "", - type: "address", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "proxiableUUID", + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "arbitrable", + type: "address", + }, + ], + name: "rulers", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "address", + name: "ruler", + type: "address", }, ], stateMutability: "view", @@ -5461,69 +11541,66 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, + ], + name: "rulingResults", + outputs: [ { internalType: "uint256", - name: "_newStake", + name: "ruling", type: "uint256", }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_account", + internalType: "contract IArbitrableV2", + name: "arbitrable", type: "address", }, + ], + name: "settings", + outputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", }, { internalType: "uint256", - name: "_newStake", + name: "presetRuling", type: "uint256", }, { internalType: "bool", - name: "_alreadyTransferred", + name: "presetTied", type: "bool", }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ { - internalType: "contract ISortitionModule", - name: "", - type: "address", + internalType: "bool", + name: "presetOverridden", + type: "bool", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -5560,87 +11637,32 @@ export default { }, ], }, - KlerosCoreNeo_Implementation: { - address: "0x17c39AB53A7072b167A74a85D47b30385c98ae89", - 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", - }, + KlerosCoreRulerNeo_Implementation: { + address: "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + abi: [ { inputs: [], - name: "DisputeKitOnly", - type: "error", + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], - name: "DisputeNotAppealable", + name: "AlreadyInitialized", type: "error", }, { inputs: [], - name: "DisputePeriodIsFinal", + name: "AppealFeesNotEnough", type: "error", }, { inputs: [], - name: "DisputeStillDrawing", + name: "ArbitrationFeesNotEnough", type: "error", }, { inputs: [], - name: "EvidenceNotPassedAndNotAppeal", + name: "DisputeNotAppealable", type: "error", }, { @@ -5655,12 +11677,7 @@ export default { }, { inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", + name: "GovernorOrInstructorOnly", type: "error", }, { @@ -5681,27 +11698,7 @@ export default { }, { inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEligibleForStaking", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", + name: "NoRulerSet", type: "error", }, { @@ -5711,42 +11708,17 @@ export default { }, { 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", + name: "RulerOnly", type: "error", }, { inputs: [], - name: "StakingNotPossibeInThisCourt", + name: "RulingAlreadyExecuted", type: "error", }, { inputs: [], - name: "StakingTransferFailed", + name: "RulingModeNotSet", type: "error", }, { @@ -5775,41 +11747,11 @@ export default { 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: [ @@ -5867,6 +11809,49 @@ export default { name: "AppealPossible", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "enum KlerosCoreRuler.RulingMode", + name: "mode", + type: "uint8", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "tied", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "overridden", + type: "bool", + }, + ], + name: "AutoRuled", + type: "event", + }, { anonymous: false, inputs: [ @@ -5918,12 +11903,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "CourtCreated", type: "event", @@ -6017,120 +11996,14 @@ export default { 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", + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - name: "Draw", + name: "DisputeCreation", type: "event", }, { @@ -6219,7 +12092,7 @@ export default { }, { indexed: false, - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", name: "_period", type: "uint8", }, @@ -6229,8 +12102,68 @@ export default { }, { anonymous: false, - inputs: [], - name: "Paused", + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_oldRuler", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_newRuler", + type: "address", + }, + ], + name: "RulerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + components: [ + { + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", + }, + { + internalType: "uint256", + name: "presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "presetOverridden", + type: "bool", + }, + ], + indexed: false, + internalType: "struct KlerosCoreRuler.RulerSettings", + name: "_settings", + type: "tuple", + }, + ], + name: "RulerSettingsChanged", type: "event", }, { @@ -6307,12 +12240,6 @@ export default { name: "TokenAndETHShift", type: "event", }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, { anonymous: false, inputs: [ @@ -6326,19 +12253,6 @@ export default { name: "Upgraded", type: "event", }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -6353,9 +12267,14 @@ export default { }, { internalType: "bytes", - name: "_extraData", + name: "", type: "bytes", }, + { + internalType: "bool", + name: "_jump", + type: "bool", + }, ], name: "appeal", outputs: [], @@ -6369,61 +12288,23 @@ export default { name: "_disputeID", type: "uint256", }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bool", + name: "_jump", + type: "bool", }, ], - name: "appealPeriod", + name: "appealCost", outputs: [ { internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", + name: "cost", 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: [ { @@ -6485,24 +12366,6 @@ export default { 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: [ { @@ -6585,12 +12448,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_guardian", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, ], - name: "changeGuardian", + name: "changePinakion", outputs: [], stateMutability: "nonpayable", type: "function", @@ -6598,12 +12461,17 @@ export default { { inputs: [ { - internalType: "contract IERC721", - name: "_jurorNft", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + internalType: "address", + name: "_newRuler", type: "address", }, ], - name: "changeJurorNft", + name: "changeRuler", outputs: [], stateMutability: "nonpayable", type: "function", @@ -6611,12 +12479,27 @@ export default { { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, + { + internalType: "uint256", + name: "_presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "_presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "_presetOverridden", + type: "bool", + }, ], - name: "changeJurorProsecutionModule", + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", type: "function", @@ -6624,12 +12507,12 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changePinakion", + name: "changeRulingModeToAutomaticRandom", outputs: [], stateMutability: "nonpayable", type: "function", @@ -6637,12 +12520,12 @@ export default { { inputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModule", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", type: "function", @@ -6757,16 +12640,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -6877,71 +12750,13 @@ export default { }, { 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", + name: "tied", type: "bool", }, { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", + internalType: "bool", + name: "overridden", + type: "bool", }, ], stateMutability: "view", @@ -6951,41 +12766,34 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", + name: "", type: "uint256", }, ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "disputes", + outputs: [ { internalType: "uint96", - name: "_courtID", + name: "courtID", type: "uint96", }, { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", + internalType: "contract IArbitrableV2", + name: "arbitrated", + type: "address", + }, + { + internalType: "enum KlerosCoreRuler.Period", + name: "period", + type: "uint8", }, { internalType: "bool", - name: "_enable", + name: "ruled", type: "bool", }, ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -7000,11 +12808,6 @@ export default { name: "_round", type: "uint256", }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, ], name: "execute", outputs: [], @@ -7041,6 +12844,21 @@ export default { name: "_disputeID", type: "uint256", }, + { + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], name: "executeRuling", outputs: [], @@ -7049,7 +12867,7 @@ export default { }, { inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [ { internalType: "uint256", @@ -7115,229 +12933,44 @@ export default { 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", + ], + internalType: "struct KlerosCoreRuler.Round", name: "", - type: "bool", + type: "tuple", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "jurorNft", + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + ], + name: "getTimesPerPeriod", outputs: [ { - internalType: "contract IERC721", - name: "", - type: "address", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, ], stateMutability: "view", @@ -7345,7 +12978,7 @@ export default { }, { inputs: [], - name: "jurorProsecutionModule", + name: "governor", outputs: [ { internalType: "address", @@ -7359,31 +12992,34 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract IERC20", + name: "_pinakion", + type: "address", + }, + { + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "paused", + name: "pinakion", outputs: [ { - internalType: "bool", + internalType: "contract IERC20", name: "", - type: "bool", + type: "address", }, ], stateMutability: "view", @@ -7391,25 +13027,31 @@ export default { }, { inputs: [], - name: "pinakion", + name: "proxiableUUID", outputs: [ { - internalType: "contract IERC20", + internalType: "bytes32", name: "", - type: "address", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "proxiableUUID", + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "arbitrable", + type: "address", + }, + ], + name: "rulers", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "address", + name: "ruler", + type: "address", }, ], stateMutability: "view", @@ -7418,69 +13060,66 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, + ], + name: "rulingResults", + outputs: [ { internalType: "uint256", - name: "_newStake", + name: "ruling", type: "uint256", }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_account", + internalType: "contract IArbitrableV2", + name: "arbitrable", type: "address", }, + ], + name: "settings", + outputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", }, { internalType: "uint256", - name: "_newStake", + name: "presetRuling", type: "uint256", }, { internalType: "bool", - name: "_alreadyTransferred", + name: "presetTied", type: "bool", }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ { - internalType: "contract ISortitionModule", - name: "", - type: "address", + internalType: "bool", + name: "presetOverridden", + type: "bool", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -7501,8 +13140,8 @@ export default { }, ], }, - KlerosCoreNeo_Proxy: { - address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", + KlerosCoreRulerNeo_Proxy: { + address: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", abi: [ { inputs: [ @@ -7530,6 +13169,137 @@ export default { }, ], }, + KlerosCoreSnapshotProxy: { + address: "0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "totalStaked", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "core", + outputs: [ + { + internalType: "contract IKlerosCore", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, KlerosV2NeoEarlyUser: { address: "0xfE34a72c55e512601E7d491A9c5b36373cE34d63", abi: [ diff --git a/contracts/deployments/arbitrumSepolia.ts b/contracts/deployments/arbitrumSepolia.ts index f793ac7f7..05724f0b0 100644 --- a/contracts/deployments/arbitrumSepolia.ts +++ b/contracts/deployments/arbitrumSepolia.ts @@ -58,48 +58,103 @@ export default { }, ], }, - DAI: { - address: "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", + ChainlinkRNG: { + address: "0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79", abi: [ { inputs: [ { - internalType: "string", - name: "_name", - type: "string", + internalType: "address", + name: "_governor", + type: "address", }, { - internalType: "string", - name: "_symbol", - type: "string", + internalType: "address", + name: "_sortitionModule", + type: "address", + }, + { + internalType: "address", + name: "_vrfCoordinator", + type: "address", + }, + { + internalType: "bytes32", + name: "_keyHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_subscriptionId", + type: "uint256", + }, + { + internalType: "uint16", + name: "_requestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "_callbackGasLimit", + type: "uint32", }, ], stateMutability: "nonpayable", type: "constructor", }, { - anonymous: false, inputs: [ { - indexed: true, + internalType: "address", + name: "have", + type: "address", + }, + { + internalType: "address", + name: "want", + type: "address", + }, + ], + name: "OnlyCoordinatorCanFulfill", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "have", + type: "address", + }, + { internalType: "address", name: "owner", type: "address", }, { - indexed: true, internalType: "address", - name: "spender", + name: "coordinator", type: "address", }, + ], + name: "OnlyOwnerOrCoordinator", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + anonymous: false, + inputs: [ { indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "address", + name: "vrfCoordinator", + type: "address", }, ], - name: "Approval", + name: "CoordinatorSet", type: "event", }, { @@ -117,117 +172,130 @@ export default { name: "to", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, ], - name: "Transfer", + name: "OwnershipTransferRequested", type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "owner", + name: "from", type: "address", }, { + indexed: true, internalType: "address", - name: "spender", + name: "to", type: "address", }, ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "OwnershipTransferred", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "spender", - type: "address", + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "amount", + name: "randomWord", type: "uint256", }, ], - name: "approve", - outputs: [ + name: "RequestFulfilled", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", }, ], + name: "RequestSent", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", + inputs: [], + name: "callbackGasLimit", outputs: [ { - internalType: "uint256", + internalType: "uint32", name: "", - type: "uint256", + type: "uint32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "decimals", - outputs: [ + inputs: [ { - internalType: "uint8", - name: "", - type: "uint8", + internalType: "uint32", + name: "_callbackGasLimit", + type: "uint32", }, ], - stateMutability: "view", + name: "changeCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "spender", + name: "_governor", type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", + internalType: "bytes32", + name: "_keyHash", + type: "bytes32", }, ], - name: "decreaseAllowance", - outputs: [ + name: "changeKeyHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint16", + name: "_requestConfirmations", + type: "uint16", }, ], + name: "changeRequestConfirmations", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -235,34 +303,49 @@ export default { inputs: [ { internalType: "address", - name: "spender", + name: "_sortitionModule", type: "address", }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "addedValue", + name: "_subscriptionId", type: "uint256", }, ], - name: "increaseAllowance", - outputs: [ + name: "changeSubscriptionId", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "_vrfCoordinator", + type: "address", }, ], + name: "changeVrfCoordinator", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "name", + name: "governor", outputs: [ { - internalType: "string", + internalType: "address", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", @@ -270,12 +353,12 @@ export default { }, { inputs: [], - name: "symbol", + name: "keyHash", outputs: [ { - internalType: "string", + internalType: "bytes32", name: "", - type: "string", + type: "bytes32", }, ], stateMutability: "view", @@ -283,7 +366,7 @@ export default { }, { inputs: [], - name: "totalSupply", + name: "lastRequestId", outputs: [ { internalType: "uint256", @@ -295,129 +378,129 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "owner", + outputs: [ { internalType: "address", - name: "to", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "amount", + name: "requestId", type: "uint256", }, ], - name: "transfer", + name: "randomNumbers", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "number", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "from", - type: "address", + internalType: "uint256", + name: "requestId", + type: "uint256", }, { - internalType: "address", - name: "to", - type: "address", + internalType: "uint256[]", + name: "randomWords", + type: "uint256[]", }, + ], + name: "rawFulfillRandomWords", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "amount", + name: "", type: "uint256", }, ], - name: "transferFrom", + name: "receiveRandomness", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "randomNumber", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, - ], - }, - DAIFaucet: { - address: "0x1Fa58B52326488D62A406E71DBaD839560e810fF", - abi: [ - { - inputs: [ - { - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, { inputs: [], - name: "amount", + name: "requestConfirmations", outputs: [ { - internalType: "uint256", + internalType: "uint16", name: "", - type: "uint256", + type: "uint16", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "balance", - outputs: [ + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - stateMutability: "view", + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "s_vrfCoordinator", + outputs: [ { - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "contract IVRFCoordinatorV2Plus", + name: "", + type: "address", }, ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_vrfCoordinator", type: "address", }, ], - name: "changeGovernor", + name: "setCoordinator", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "sortitionModule", outputs: [ { internalType: "address", @@ -430,228 +513,2379 @@ export default { }, { inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", + name: "subscriptionId", outputs: [ { - internalType: "contract IERC20", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { internalType: "address", - name: "", + name: "to", type: "address", }, ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", type: "function", }, ], }, - DisputeKitClassic: { - address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", + ChainlinkVRFCoordinator: { + address: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", abi: [ { - stateMutability: "payable", - type: "fallback", + inputs: [ + { + internalType: "address", + name: "blockhashStore", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", }, { - stateMutability: "payable", - type: "receive", + inputs: [ + { + internalType: "uint256", + name: "internalBalance", + type: "uint256", + }, + { + internalType: "uint256", + name: "externalBalance", + type: "uint256", + }, + ], + name: "BalanceInvariantViolated", + type: "error", }, { - inputs: [], - name: "AlreadyInitialized", + inputs: [ + { + internalType: "uint256", + name: "blockNum", + type: "uint256", + }, + ], + name: "BlockhashNotInStore", type: "error", }, { - inputs: [], - name: "FailedDelegateCall", + inputs: [ + { + internalType: "address", + name: "coordinatorAddress", + type: "address", + }, + ], + name: "CoordinatorAlreadyRegistered", type: "error", }, { inputs: [ { internalType: "address", - name: "implementation", + name: "coordinatorAddress", type: "address", }, ], - name: "InvalidImplementation", + name: "CoordinatorNotRegistered", type: "error", }, { inputs: [], - name: "NotInitializing", + name: "FailedToSendNative", type: "error", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", + name: "FailedToTransferLink", type: "error", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint32", + name: "have", + type: "uint32", + }, + { + internalType: "uint32", + name: "want", + type: "uint32", }, ], - name: "UUPSUnsupportedProxiableUUID", + name: "GasLimitTooBig", type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "gasPrice", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_choice", + name: "maxGas", type: "uint256", }, ], - name: "ChoiceFunded", - type: "event", + name: "GasPriceExceeded", + type: "error", + }, + { + inputs: [], + name: "IncorrectCommitment", + type: "error", + }, + { + inputs: [], + name: "IndexOutOfRange", + type: "error", + }, + { + inputs: [], + name: "InsufficientBalance", + type: "error", + }, + { + inputs: [], + name: "InvalidCalldata", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - indexed: true, internalType: "address", - name: "_juror", + name: "consumer", type: "address", }, + ], + name: "InvalidConsumer", + type: "error", + }, + { + inputs: [], + name: "InvalidExtraArgsTag", + type: "error", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "int256", + name: "linkWei", + type: "int256", }, ], - name: "CommitCast", - type: "event", + name: "InvalidLinkWeiPrice", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint8", + name: "premiumPercentage", + type: "uint8", }, { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "uint8", + name: "max", + type: "uint8", }, + ], + name: "InvalidPremiumPercentage", + type: "error", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint16", + name: "have", + type: "uint16", }, { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", + internalType: "uint16", + name: "min", + type: "uint16", }, { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "uint16", + name: "max", + type: "uint16", }, ], - name: "Contribution", - type: "event", + name: "InvalidRequestConfirmations", + type: "error", + }, + { + inputs: [], + name: "InvalidSubscription", + type: "error", + }, + { + inputs: [], + name: "LinkAlreadySet", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + internalType: "uint32", + name: "flatFeeLinkDiscountPPM", + type: "uint32", }, { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint32", + name: "flatFeeNativePPM", + type: "uint32", }, ], - name: "DisputeCreation", - type: "event", + name: "LinkDiscountTooHigh", + type: "error", + }, + { + inputs: [], + name: "LinkNotSet", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: false, + internalType: "uint256", + name: "have", + type: "uint256", + }, + { + internalType: "uint32", + name: "max", + type: "uint32", + }, + ], + name: "MsgDataTooBig", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "proposedOwner", + type: "address", + }, + ], + name: "MustBeRequestedOwner", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "MustBeSubOwner", + type: "error", + }, + { + inputs: [], + name: "NoCorrespondingRequest", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + ], + name: "NoSuchProvingKey", + type: "error", + }, + { + inputs: [ + { + internalType: "uint32", + name: "have", + type: "uint32", + }, + { + internalType: "uint32", + name: "want", + type: "uint32", + }, + ], + name: "NumWordsTooBig", + type: "error", + }, + { + inputs: [], + name: "OnlyCallableFromLink", + type: "error", + }, + { + inputs: [], + name: "PaymentTooLarge", + type: "error", + }, + { + inputs: [], + name: "PendingRequestExists", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + ], + name: "ProvingKeyAlreadyRegistered", + type: "error", + }, + { + inputs: [], + name: "Reentrant", + type: "error", + }, + { + inputs: [], + name: "TooManyConsumers", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + indexed: false, + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", + }, + { + indexed: false, + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + { + indexed: false, + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + indexed: false, + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", + }, + ], + name: "ConfigSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "coordinatorAddress", + type: "address", + }, + ], + name: "CoordinatorDeregistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "coordinatorAddress", + type: "address", + }, + ], + name: "CoordinatorRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "requestId", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + ], + name: "FallbackWeiPerUnitLinkUsed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "FundsRecovered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newCoordinator", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + name: "MigrationCompleted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "NativeFundsRecovered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "OwnershipTransferRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, + ], + name: "ProvingKeyDeregistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, + ], + name: "ProvingKeyRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "outputSeed", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint96", + name: "payment", + type: "uint96", + }, + { + indexed: false, + internalType: "bool", + name: "nativePayment", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "success", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "onlyPremium", + type: "bool", + }, + ], + name: "RandomWordsFulfilled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "requestId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "preSeed", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + indexed: false, + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + indexed: false, + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RandomWordsRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountLink", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountNative", + type: "uint256", + }, + ], + name: "SubscriptionCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "SubscriptionConsumerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "SubscriptionConsumerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "SubscriptionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "oldBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "SubscriptionFunded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "oldNativeBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newNativeBalance", + type: "uint256", + }, + ], + name: "SubscriptionFundedWithNative", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "SubscriptionOwnerTransferRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "SubscriptionOwnerTransferred", + type: "event", + }, + { + inputs: [], + name: "BLOCKHASH_STORE", + outputs: [ + { + internalType: "contract BlockhashStoreInterface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LINK", + outputs: [ + { + internalType: "contract LinkTokenInterface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LINK_NATIVE_FEED", + outputs: [ + { + internalType: "contract AggregatorV3Interface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_CONSUMERS", + outputs: [ + { + internalType: "uint16", + name: "", + type: "uint16", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_NUM_WORDS", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_REQUEST_CONFIRMATIONS", + outputs: [ + { + internalType: "uint16", + name: "", + type: "uint16", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + name: "acceptSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "addConsumer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "cancelSubscription", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "createSubscription", + outputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "deregisterMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[2]", + name: "publicProvingKey", + type: "uint256[2]", + }, + ], + name: "deregisterProvingKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256[2]", + name: "pk", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "gamma", + type: "uint256[2]", + }, + { + internalType: "uint256", + name: "c", + type: "uint256", + }, + { + internalType: "uint256", + name: "s", + type: "uint256", + }, + { + internalType: "uint256", + name: "seed", + type: "uint256", + }, + { + internalType: "address", + name: "uWitness", + type: "address", + }, + { + internalType: "uint256[2]", + name: "cGammaWitness", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "sHashWitness", + type: "uint256[2]", + }, + { + internalType: "uint256", + name: "zInv", + type: "uint256", + }, + ], + internalType: "struct VRF.Proof", + name: "proof", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "blockNum", + type: "uint64", + }, + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + ], + internalType: "struct VRFTypes.RequestCommitmentV2Plus", + name: "rc", + type: "tuple", + }, + { + internalType: "bool", + name: "onlyPremium", + type: "bool", + }, + ], + name: "fulfillRandomWords", + outputs: [ + { + internalType: "uint96", + name: "payment", + type: "uint96", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + name: "fundSubscriptionWithNative", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "startIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxCount", + type: "uint256", + }, + ], + name: "getActiveSubscriptionIds", + outputs: [ + { + internalType: "uint256[]", + name: "ids", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + name: "getSubscription", + outputs: [ + { + internalType: "uint96", + name: "balance", + type: "uint96", + }, + { + internalType: "uint96", + name: "nativeBalance", + type: "uint96", + }, + { + internalType: "uint64", + name: "reqCount", + type: "uint64", + }, + { + internalType: "address", + name: "subOwner", + type: "address", + }, + { + internalType: "address[]", + name: "consumers", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[2]", + name: "publicKey", + type: "uint256[2]", + }, + ], + name: "hashOfKey", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "address", + name: "newCoordinator", + type: "address", + }, + ], + name: "migrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "onTokenTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + name: "ownerCancelSubscription", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + ], + name: "pendingRequestExists", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "to", + type: "address", + }, + ], + name: "recoverNativeFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "registerMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[2]", + name: "publicProvingKey", + type: "uint256[2]", + }, + { + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, + ], + name: "registerProvingKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "removeConsumer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "uint16", + name: "requestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + ], + internalType: "struct VRFV2PlusClient.RandomWordsRequest", + name: "req", + type: "tuple", + }, + ], + name: "requestRandomWords", + outputs: [ + { + internalType: "uint256", + name: "requestId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "requestSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "s_config", + outputs: [ + { + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", + }, + { + internalType: "bool", + name: "reentrancyLock", + type: "bool", + }, + { + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", + }, + { + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_currentSubNonce", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_fallbackWeiPerUnitLink", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "s_provingKeyHashes", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "s_provingKeys", + outputs: [ + { + internalType: "bool", + name: "exists", + type: "bool", + }, + { + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "s_requestCommitments", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_totalBalance", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_totalNativeBalance", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", + }, + { + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", + }, + { + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", + }, + ], + name: "setConfig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "link", + type: "address", + }, + { + internalType: "address", + name: "linkNativeFeed", + type: "address", + }, + ], + name: "setLINKAndLINKNativeFeed", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + name: "withdrawNative", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + }, + DAI: { + address: "0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + ], + }, + DAIFaucet: { + address: "0x1Fa58B52326488D62A406E71DBaD839560e810fF", + abi: [ + { + inputs: [ + { + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "amount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "balance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "changeAmount", + outputs: [], + stateMutability: "nonpayable", + 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: [], + name: "request", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "withdrewAlready", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + DisputeKitClassic: { + address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_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", @@ -1313,6 +3547,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -1355,6 +3596,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -1373,6 +3627,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -1426,7 +3693,7 @@ export default { ], }, DisputeKitClassic_Implementation: { - address: "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", + address: "0xCd4B2aD853027DbF7629003242CD609BDdaA89E1", abi: [ { inputs: [], @@ -2259,6 +4526,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -2301,6 +4575,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -2319,6 +4606,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -2828,6 +5128,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], name: "proxiableUUID", @@ -2901,6 +5208,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -2920,7 +5240,7 @@ export default { ], }, DisputeTemplateRegistry_Implementation: { - address: "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", + address: "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", abi: [ { inputs: [], @@ -3065,6 +5385,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], name: "proxiableUUID", @@ -3138,6 +5465,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, ], }, DisputeTemplateRegistry_Proxy: { @@ -3299,6 +5639,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], name: "proxiableUUID", @@ -3348,6 +5695,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -3367,7 +5727,7 @@ export default { ], }, EvidenceModule_Implementation: { - address: "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", + address: "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", abi: [ { inputs: [], @@ -3493,6 +5853,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], name: "proxiableUUID", @@ -3542,6 +5909,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, ], }, EvidenceModule_Proxy: { @@ -3604,11 +5984,6 @@ export default { name: "ArbitrationFeesNotEnough", type: "error", }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, { inputs: [], name: "CannotDisableClassicDK", @@ -3619,11 +5994,6 @@ export default { name: "CommitPeriodNotPassed", type: "error", }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, { inputs: [], name: "DisputeKitNotSupportedByCourt", @@ -3745,6 +6115,11 @@ export default { name: "StakingTransferFailed", type: "error", }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, { inputs: [], name: "TokenNotAccepted", @@ -3868,9 +6243,9 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", + internalType: "uint96", name: "_courtID", - type: "uint256", + type: "uint96", }, { indexed: true, @@ -5228,6 +7603,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -5427,6 +7809,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -5445,8 +7840,139 @@ export default { }, ], }, + KlerosCoreSnapshotProxy: { + address: "0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "totalStaked", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "core", + outputs: [ + { + internalType: "contract IKlerosCore", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, KlerosCore_Implementation: { - address: "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", + address: "0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7", abi: [ { inputs: [], @@ -5473,11 +7999,6 @@ export default { name: "ArbitrationFeesNotEnough", type: "error", }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, { inputs: [], name: "CannotDisableClassicDK", @@ -5488,11 +8009,6 @@ export default { name: "CommitPeriodNotPassed", type: "error", }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, { inputs: [], name: "DisputeKitNotSupportedByCourt", @@ -5614,6 +8130,11 @@ export default { name: "StakingTransferFailed", type: "error", }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, { inputs: [], name: "TokenNotAccepted", @@ -5737,9 +8258,9 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", + internalType: "uint96", name: "_courtID", - type: "uint256", + type: "uint96", }, { indexed: true, @@ -7097,6 +9618,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -7296,6 +9824,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, ], }, KlerosCore_Proxy: { @@ -7805,15 +10346,95 @@ export default { type: "address", }, ], - name: "allowance", + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { @@ -7825,11 +10446,11 @@ export default { }, { internalType: "uint256", - name: "amount", + name: "addedValue", type: "uint256", }, ], - name: "approve", + name: "increaseAllowance", outputs: [ { internalType: "bool", @@ -7841,19 +10462,26 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "name", + outputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "string", + name: "", + type: "string", }, ], - name: "balanceOf", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -7861,12 +10489,12 @@ export default { }, { inputs: [], - name: "decimals", + name: "totalSupply", outputs: [ { - internalType: "uint8", + internalType: "uint256", name: "", - type: "uint8", + type: "uint256", }, ], stateMutability: "view", @@ -7876,16 +10504,16 @@ export default { inputs: [ { internalType: "address", - name: "spender", + name: "to", type: "address", }, { internalType: "uint256", - name: "subtractedValue", + name: "amount", type: "uint256", }, ], - name: "decreaseAllowance", + name: "transfer", outputs: [ { internalType: "bool", @@ -7900,16 +10528,21 @@ export default { inputs: [ { internalType: "address", - name: "spender", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", type: "address", }, { internalType: "uint256", - name: "addedValue", + name: "amount", type: "uint256", }, ], - name: "increaseAllowance", + name: "transferFrom", outputs: [ { internalType: "bool", @@ -7920,22 +10553,167 @@ export default { stateMutability: "nonpayable", type: "function", }, + ], + }, + PolicyRegistry: { + address: "0x2668c46A14af8997417138B064ca1bEB70769585", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, { inputs: [], - name: "name", - outputs: [ + 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: "", + 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: [], - name: "symbol", + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "policies", outputs: [ { internalType: "string", @@ -7948,82 +10726,96 @@ export default { }, { inputs: [], - name: "totalSupply", + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + 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: "to", + name: "newImplementation", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "transfer", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "version", outputs: [ { - internalType: "bool", + internalType: "string", name: "", - type: "bool", + type: "string", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", + name: "_implementation", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, ], }, - PolicyRegistry: { - address: "0x2668c46A14af8997417138B064ca1bEB70769585", + PolicyRegistry_Implementation: { + address: "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -8157,6 +10949,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -8230,6 +11029,24 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + PolicyRegistry_Proxy: { + address: "0x2668c46A14af8997417138B064ca1bEB70769585", + abi: [ { inputs: [ { @@ -8246,15 +11063,30 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - PolicyRegistry_Implementation: { - address: "0xB958113f96950C7806d584eFBed964288d46a0B8", + RandomizerOracle: { + address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", + abi: [], + }, + RandomizerRNG: { + address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -8316,38 +11148,26 @@ export default { 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", + internalType: "address", + name: "newImplementation", + type: "address", }, ], - name: "PolicyUpdate", + name: "Upgraded", type: "event", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "callbackGasLimit", + outputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [ @@ -8377,6 +11197,11 @@ export default { }, { inputs: [ + { + internalType: "contract IRandomizer", + name: "_randomizer", + type: "address", + }, { internalType: "address", name: "_governor", @@ -8388,20 +11213,33 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { internalType: "uint256", - name: "", + name: "requestId", type: "uint256", }, ], - name: "policies", + name: "randomNumbers", outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "number", + type: "uint256", }, ], stateMutability: "view", @@ -8409,14 +11247,64 @@ export default { }, { inputs: [], - name: "proxiableUUID", + name: "randomizer", outputs: [ { - internalType: "bytes32", + 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", }, @@ -8424,21 +11312,56 @@ export default { inputs: [ { internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, + ], + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "string", - name: "_courtName", - type: "string", + internalType: "address", + name: "requester", + type: "address", }, + ], + name: "requesterToID", + outputs: [ { - internalType: "string", - name: "_policy", - type: "string", + 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: "setPolicy", + name: "setRandomizer", outputs: [], stateMutability: "nonpayable", type: "function", @@ -8461,11 +11384,6 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - PolicyRegistry_Proxy: { - address: "0x2668c46A14af8997417138B064ca1bEB70769585", - abi: [ { inputs: [ { @@ -8482,30 +11400,15 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - RandomizerOracle: { - address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - abi: [], - }, - RandomizerRNG: { - address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", + RandomizerRNG_Implementation: { + address: "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -8744,191 +11647,382 @@ export default { inputs: [ { internalType: "address", - name: "requester", + 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", + }, + ], + }, + RandomizerRNG_Proxy: { + address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", + 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", + }, + ], + }, + SortitionModule: { + address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "enum ISortitionModule.Phase", + name: "_phase", + type: "uint8", + }, + ], + name: "NewPhase", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_courtID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "StakeDelayedAlreadyTransferredDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: 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", }, - ], - name: "requesterToID", - outputs: [ { + indexed: false, internalType: "uint256", - name: "requestId", + name: "_courtID", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "_callbackGasLimit", + name: "_amount", type: "uint256", }, ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "StakeDelayedNotTransferred", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_randomizer", + name: "_address", type: "address", }, - ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + indexed: false, + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", }, { - internalType: "bytes", - name: "data", - type: "bytes", + indexed: false, + internalType: "bool", + name: "_unlock", + type: "bool", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", + name: "StakeLocked", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_implementation", + name: "_address", type: "address", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "_courtID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amountAllCourts", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - RandomizerRNG_Implementation: { - address: "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "StakeSet", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "implementation", + name: "newImplementation", type: "address", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "Upgraded", + type: "event", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_maxDrawingTime", + type: "uint256", }, ], - name: "Initialized", - type: "event", + name: "changeMaxDrawingTime", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ { internalType: "uint256", - name: "", + name: "_minStakingTime", type: "uint256", }, ], - stateMutability: "view", + name: "changeMinStakingTime", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_governor", + internalType: "contract RNG", + name: "_rng", type: "address", }, + { + internalType: "uint256", + name: "_rngLookahead", + type: "uint256", + }, ], - name: "changeGovernor", + name: "changeRandomNumberGenerator", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "core", outputs: [ { - internalType: "address", + internalType: "contract KlerosCore", name: "", type: "address", }, @@ -8939,47 +12033,59 @@ export default { { inputs: [ { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", + name: "createDisputeHook", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + inputs: [ { internalType: "bytes32", - name: "", + name: "_key", type: "bytes32", }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, ], - stateMutability: "view", + name: "createTree", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "delayedStakeReadIndex", + outputs: [ { internalType: "uint256", - name: "requestId", + name: "", type: "uint256", }, ], - name: "randomNumbers", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "delayedStakeWriteIndex", outputs: [ { internalType: "uint256", - name: "number", + name: "", type: "uint256", }, ], @@ -8987,63 +12093,76 @@ export default { type: "function", }, { - inputs: [], - name: "randomizer", - outputs: [ + inputs: [ { - internalType: "contract IRandomizer", + 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: [ + inputs: [], + name: "disputesWithoutJurors", + outputs: [ { internalType: "uint256", - name: "_id", + name: "", type: "uint256", }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ + { + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, { internalType: "uint256", - name: "_amount", + name: "_coreDisputeID", type: "uint256", }, - ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "", + name: "_nonce", type: "uint256", }, ], - name: "receiveRandomness", + name: "draw", outputs: [ { - internalType: "uint256", - name: "randomNumber", - type: "uint256", + internalType: "address", + name: "drawnAddress", + type: "address", }, ], stateMutability: "view", @@ -9053,11 +12172,11 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "_iterations", type: "uint256", }, ], - name: "requestRandomness", + name: "executeDelayedStakes", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9066,335 +12185,258 @@ export default { inputs: [ { internalType: "address", - name: "requester", + name: "_juror", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, ], - name: "requesterToID", + name: "getJurorBalance", outputs: [ { internalType: "uint256", - name: "requestId", + name: "totalStaked", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_callbackGasLimit", + name: "totalLocked", type: "uint256", }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_randomizer", - type: "address", + internalType: "uint256", + name: "stakedInCourt", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbCourts", + type: "uint256", }, ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "newImplementation", + name: "_juror", type: "address", }, + ], + name: "getJurorCourtIDs", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint96[]", + name: "", + type: "uint96[]", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, - ], - }, - RandomizerRNG_Proxy: { - address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627", - abi: [ { - inputs: [ + inputs: [], + name: "governor", + outputs: [ { internalType: "address", - name: "_implementation", + name: "", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - SortitionModule: { - address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "address", - name: "implementation", + name: "_governor", type: "address", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "contract KlerosCore", + name: "_core", + type: "address", }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_minStakingTime", + type: "uint256", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", + internalType: "uint256", + name: "_maxDrawingTime", + type: "uint256", }, - ], - name: "NewPhase", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "address", - name: "_address", + internalType: "contract RNG", + name: "_rng", type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, internalType: "uint256", - name: "_amount", + name: "_rngLookahead", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferred", - type: "event", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_juror", type: "address", }, + ], + name: "isJurorStaked", + outputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "account", type: "address", }, + ], + name: "jurors", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "stakedPnk", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "lockedPnk", type: "uint256", }, ], - name: "StakeDelayedNotTransferred", - type: "event", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastPhaseChange", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "jurorAccount", type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", + internalType: "uint96", + name: "courtId", + type: "uint96", }, + ], + name: "latestDelayedStakeIndex", + outputs: [ { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "StakeLocked", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_account", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_relativeAmount", type: "uint256", }, + ], + name: "lockStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maxDrawingTime", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeSet", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "minStakingTime", + outputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "uint256", - name: "_maxDrawingTime", + name: "_randomNumber", type: "uint256", }, ], - name: "changeMaxDrawingTime", + name: "notifyRandomNumber", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", + inputs: [], + name: "passPhase", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9402,29 +12444,29 @@ export default { { inputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "_account", type: "address", }, { internalType: "uint256", - name: "_rngLookahead", + name: "_relativeAmount", type: "uint256", }, ], - name: "changeRandomNumberGenerator", + name: "penalizeStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "core", + name: "phase", outputs: [ { - internalType: "contract KlerosCore", + internalType: "enum ISortitionModule.Phase", name: "", - type: "address", + type: "uint8", }, ], stateMutability: "view", @@ -9443,32 +12485,27 @@ export default { type: "uint256", }, ], - name: "createDisputeHook", + name: "postDrawHook", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "proxiableUUID", + outputs: [ { internalType: "bytes32", - name: "_key", + name: "", type: "bytes32", }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "delayedStakeReadIndex", + name: "randomNumber", outputs: [ { internalType: "uint256", @@ -9481,7 +12518,7 @@ export default { }, { inputs: [], - name: "delayedStakeWriteIndex", + name: "randomNumberRequestBlock", outputs: [ { internalType: "uint256", @@ -9493,50 +12530,86 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "rng", + outputs: [ + { + internalType: "contract RNG", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rngLookahead", + outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - name: "delayedStakes", - outputs: [ + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "account", + name: "_account", + type: "address", + }, + ], + name: "setJurorInactive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", type: "address", }, { internalType: "uint96", - name: "courtID", + name: "_courtID", type: "uint96", }, { internalType: "uint256", - name: "stake", + name: "_newStake", type: "uint256", }, { internalType: "bool", - name: "alreadyTransferred", + name: "_alreadyTransferred", type: "bool", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", + name: "setStake", outputs: [ { internalType: "uint256", - name: "", + name: "pnkDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkWithdrawal", type: "uint256", }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { @@ -9547,38 +12620,20 @@ export default { type: "bytes32", }, { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", + internalType: "bytes32", + name: "_ID", + type: "bytes32", }, ], - name: "draw", + name: "stakeOf", outputs: [ - { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_iterations", + name: "", type: "uint256", }, ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -9594,59 +12649,61 @@ export default { type: "uint96", }, ], - name: "getJurorBalance", + name: "stakeOf", outputs: [ { internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, - { - internalType: "uint256", - name: "stakedInCourt", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, { internalType: "uint256", - name: "nbCourts", + name: "_relativeAmount", type: "uint256", }, ], - stateMutability: "view", + name: "unlockStake", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_juror", + name: "newImplementation", type: "address", }, - ], - name: "getJurorCourtIDs", - outputs: [ { - internalType: "uint96[]", - name: "", - type: "uint96[]", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - stateMutability: "view", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [], - name: "governor", + name: "version", outputs: [ { - internalType: "address", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", @@ -9656,180 +12713,275 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_implementation", type: "address", }, { - internalType: "contract KlerosCore", - name: "_core", + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + ], + }, + SortitionModule_Implementation: { + address: "0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b", + 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: "uint256", - name: "_minStakingTime", - type: "uint256", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "contract RNG", - name: "_rng", + 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: "_rngLookahead", + name: "_courtID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "StakeDelayedAlreadyTransferredDeposited", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_juror", + name: "_address", type: "address", }, - ], - name: "isJurorStaked", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "StakeDelayedAlreadyTransferredWithdrawn", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "account", + name: "_address", type: "address", }, - ], - name: "jurors", - outputs: [ { + indexed: false, internalType: "uint256", - name: "stakedPnk", + name: "_courtID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "lockedPnk", + name: "_amount", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "StakeDelayedNotTransferred", + type: "event", }, { - inputs: [], - name: "lastPhaseChange", - outputs: [ + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, { + indexed: false, internalType: "uint256", - name: "", + name: "_relativeAmount", type: "uint256", }, + { + indexed: false, + internalType: "bool", + name: "_unlock", + type: "bool", + }, ], - stateMutability: "view", - type: "function", + name: "StakeLocked", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "jurorAccount", + name: "_address", type: "address", }, { - internalType: "uint96", - name: "courtId", - type: "uint96", + indexed: false, + internalType: "uint256", + name: "_courtID", + type: "uint256", }, - ], - name: "latestDelayedStakeIndex", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amountAllCourts", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "StakeSet", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_account", + name: "newImplementation", type: "address", }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Upgraded", + type: "event", }, { - inputs: [], - name: "maxDrawingTime", - outputs: [ + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - stateMutability: "view", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "minStakingTime", - outputs: [ + inputs: [ { internalType: "uint256", - name: "", + name: "_maxDrawingTime", type: "uint256", }, ], - stateMutability: "view", + name: "changeMaxDrawingTime", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_randomNumber", + name: "_minStakingTime", type: "uint256", }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", + name: "changeMinStakingTime", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9837,29 +12989,29 @@ export default { { inputs: [ { - internalType: "address", - name: "_account", + internalType: "contract RNG", + name: "_rng", type: "address", }, { internalType: "uint256", - name: "_relativeAmount", + name: "_rngLookahead", type: "uint256", }, ], - name: "penalizeStake", + name: "changeRandomNumberGenerator", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "phase", + name: "core", outputs: [ { - internalType: "enum ISortitionModule.Phase", + internalType: "contract KlerosCore", name: "", - type: "uint8", + type: "address", }, ], stateMutability: "view", @@ -9878,40 +13030,32 @@ export default { type: "uint256", }, ], - name: "postDrawHook", + name: "createDisputeHook", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + inputs: [ { internalType: "bytes32", - name: "", + name: "_key", type: "bytes32", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - stateMutability: "view", + name: "createTree", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "randomNumberRequestBlock", + name: "delayedStakeReadIndex", outputs: [ { internalType: "uint256", @@ -9924,20 +13068,7 @@ export default { }, { inputs: [], - name: "rng", - outputs: [ - { - internalType: "contract RNG", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", + name: "delayedStakeWriteIndex", outputs: [ { internalType: "uint256", @@ -9951,58 +13082,48 @@ export default { { inputs: [ { - internalType: "address", - name: "_account", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "delayedStakes", + outputs: [ { internalType: "address", - name: "_account", + name: "account", type: "address", }, { internalType: "uint96", - name: "_courtID", + name: "courtID", type: "uint96", }, { internalType: "uint256", - name: "_newStake", + name: "stake", type: "uint256", }, { internalType: "bool", - name: "_alreadyTransferred", + name: "alreadyTransferred", type: "bool", }, ], - name: "setStake", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "disputesWithoutJurors", outputs: [ { internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", + name: "", type: "uint256", }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -10013,60 +13134,36 @@ export default { type: "bytes32", }, { - internalType: "bytes32", - name: "_ID", - type: "bytes32", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "stakeOf", - outputs: [ { internalType: "uint256", - name: "", + name: "_nonce", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ + name: "draw", + outputs: [ { internalType: "address", - name: "_juror", + name: "drawnAddress", type: "address", }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, ], stateMutability: "view", type: "function", }, { inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, { internalType: "uint256", - name: "_relativeAmount", + name: "_iterations", type: "uint256", }, ], - name: "unlockStake", + name: "executeDelayedStakes", outputs: [], stateMutability: "nonpayable", type: "function", @@ -10075,274 +13172,258 @@ export default { inputs: [ { internalType: "address", - name: "newImplementation", + name: "_juror", type: "address", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ + name: "getJurorBalance", + outputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "totalStaked", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "totalLocked", + type: "uint256", }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModule_Implementation: { - address: "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256", + name: "stakedInCourt", + type: "uint256", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + { + internalType: "uint256", + name: "nbCourts", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "address", + name: "_juror", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ + name: "getJurorCourtIDs", + outputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint96[]", + name: "", + type: "uint96[]", }, ], - name: "Initialized", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "governor", + outputs: [ { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", + internalType: "address", + name: "", + type: "address", }, ], - name: "NewPhase", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_governor", + type: "address", + }, + { + internalType: "contract KlerosCore", + name: "_core", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_minStakingTime", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "_maxDrawingTime", + type: "uint256", + }, + { + internalType: "contract RNG", + name: "_rng", + type: "address", + }, + { + internalType: "uint256", + name: "_rngLookahead", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferred", - type: "event", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_juror", type: "address", }, + ], + name: "isJurorStaked", + outputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "account", type: "address", }, + ], + name: "jurors", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "stakedPnk", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "lockedPnk", type: "uint256", }, ], - name: "StakeDelayedNotTransferred", - type: "event", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastPhaseChange", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "jurorAccount", type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", + internalType: "uint96", + name: "courtId", + type: "uint96", }, + ], + name: "latestDelayedStakeIndex", + outputs: [ { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "StakeLocked", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_account", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_relativeAmount", type: "uint256", }, + ], + name: "lockStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maxDrawingTime", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeSet", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "minStakingTime", + outputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "uint256", - name: "_maxDrawingTime", + name: "_randomNumber", type: "uint256", }, ], - name: "changeMaxDrawingTime", + name: "notifyRandomNumber", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - ], - name: "changeMinStakingTime", + inputs: [], + name: "passPhase", outputs: [], stateMutability: "nonpayable", type: "function", @@ -10350,29 +13431,29 @@ export default { { inputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "_account", type: "address", }, { internalType: "uint256", - name: "_rngLookahead", + name: "_relativeAmount", type: "uint256", }, ], - name: "changeRandomNumberGenerator", + name: "penalizeStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "core", + name: "phase", outputs: [ { - internalType: "contract KlerosCore", + internalType: "enum ISortitionModule.Phase", name: "", - type: "address", + type: "uint8", }, ], stateMutability: "view", @@ -10391,37 +13472,58 @@ export default { type: "uint256", }, ], - name: "createDisputeHook", + name: "postDrawHook", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "proxiableUUID", + outputs: [ { internalType: "bytes32", - name: "_key", + 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: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "delayedStakeReadIndex", + name: "rng", outputs: [ { - internalType: "uint256", + internalType: "contract RNG", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -10429,7 +13531,7 @@ export default { }, { inputs: [], - name: "delayedStakeWriteIndex", + name: "rngLookahead", outputs: [ { internalType: "uint256", @@ -10443,48 +13545,58 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, ], - name: "delayedStakes", - outputs: [ + name: "setJurorInactive", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "account", + name: "_account", type: "address", }, { internalType: "uint96", - name: "courtID", + name: "_courtID", type: "uint96", }, { internalType: "uint256", - name: "stake", + name: "_newStake", type: "uint256", }, { internalType: "bool", - name: "alreadyTransferred", + name: "_alreadyTransferred", type: "bool", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", + name: "setStake", outputs: [ { internalType: "uint256", - name: "", + name: "pnkDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkWithdrawal", type: "uint256", }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { @@ -10495,36 +13607,60 @@ export default { type: "bytes32", }, { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "bytes32", + name: "_ID", + type: "bytes32", }, + ], + name: "stakeOf", + outputs: [ { internalType: "uint256", - name: "_nonce", + name: "", type: "uint256", }, ], - name: "draw", - outputs: [ + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "drawnAddress", + name: "_juror", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + ], + name: "stakeOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, ], stateMutability: "view", type: "function", }, { inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, { internalType: "uint256", - name: "_iterations", + name: "_relativeAmount", type: "uint256", }, ], - name: "executeDelayedStakes", + name: "unlockStake", outputs: [], stateMutability: "nonpayable", type: "function", @@ -10533,120 +13669,222 @@ export default { inputs: [ { internalType: "address", - name: "_juror", + name: "newImplementation", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "getJurorBalance", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "version", outputs: [ { - internalType: "uint256", - name: "totalStaked", - type: "uint256", + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + SortitionModule_Proxy: { + address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", }, { - internalType: "uint256", - name: "totalLocked", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + }, + TransactionBatcher: { + address: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", + abi: [ + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", }, { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", + internalType: "uint256[]", + name: "values", + type: "uint256[]", }, { - internalType: "uint256", - name: "nbCourts", - type: "uint256", + internalType: "bytes[]", + name: "datas", + type: "bytes[]", }, ], - stateMutability: "view", + name: "batchSend", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_juror", - type: "address", + internalType: "address[]", + name: "targets", + type: "address[]", }, - ], - name: "getJurorCourtIDs", - outputs: [ { - internalType: "uint96[]", - name: "", - type: "uint96[]", + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "datas", + type: "bytes[]", }, ], - stateMutability: "view", + name: "batchSendUnchecked", + outputs: [], + stateMutability: "payable", type: "function", }, + ], + }, + WETH: { + address: "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", + abi: [ { - inputs: [], - name: "governor", - outputs: [ + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", type: "address", }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, ], - stateMutability: "view", - type: "function", + name: "Approval", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_governor", + name: "from", type: "address", }, { - internalType: "contract KlerosCore", - name: "_core", + indexed: true, + internalType: "address", + name: "to", type: "address", }, { + indexed: false, internalType: "uint256", - name: "_minStakingTime", + name: "value", type: "uint256", }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", + internalType: "address", + name: "owner", + type: "address", }, { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "spender", type: "address", }, + ], + name: "allowance", + outputs: [ { internalType: "uint256", - name: "_rngLookahead", + name: "", type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_juror", + name: "spender", type: "address", }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - name: "isJurorStaked", + name: "approve", outputs: [ { internalType: "bool", @@ -10654,7 +13892,7 @@ export default { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { @@ -10665,16 +13903,11 @@ export default { type: "address", }, ], - name: "jurors", + name: "balanceOf", outputs: [ { internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", + name: "", type: "uint256", }, ], @@ -10683,12 +13916,12 @@ export default { }, { inputs: [], - name: "lastPhaseChange", + name: "decimals", outputs: [ { - internalType: "uint256", + internalType: "uint8", name: "", - type: "uint256", + type: "uint8", }, ], stateMutability: "view", @@ -10698,52 +13931,58 @@ export default { inputs: [ { internalType: "address", - name: "jurorAccount", + name: "spender", type: "address", }, { - internalType: "uint96", - name: "courtId", - type: "uint96", + internalType: "uint256", + name: "subtractedValue", + type: "uint256", }, ], - name: "latestDelayedStakeIndex", + name: "decreaseAllowance", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_account", + name: "spender", type: "address", }, { internalType: "uint256", - name: "_relativeAmount", + name: "addedValue", type: "uint256", }, ], - name: "lockStake", - outputs: [], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "maxDrawingTime", + name: "name", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -10751,94 +13990,107 @@ export default { }, { inputs: [], - name: "minStakingTime", + name: "symbol", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "totalSupply", + outputs: [ { internalType: "uint256", - name: "_randomNumber", + name: "", type: "uint256", }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_account", + name: "to", type: "address", }, { internalType: "uint256", - name: "_relativeAmount", + name: "amount", type: "uint256", }, ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", + name: "transfer", outputs: [ { - internalType: "enum ISortitionModule.Phase", + internalType: "bool", name: "", - type: "uint8", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, { internalType: "uint256", - name: "", + name: "amount", type: "uint256", }, + ], + name: "transferFrom", + outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - name: "postDrawHook", - outputs: [], stateMutability: "nonpayable", type: "function", }, + ], + }, + WETHFaucet: { + address: "0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835", + abi: [ + { + inputs: [ + { + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, { inputs: [], - name: "proxiableUUID", + name: "amount", outputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], stateMutability: "view", @@ -10846,7 +14098,7 @@ export default { }, { inputs: [], - name: "randomNumber", + name: "balance", outputs: [ { internalType: "uint256", @@ -10857,14 +14109,40 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "changeAmount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [], - name: "randomNumberRequestBlock", + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -10872,10 +14150,17 @@ export default { }, { inputs: [], - name: "rng", + name: "request", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "token", outputs: [ { - internalType: "contract RNG", + internalType: "contract IERC20", name: "", type: "address", }, @@ -10885,93 +14170,116 @@ export default { }, { inputs: [], - name: "rngLookahead", + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "withdrewAlready", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], stateMutability: "view", type: "function", }, + ], + }, + VeaInboxArbToEthDevnet: { + address: "0xF6C5640de593fEf76129F1F1A863F7ddc65776C9", + abi: [ { inputs: [ + { + internalType: "uint256", + name: "_epochPeriod", + type: "uint256", + }, { internalType: "address", - name: "_account", + name: "_veaOutboxArbToEth", type: "address", }, ], - name: "setJurorInactive", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { + anonymous: false, 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", + indexed: false, + internalType: "bytes", + name: "_nodeData", + type: "bytes", }, ], - name: "setStake", - outputs: [ + name: "MessageSent", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", + indexed: false, + internalType: "bytes32", + name: "_snapshot", + type: "bytes32", }, { + indexed: false, internalType: "uint256", - name: "pnkWithdrawal", + name: "_epoch", type: "uint256", }, { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", + indexed: false, + internalType: "uint64", + name: "_count", + type: "uint64", }, ], - stateMutability: "nonpayable", - type: "function", + name: "SnapshotSaved", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "_epochSent", + type: "uint256", }, { + indexed: false, internalType: "bytes32", - name: "_ID", + name: "_ticketId", type: "bytes32", }, ], - name: "stakeOf", + name: "SnapshotSent", + type: "event", + }, + { + inputs: [], + name: "count", outputs: [ { - internalType: "uint256", + internalType: "uint64", name: "", - type: "uint256", + type: "uint64", }, ], stateMutability: "view", @@ -10980,21 +14288,16 @@ export default { { inputs: [ { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "_timestamp", + type: "uint256", }, ], - name: "stakeOf", + name: "epochAt", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -11002,137 +14305,183 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, + inputs: [], + name: "epochFinalized", + outputs: [ { internalType: "uint256", - name: "_relativeAmount", + name: "epoch", type: "uint256", }, ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "epochNow", + outputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "epoch", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "epochPeriod", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "upgradeToAndCall", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "saveSnapshot", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, - ], - }, - SortitionModule_Proxy: { - address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD", - abi: [ { inputs: [ { internalType: "address", - name: "_implementation", + name: "_to", type: "address", }, + { + internalType: "bytes4", + name: "_fnSelector", + type: "bytes4", + }, { internalType: "bytes", name: "_data", type: "bytes", }, ], + name: "sendMessage", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + type: "function", }, - ], - }, - TransactionBatcher: { - address: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - abi: [ { inputs: [ { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", + internalType: "uint256", + name: "_epoch", + type: "uint256", }, { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", + components: [ + { + internalType: "bytes32", + name: "stateRoot", + type: "bytes32", + }, + { + internalType: "address", + name: "claimer", + type: "address", + }, + { + internalType: "uint32", + name: "timestampClaimed", + type: "uint32", + }, + { + internalType: "uint32", + name: "timestampVerification", + type: "uint32", + }, + { + internalType: "uint32", + name: "blocknumberVerification", + type: "uint32", + }, + { + internalType: "enum Party", + name: "honest", + type: "uint8", + }, + { + internalType: "address", + name: "challenger", + type: "address", + }, + ], + internalType: "struct Claim", + name: "_claim", + type: "tuple", }, ], - name: "batchSend", + name: "sendSnapshot", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address[]", - name: "targets", - type: "address[]", + internalType: "uint256", + name: "epoch", + type: "uint256", }, + ], + name: "snapshots", + outputs: [ { - internalType: "uint256[]", - name: "values", - type: "uint256[]", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "veaOutboxArbToEth", + outputs: [ { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", + internalType: "address", + name: "", + type: "address", }, ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, ], }, - WETH: { - address: "0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511", + VeaInboxArbToEthTestnet: { + address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06", abi: [ { inputs: [ { - internalType: "string", - name: "_name", - type: "string", + internalType: "uint256", + name: "_epochPeriod", + type: "uint256", }, { - internalType: "string", - name: "_symbol", - type: "string", + internalType: "address", + name: "_veaOutboxArbToEth", + type: "address", }, ], stateMutability: "nonpayable", @@ -11141,72 +14490,68 @@ export default { { anonymous: false, inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, { indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "bytes", + name: "_nodeData", + type: "bytes", }, ], - name: "Approval", + name: "MessageSent", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", + indexed: false, + internalType: "bytes32", + name: "_snapshot", + type: "bytes32", }, { indexed: false, internalType: "uint256", - name: "value", + name: "_epoch", type: "uint256", }, + { + indexed: false, + internalType: "uint64", + name: "_count", + type: "uint64", + }, ], - name: "Transfer", + name: "SnapshotSaved", type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "owner", - type: "address", + indexed: true, + internalType: "uint256", + name: "_epochSent", + type: "uint256", }, { - internalType: "address", - name: "spender", - type: "address", + indexed: false, + internalType: "bytes32", + name: "_ticketId", + type: "bytes32", }, ], - name: "allowance", + name: "SnapshotSent", + type: "event", + }, + { + inputs: [], + name: "count", outputs: [ { - internalType: "uint256", + internalType: "uint64", name: "", - type: "uint256", + type: "uint64", }, ], stateMutability: "view", @@ -11214,41 +14559,43 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, { internalType: "uint256", - name: "amount", + name: "_timestamp", type: "uint256", }, ], - name: "approve", + name: "epochAt", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "epoch", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "epochFinalized", + outputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "epoch", + type: "uint256", }, ], - name: "balanceOf", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "epochNow", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -11257,36 +14604,48 @@ export default { }, { inputs: [], - name: "decimals", + name: "epochPeriod", outputs: [ { - internalType: "uint8", + internalType: "uint256", name: "", - type: "uint8", + type: "uint256", }, ], stateMutability: "view", type: "function", }, + { + inputs: [], + name: "saveSnapshot", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { internalType: "address", - name: "spender", + name: "_to", type: "address", }, { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", + internalType: "bytes4", + name: "_fnSelector", + type: "bytes4", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "decreaseAllowance", + name: "sendMessage", outputs: [ { - internalType: "bool", + internalType: "uint64", name: "", - type: "bool", + type: "uint64", }, ], stateMutability: "nonpayable", @@ -11295,142 +14654,194 @@ export default { { inputs: [ { - internalType: "address", - name: "spender", - type: "address", + internalType: "uint256", + name: "_epoch", + type: "uint256", + }, + { + components: [ + { + internalType: "bytes32", + name: "stateRoot", + type: "bytes32", + }, + { + internalType: "address", + name: "claimer", + type: "address", + }, + { + internalType: "uint32", + name: "timestampClaimed", + type: "uint32", + }, + { + internalType: "uint32", + name: "timestampVerification", + type: "uint32", + }, + { + internalType: "uint32", + name: "blocknumberVerification", + type: "uint32", + }, + { + internalType: "enum Party", + name: "honest", + type: "uint8", + }, + { + internalType: "address", + name: "challenger", + type: "address", + }, + ], + internalType: "struct Claim", + name: "_claim", + type: "tuple", }, + ], + name: "sendSnapshot", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "addedValue", + name: "epoch", type: "uint256", }, ], - name: "increaseAllowance", + name: "snapshots", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "name", + name: "veaOutboxArbToEth", outputs: [ { - internalType: "string", + internalType: "address", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", type: "function", }, + ], + }, + VeaInboxArbToGnosisDevnet: { + address: "0xF6286b9C6c7F1B33Ea976FA43434027c7b8421A7", + abi: [ { - inputs: [], - name: "symbol", - outputs: [ + inputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "_epochPeriod", + type: "uint256", + }, + { + internalType: "address", + name: "_routerArbToGnosis", + type: "address", }, ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", }, { - inputs: [], - name: "totalSupply", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "bytes", + name: "_nodeData", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + name: "MessageSent", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "to", - type: "address", + indexed: false, + internalType: "bytes32", + name: "_snapshot", + type: "bytes32", }, { + indexed: false, internalType: "uint256", - name: "amount", + name: "_epoch", type: "uint256", }, - ], - name: "transfer", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "uint64", + name: "_count", + type: "uint64", }, ], - stateMutability: "nonpayable", - type: "function", + name: "SnapshotSaved", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { + indexed: true, internalType: "uint256", - name: "amount", + name: "_epochSent", type: "uint256", }, + { + indexed: false, + internalType: "bytes32", + name: "_ticketId", + type: "bytes32", + }, ], - name: "transferFrom", + name: "SnapshotSent", + type: "event", + }, + { + inputs: [], + name: "count", outputs: [ { - internalType: "bool", + internalType: "uint64", name: "", - type: "bool", + type: "uint64", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, - ], - }, - WETHFaucet: { - address: "0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835", - abi: [ { inputs: [ { - internalType: "contract IERC20", - name: "_token", - type: "address", + internalType: "uint256", + name: "_timestamp", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", + name: "epochAt", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -11439,11 +14850,11 @@ export default { }, { inputs: [], - name: "balance", + name: "epochFinalized", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -11451,34 +14862,34 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "epochNow", + outputs: [ { internalType: "uint256", - name: "_amount", + name: "epoch", type: "uint256", }, ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "epochPeriod", + outputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "governor", + name: "routerArbToGnosis", outputs: [ { internalType: "address", @@ -11491,27 +14902,96 @@ export default { }, { inputs: [], - name: "request", + name: "saveSnapshot", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "token", + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "bytes4", + name: "_fnSelector", + type: "bytes4", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "sendMessage", outputs: [ { - internalType: "contract IERC20", + internalType: "uint64", name: "", - type: "address", + type: "uint64", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "withdraw", + inputs: [ + { + internalType: "uint256", + name: "_epoch", + type: "uint256", + }, + { + internalType: "uint256", + name: "_gasLimit", + type: "uint256", + }, + { + components: [ + { + internalType: "bytes32", + name: "stateRoot", + type: "bytes32", + }, + { + internalType: "address", + name: "claimer", + type: "address", + }, + { + internalType: "uint32", + name: "timestampClaimed", + type: "uint32", + }, + { + internalType: "uint32", + name: "timestampVerification", + type: "uint32", + }, + { + internalType: "uint32", + name: "blocknumberVerification", + type: "uint32", + }, + { + internalType: "enum Party", + name: "honest", + type: "uint8", + }, + { + internalType: "address", + name: "challenger", + type: "address", + }, + ], + internalType: "struct Claim", + name: "_claim", + type: "tuple", + }, + ], + name: "sendSnapshot", outputs: [], stateMutability: "nonpayable", type: "function", @@ -11519,17 +14999,17 @@ export default { { inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "epoch", + type: "uint256", }, ], - name: "withdrewAlready", + name: "snapshots", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], stateMutability: "view", @@ -11537,8 +15017,8 @@ export default { }, ], }, - VeaInboxArbToEthDevnet: { - address: "0x77e95F54032f467eC45c48C6affc203f93858783", + VeaInboxArbToGnosisTestnet: { + address: "0x62403e9Fbac618301175C89fb21920e4FF235A6a", abi: [ { inputs: [ @@ -11549,7 +15029,7 @@ export default { }, { internalType: "address", - name: "_veaOutboxArbToEth", + name: "_routerArbToGnosis", type: "address", }, ], @@ -11684,6 +15164,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "routerArbToGnosis", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "saveSnapshot", @@ -11727,6 +15220,11 @@ export default { name: "_epoch", type: "uint256", }, + { + internalType: "uint256", + name: "_gasLimit", + type: "uint256", + }, { components: [ { @@ -11779,7 +15277,7 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -11794,19 +15292,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "veaOutboxArbToEth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, ], }, }, diff --git a/contracts/deployments/arbitrumSepoliaDevnet.ts b/contracts/deployments/arbitrumSepoliaDevnet.ts index 4bf1ba0b2..9a87cdd2b 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet.ts +++ b/contracts/deployments/arbitrumSepoliaDevnet.ts @@ -418,48 +418,103 @@ export default { }, ], }, - DAI: { - address: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", + ChainlinkRNG: { + address: "0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8", abi: [ { inputs: [ { - internalType: "string", - name: "_name", - type: "string", + internalType: "address", + name: "_governor", + type: "address", }, { - internalType: "string", - name: "_symbol", - type: "string", + internalType: "address", + name: "_sortitionModule", + type: "address", + }, + { + internalType: "address", + name: "_vrfCoordinator", + type: "address", + }, + { + internalType: "bytes32", + name: "_keyHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_subscriptionId", + type: "uint256", + }, + { + internalType: "uint16", + name: "_requestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "_callbackGasLimit", + type: "uint32", }, ], stateMutability: "nonpayable", type: "constructor", }, { - anonymous: false, inputs: [ { - indexed: true, + internalType: "address", + name: "have", + type: "address", + }, + { + internalType: "address", + name: "want", + type: "address", + }, + ], + name: "OnlyCoordinatorCanFulfill", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "have", + type: "address", + }, + { internalType: "address", name: "owner", type: "address", }, { - indexed: true, internalType: "address", - name: "spender", + name: "coordinator", type: "address", }, + ], + name: "OnlyOwnerOrCoordinator", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + anonymous: false, + inputs: [ { indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "address", + name: "vrfCoordinator", + type: "address", }, ], - name: "Approval", + name: "CoordinatorSet", type: "event", }, { @@ -477,117 +532,130 @@ export default { name: "to", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, ], - name: "Transfer", + name: "OwnershipTransferRequested", type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "owner", + name: "from", type: "address", }, { + indexed: true, internalType: "address", - name: "spender", + name: "to", type: "address", }, ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "OwnershipTransferred", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "spender", - type: "address", + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "amount", + name: "randomWord", type: "uint256", }, ], - name: "approve", - outputs: [ + name: "RequestFulfilled", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", }, ], + name: "RequestSent", + type: "event", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", + inputs: [], + name: "callbackGasLimit", outputs: [ { - internalType: "uint256", + internalType: "uint32", name: "", - type: "uint256", + type: "uint32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "decimals", - outputs: [ + inputs: [ { - internalType: "uint8", - name: "", - type: "uint8", + internalType: "uint32", + name: "_callbackGasLimit", + type: "uint32", }, ], - stateMutability: "view", + name: "changeCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "spender", + name: "_governor", type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", + internalType: "bytes32", + name: "_keyHash", + type: "bytes32", }, ], - name: "decreaseAllowance", - outputs: [ + name: "changeKeyHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint16", + name: "_requestConfirmations", + type: "uint16", }, ], + name: "changeRequestConfirmations", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -595,34 +663,49 @@ export default { inputs: [ { internalType: "address", - name: "spender", + name: "_sortitionModule", type: "address", }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "addedValue", + name: "_subscriptionId", type: "uint256", }, ], - name: "increaseAllowance", - outputs: [ + name: "changeSubscriptionId", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "_vrfCoordinator", + type: "address", }, ], + name: "changeVrfCoordinator", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "name", + name: "governor", outputs: [ { - internalType: "string", + internalType: "address", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", @@ -630,12 +713,12 @@ export default { }, { inputs: [], - name: "symbol", + name: "keyHash", outputs: [ { - internalType: "string", + internalType: "bytes32", name: "", - type: "string", + type: "bytes32", }, ], stateMutability: "view", @@ -643,7 +726,7 @@ export default { }, { inputs: [], - name: "totalSupply", + name: "lastRequestId", outputs: [ { internalType: "uint256", @@ -655,81 +738,68 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "owner", + outputs: [ { internalType: "address", - name: "to", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "amount", + name: "requestId", type: "uint256", }, ], - name: "transfer", + name: "randomNumbers", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "number", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, { internalType: "uint256", - name: "amount", + name: "requestId", type: "uint256", }, - ], - name: "transferFrom", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256[]", + name: "randomWords", + type: "uint256[]", }, ], + name: "rawFulfillRandomWords", + outputs: [], stateMutability: "nonpayable", type: "function", }, - ], - }, - DAIFaucet: { - address: "0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E", - abi: [ { inputs: [ { - internalType: "contract IERC20", - name: "_token", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", + name: "receiveRandomness", outputs: [ { internalType: "uint256", - name: "", + name: "randomNumber", type: "uint256", }, ], @@ -738,12 +808,12 @@ export default { }, { inputs: [], - name: "balance", + name: "requestConfirmations", outputs: [ { - internalType: "uint256", + internalType: "uint16", name: "", - type: "uint256", + type: "uint16", }, ], stateMutability: "view", @@ -753,31 +823,44 @@ export default { inputs: [ { internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "changeAmount", + name: "requestRandomness", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "s_vrfCoordinator", + outputs: [ + { + internalType: "contract IVRFCoordinatorV2Plus", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_vrfCoordinator", type: "address", }, ], - name: "changeGovernor", + name: "setCoordinator", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "sortitionModule", outputs: [ { internalType: "address", @@ -790,854 +873,932 @@ export default { }, { inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "token", + name: "subscriptionId", outputs: [ { - internalType: "contract IERC20", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { internalType: "address", - name: "", + name: "to", type: "address", }, ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", type: "function", }, ], }, - DisputeKitClassic: { - address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + ChainlinkVRFCoordinator: { + address: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", abi: [ { - stateMutability: "payable", - type: "fallback", + inputs: [ + { + internalType: "address", + name: "blockhashStore", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", }, { - stateMutability: "payable", - type: "receive", + inputs: [ + { + internalType: "uint256", + name: "internalBalance", + type: "uint256", + }, + { + internalType: "uint256", + name: "externalBalance", + type: "uint256", + }, + ], + name: "BalanceInvariantViolated", + type: "error", }, { - inputs: [], - name: "AlreadyInitialized", + inputs: [ + { + internalType: "uint256", + name: "blockNum", + type: "uint256", + }, + ], + name: "BlockhashNotInStore", type: "error", }, { - inputs: [], - name: "FailedDelegateCall", + inputs: [ + { + internalType: "address", + name: "coordinatorAddress", + type: "address", + }, + ], + name: "CoordinatorAlreadyRegistered", type: "error", }, { inputs: [ { internalType: "address", - name: "implementation", + name: "coordinatorAddress", type: "address", }, ], - name: "InvalidImplementation", + name: "CoordinatorNotRegistered", type: "error", }, { inputs: [], - name: "NotInitializing", + name: "FailedToSendNative", type: "error", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", + name: "FailedToTransferLink", type: "error", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint32", + name: "have", + type: "uint32", + }, + { + internalType: "uint32", + name: "want", + type: "uint32", }, ], - name: "UUPSUnsupportedProxiableUUID", + name: "GasLimitTooBig", type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "gasPrice", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_choice", + name: "maxGas", type: "uint256", }, ], - name: "ChoiceFunded", - type: "event", + name: "GasPriceExceeded", + type: "error", + }, + { + inputs: [], + name: "IncorrectCommitment", + type: "error", + }, + { + inputs: [], + name: "IndexOutOfRange", + type: "error", + }, + { + inputs: [], + name: "InsufficientBalance", + type: "error", + }, + { + inputs: [], + name: "InvalidCalldata", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - indexed: true, internalType: "address", - name: "_juror", + name: "consumer", type: "address", }, + ], + name: "InvalidConsumer", + type: "error", + }, + { + inputs: [], + name: "InvalidExtraArgsTag", + type: "error", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "int256", + name: "linkWei", + type: "int256", }, ], - name: "CommitCast", - type: "event", + name: "InvalidLinkWeiPrice", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint8", + name: "premiumPercentage", + type: "uint8", }, { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "uint8", + name: "max", + type: "uint8", }, + ], + name: "InvalidPremiumPercentage", + type: "error", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint16", + name: "have", + type: "uint16", }, { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", + internalType: "uint16", + name: "min", + type: "uint16", }, { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "uint16", + name: "max", + type: "uint16", }, ], - name: "Contribution", - type: "event", + name: "InvalidRequestConfirmations", + type: "error", + }, + { + inputs: [], + name: "InvalidSubscription", + type: "error", + }, + { + inputs: [], + name: "LinkAlreadySet", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint32", + name: "flatFeeLinkDiscountPPM", + type: "uint32", }, { - indexed: false, + internalType: "uint32", + name: "flatFeeNativePPM", + type: "uint32", + }, + ], + name: "LinkDiscountTooHigh", + type: "error", + }, + { + inputs: [], + name: "LinkNotSet", + type: "error", + }, + { + inputs: [ + { internalType: "uint256", - name: "_numberOfChoices", + name: "have", type: "uint256", }, { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint32", + name: "max", + type: "uint32", }, ], - name: "DisputeCreation", - type: "event", + name: "MsgDataTooBig", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "address", + name: "proposedOwner", + type: "address", }, ], - name: "Initialized", - type: "event", + name: "MustBeRequestedOwner", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "owner", type: "address", }, ], - name: "Upgraded", - type: "event", + name: "MustBeSubOwner", + type: "error", + }, + { + inputs: [], + name: "NoCorrespondingRequest", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + ], + name: "NoSuchProvingKey", + type: "error", + }, + { + inputs: [ + { + internalType: "uint32", + name: "have", + type: "uint32", + }, + { + internalType: "uint32", + name: "want", + type: "uint32", + }, + ], + name: "NumWordsTooBig", + type: "error", + }, + { + inputs: [], + name: "OnlyCallableFromLink", + type: "error", + }, + { + inputs: [], + name: "PaymentTooLarge", + type: "error", + }, + { + inputs: [], + name: "PendingRequestExists", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + ], + name: "ProvingKeyAlreadyRegistered", + type: "error", + }, + { + inputs: [], + name: "Reentrant", + type: "error", + }, + { + inputs: [], + name: "TooManyConsumers", + type: "error", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", }, { - indexed: true, - internalType: "address", - name: "_juror", - type: "address", + indexed: false, + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", }, { indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", }, { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", + indexed: false, + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", }, { indexed: false, - internalType: "string", - name: "_justification", - type: "string", + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + { + indexed: false, + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + indexed: false, + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", }, ], - name: "VoteCast", + name: "ConfigSet", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "address", + name: "coordinatorAddress", + type: "address", }, + ], + name: "CoordinatorDeregistered", + type: "event", + }, + { + anonymous: false, + inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + indexed: false, + internalType: "address", + name: "coordinatorAddress", + type: "address", }, + ], + name: "CoordinatorRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ { indexed: false, internalType: "uint256", - name: "_choice", + name: "requestId", type: "uint256", }, { - indexed: true, + indexed: false, + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + ], + name: "FallbackWeiPerUnitLinkUsed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, internalType: "address", - name: "_contributor", + name: "to", type: "address", }, { indexed: false, internalType: "uint256", - name: "_amount", + name: "amount", type: "uint256", }, ], - name: "Withdrawal", + name: "FundsRecovered", type: "event", }, { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [ + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newCoordinator", + type: "address", + }, { + indexed: false, internalType: "uint256", - name: "", + name: "subId", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "MigrationCompleted", + type: "event", }, { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ + anonymous: false, + inputs: [ { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, internalType: "uint256", - name: "", + name: "amount", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "NativeFundsRecovered", + type: "event", }, { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "OwnershipTransferRequested", + type: "event", }, { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "OwnershipTransferred", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", }, - ], - name: "areCommitsAllCast", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "uint64", + name: "maxGas", + type: "uint64", }, ], - stateMutability: "view", - type: "function", + name: "ProvingKeyDeregistered", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", }, - ], - name: "areVotesAllCast", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "uint64", + name: "maxGas", + type: "uint64", }, ], - stateMutability: "view", - type: "function", + name: "ProvingKeyRegistered", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "requestId", type: "uint256", }, { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { + indexed: false, internalType: "uint256", - name: "_coreDisputeID", + name: "outputSeed", type: "uint256", }, { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { + indexed: true, internalType: "uint256", - name: "_choice", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_salt", - type: "uint256", + indexed: false, + internalType: "uint96", + name: "payment", + type: "uint96", }, { - internalType: "string", - name: "_justification", - type: "string", + indexed: false, + internalType: "bool", + name: "nativePayment", + type: "bool", }, - ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_core", - type: "address", + indexed: false, + internalType: "bool", + name: "success", + type: "bool", }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address payable", - name: "_governor", - type: "address", + indexed: false, + internalType: "bool", + name: "onlyPremium", + type: "bool", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "RandomWordsFulfilled", + type: "event", }, { - inputs: [], - name: "core", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "contract KlerosCore", - name: "", - type: "address", + indexed: true, + internalType: "bytes32", + name: "keyHash", + type: "bytes32", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "requestId", type: "uint256", }, - ], - name: "coreDisputeIDToLocal", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "preSeed", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + indexed: false, + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + indexed: false, + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + indexed: false, + internalType: "uint32", + name: "numWords", + type: "uint32", }, { + indexed: false, internalType: "bytes", - name: "_extraData", + name: "extraArgs", type: "bytes", }, { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", + indexed: true, + internalType: "address", + name: "sender", + type: "address", }, ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "RandomWordsRequested", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", + name: "subId", type: "uint256", }, { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "amountLink", type: "uint256", }, - ], - name: "disputes", - outputs: [ { + indexed: false, internalType: "uint256", - name: "numberOfChoices", + name: "amountNative", type: "uint256", }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionCanceled", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", + name: "subId", type: "uint256", }, - ], - name: "draw", - outputs: [ { + indexed: false, internalType: "address", - name: "drawnAddress", + name: "consumer", type: "address", }, ], - stateMutability: "nonpayable", - type: "function", + name: "SubscriptionConsumerAdded", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_destination", - type: "address", - }, - { + indexed: true, internalType: "uint256", - name: "_amount", + name: "subId", type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + indexed: false, + internalType: "address", + name: "consumer", + type: "address", }, ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "SubscriptionConsumerRemoved", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_choice", - type: "uint256", + indexed: false, + internalType: "address", + name: "owner", + type: "address", }, ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", - type: "function", + name: "SubscriptionCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_coreRoundID", + name: "oldBalance", type: "uint256", }, - ], - name: "getCoherentCount", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "newBalance", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionFunded", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_coreRoundID", + name: "oldNativeBalance", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_voteID", + name: "newNativeBalance", type: "uint256", }, ], - name: "getDegreeOfCoherence", - outputs: [ + name: "SubscriptionFundedWithNative", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "subId", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "address", + name: "from", + type: "address", }, - ], - name: "getFundedChoices", - outputs: [ { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "SubscriptionOwnerTransferRequested", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + indexed: false, + internalType: "address", + name: "from", + type: "address", }, { - internalType: "uint256", - name: "_choice", - type: "uint256", + indexed: false, + internalType: "address", + name: "to", + type: "address", }, ], - name: "getRoundInfo", + name: "SubscriptionOwnerTransferred", + type: "event", + }, + { + inputs: [], + name: "BLOCKHASH_STORE", 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", + internalType: "contract BlockhashStoreInterface", + name: "", + type: "address", }, ], 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", + inputs: [], + name: "LINK", outputs: [ { - internalType: "address", - name: "account", + internalType: "contract LinkTokenInterface", + name: "", 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", + name: "LINK_NATIVE_FEED", outputs: [ { - internalType: "address", + internalType: "contract AggregatorV3Interface", name: "", type: "address", }, @@ -1646,47 +1807,26 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, + inputs: [], + name: "MAX_CONSUMERS", + outputs: [ { - internalType: "contract KlerosCore", - name: "_core", - type: "address", + internalType: "uint16", + name: "", + type: "uint16", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "isVoteActive", + inputs: [], + name: "MAX_NUM_WORDS", outputs: [ { - internalType: "bool", + internalType: "uint32", name: "", - type: "bool", + type: "uint32", }, ], stateMutability: "view", @@ -1694,63 +1834,80 @@ export default { }, { inputs: [], - name: "proxiableUUID", + name: "MAX_REQUEST_CONFIRMATIONS", outputs: [ { - internalType: "bytes32", + internalType: "uint16", name: "", - type: "bytes32", + type: "uint16", }, ], stateMutability: "view", type: "function", }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "subId", + type: "uint256", }, ], - name: "upgradeToAndCall", + name: "acceptSubscriptionOwnerTransfer", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, { - internalType: "address payable", - name: "_beneficiary", + internalType: "address", + name: "consumer", type: "address", }, + ], + name: "addConsumer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "_coreRoundID", + name: "subId", type: "uint256", }, { - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, ], - name: "withdrawFeesAndRewards", + name: "cancelSubscription", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "createSubscription", outputs: [ { internalType: "uint256", - name: "amount", + name: "subId", type: "uint256", }, ], @@ -1761,299 +1918,509 @@ export default { inputs: [ { internalType: "address", - name: "_implementation", + name: "target", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], + name: "deregisterMigratableCoordinator", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeKitClassicNeo: { - address: "0xd40aA608801a639E292e10C235B90488D04070b1", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256[2]", + name: "publicProvingKey", + type: "uint256[2]", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "deregisterProvingKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + components: [ + { + internalType: "uint256[2]", + name: "pk", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "gamma", + type: "uint256[2]", + }, + { + internalType: "uint256", + name: "c", + type: "uint256", + }, + { + internalType: "uint256", + name: "s", + type: "uint256", + }, + { + internalType: "uint256", + name: "seed", + type: "uint256", + }, + { + internalType: "address", + name: "uWitness", + type: "address", + }, + { + internalType: "uint256[2]", + name: "cGammaWitness", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "sHashWitness", + type: "uint256[2]", + }, + { + internalType: "uint256", + name: "zInv", + type: "uint256", + }, + ], + internalType: "struct VRF.Proof", + name: "proof", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "blockNum", + type: "uint64", + }, + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + ], + internalType: "struct VRFTypes.RequestCommitmentV2Plus", + name: "rc", + type: "tuple", + }, + { + internalType: "bool", + name: "onlyPremium", + type: "bool", + }, + ], + name: "fulfillRandomWords", + outputs: [ + { + internalType: "uint96", + name: "payment", + type: "uint96", + }, + ], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, + ], + name: "fundSubscriptionWithNative", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "startIndex", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_choice", + name: "maxCount", type: "uint256", }, ], - name: "ChoiceFunded", - type: "event", + name: "getActiveSubscriptionIds", + outputs: [ + { + internalType: "uint256[]", + name: "ids", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, + ], + name: "getSubscription", + outputs: [ + { + internalType: "uint96", + name: "balance", + type: "uint96", + }, + { + internalType: "uint96", + name: "nativeBalance", + type: "uint96", + }, + { + internalType: "uint64", + name: "reqCount", + type: "uint64", + }, { - indexed: true, internalType: "address", - name: "_juror", + name: "subOwner", type: "address", }, { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "address[]", + name: "consumers", + type: "address[]", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[2]", + name: "publicKey", + type: "uint256[2]", + }, + ], + name: "hashOfKey", + outputs: [ { - indexed: false, internalType: "bytes32", - name: "_commit", + name: "", type: "bytes32", }, ], - name: "CommitCast", - type: "event", + stateMutability: "pure", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "subId", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "address", + name: "newCoordinator", + type: "address", }, + ], + name: "migrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, internalType: "address", - name: "_contributor", + name: "", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "amount", type: "uint256", }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, ], - name: "Contribution", - type: "event", + name: "onTokenTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "subId", type: "uint256", }, + ], + name: "ownerCancelSubscription", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_numberOfChoices", + name: "subId", type: "uint256", }, + ], + name: "pendingRequestExists", + outputs: [ { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "DisputeCreation", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "address", + name: "to", + type: "address", }, ], - name: "Initialized", - type: "event", + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", + internalType: "address payable", + name: "to", type: "address", }, ], - name: "Upgraded", - type: "event", + name: "recoverNativeFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, internalType: "address", - name: "_juror", + name: "target", type: "address", }, + ], + name: "registerMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "uint256[2]", + name: "publicProvingKey", + type: "uint256[2]", }, { - indexed: true, + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, + ], + name: "registerProvingKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", - name: "_choice", + name: "subId", type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_justification", - type: "string", + internalType: "address", + name: "consumer", + type: "address", }, ], - name: "VoteCast", - type: "event", + name: "removeConsumer", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + components: [ + { + internalType: "bytes32", + name: "keyHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "subId", + type: "uint256", + }, + { + internalType: "uint16", + name: "requestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "callbackGasLimit", + type: "uint32", + }, + { + internalType: "uint32", + name: "numWords", + type: "uint32", + }, + { + internalType: "bytes", + name: "extraArgs", + type: "bytes", + }, + ], + internalType: "struct VRFV2PlusClient.RandomWordsRequest", + name: "req", + type: "tuple", }, + ], + name: "requestRandomWords", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "requestId", type: "uint256", }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_choice", + name: "subId", type: "uint256", }, { - indexed: true, internalType: "address", - name: "_contributor", + name: "newOwner", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, ], - name: "Withdrawal", - type: "event", + name: "requestSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + name: "s_config", outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", + }, + { + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", + }, + { + internalType: "bool", + name: "reentrancyLock", + type: "bool", + }, + { + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", + }, + { + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", }, ], stateMutability: "view", @@ -2061,12 +2428,12 @@ export default { }, { inputs: [], - name: "LOSER_STAKE_MULTIPLIER", + name: "s_currentSubNonce", outputs: [ { - internalType: "uint256", + internalType: "uint64", name: "", - type: "uint256", + type: "uint64", }, ], stateMutability: "view", @@ -2074,45 +2441,56 @@ export default { }, { inputs: [], - name: "ONE_BASIS_POINT", + name: "s_fallbackWeiPerUnitLink", outputs: [ { - internalType: "uint256", + internalType: "int256", name: "", - type: "uint256", + type: "int256", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], + name: "s_provingKeyHashes", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - name: "areCommitsAllCast", + name: "s_provingKeys", outputs: [ { internalType: "bool", - name: "", + name: "exists", type: "bool", }, + { + internalType: "uint64", + name: "maxGas", + type: "uint64", + }, ], stateMutability: "view", type: "function", @@ -2121,73 +2499,96 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "", type: "uint256", }, ], - name: "areVotesAllCast", + name: "s_requestCommitments", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, + inputs: [], + name: "s_totalBalance", + outputs: [ { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "uint96", + name: "", + type: "uint96", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "s_totalNativeBalance", + outputs: [ { - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "uint96", + name: "", + type: "uint96", }, ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "uint16", + name: "minimumRequestConfirmations", + type: "uint16", }, { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "uint32", + name: "maxGasLimit", + type: "uint32", }, { - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint32", + name: "stalenessSeconds", + type: "uint32", }, { - internalType: "uint256", - name: "_salt", - type: "uint256", + internalType: "uint32", + name: "gasAfterPaymentCalculation", + type: "uint32", }, { - internalType: "string", - name: "_justification", - type: "string", + internalType: "int256", + name: "fallbackWeiPerUnitLink", + type: "int256", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeNativePPM", + type: "uint32", + }, + { + internalType: "uint32", + name: "fulfillmentFlatFeeLinkDiscountPPM", + type: "uint32", + }, + { + internalType: "uint8", + name: "nativePremiumPercentage", + type: "uint8", + }, + { + internalType: "uint8", + name: "linkPremiumPercentage", + type: "uint8", }, ], - name: "castVote", + name: "setConfig", outputs: [], stateMutability: "nonpayable", type: "function", @@ -2196,11 +2597,16 @@ export default { inputs: [ { internalType: "address", - name: "_core", + name: "link", + type: "address", + }, + { + internalType: "address", + name: "linkNativeFeed", type: "address", }, ], - name: "changeCore", + name: "setLINKAndLINKNativeFeed", outputs: [], stateMutability: "nonpayable", type: "function", @@ -2208,130 +2614,133 @@ export default { { inputs: [ { - internalType: "address payable", - name: "_governor", + internalType: "address", + name: "to", type: "address", }, ], - name: "changeGovernor", + name: "transferOwnership", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "core", - outputs: [ + inputs: [ { - internalType: "contract KlerosCore", - name: "", + internalType: "address", + name: "recipient", type: "address", }, ], - stateMutability: "view", + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "coreDisputeIDToLocal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address payable", + name: "recipient", + type: "address", }, ], - stateMutability: "view", + name: "withdrawNative", + outputs: [], + stateMutability: "nonpayable", type: "function", }, + ], + }, + DAI: { + address: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", + abi: [ { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "string", + name: "_name", + type: "string", }, { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", + internalType: "string", + name: "_symbol", + type: "string", }, ], - name: "createDispute", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { + anonymous: false, inputs: [ { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, internalType: "uint256", - name: "_coreDisputeID", + name: "value", type: "uint256", }, ], - name: "currentRuling", - outputs: [ + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "ruling", - type: "uint256", + indexed: true, + internalType: "address", + name: "from", + type: "address", }, { - internalType: "bool", - name: "tied", - type: "bool", + indexed: true, + internalType: "address", + name: "to", + type: "address", }, { - internalType: "bool", - name: "overridden", - type: "bool", + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Transfer", + type: "event", }, { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", }, ], - name: "disputes", + name: "allowance", outputs: [ { internalType: "uint256", - name: "numberOfChoices", + name: "", type: "uint256", }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, ], stateMutability: "view", type: "function", @@ -2339,22 +2748,22 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "_nonce", + name: "amount", type: "uint256", }, ], - name: "draw", + name: "approve", outputs: [ { - internalType: "address", - name: "drawnAddress", - type: "address", + internalType: "bool", + name: "", + type: "bool", }, ], stateMutability: "nonpayable", @@ -2364,96 +2773,111 @@ export default { inputs: [ { internalType: "address", - name: "_destination", + name: "account", type: "address", }, + ], + name: "balanceOf", + outputs: [ { internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, + inputs: [], + name: "decimals", + outputs: [ { - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "uint8", + name: "", + type: "uint8", }, ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "_coreRoundID", + name: "subtractedValue", type: "uint256", }, ], - name: "getCoherentCount", + name: "decreaseAllowance", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "_coreRoundID", + name: "addedValue", type: "uint256", }, + ], + name: "increaseAllowance", + outputs: [ { - internalType: "uint256", - name: "_voteID", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], - name: "getDegreeOfCoherence", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", outputs: [ { internalType: "uint256", @@ -2466,129 +2890,94 @@ export default { }, { inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, { internalType: "uint256", - name: "_coreDisputeID", + name: "amount", type: "uint256", }, ], - name: "getFundedChoices", + name: "transfer", outputs: [ { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "from", + type: "address", }, { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, { internalType: "uint256", - name: "_choice", + name: "amount", type: "uint256", }, ], - name: "getRoundInfo", + name: "transferFrom", outputs: [ - { - internalType: "uint256", - name: "winningChoice", - type: "uint256", - }, { internalType: "bool", - name: "tied", + name: "", 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", + stateMutability: "nonpayable", type: "function", }, + ], + }, + DAIFaucet: { + address: "0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E", + abi: [ { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", + internalType: "contract IERC20", + name: "_token", + type: "address", }, ], - name: "getVoteInfo", + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "amount", outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, { internalType: "uint256", - name: "choice", + name: "", type: "uint256", }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, ], stateMutability: "view", type: "function", }, { inputs: [], - name: "governor", + name: "balance", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -2597,17 +2986,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - name: "initialize", + name: "changeAmount", outputs: [], stateMutability: "nonpayable", type: "function", @@ -2615,94 +2999,53 @@ export default { { 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", + internalType: "address", + name: "_governor", + type: "address", }, ], - stateMutability: "view", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "governor", outputs: [ { - internalType: "bytes32", + internalType: "address", name: "", - type: "bytes32", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", + inputs: [], + name: "request", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", 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", + inputs: [], + name: "token", outputs: [ { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "contract IERC20", + name: "", + type: "address", }, ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdraw", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -2710,27 +3053,33 @@ export default { inputs: [ { internalType: "address", - name: "_implementation", + name: "", type: "address", }, + ], + name: "withdrewAlready", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "view", + type: "function", }, ], }, - DisputeKitClassicNeo_Implementation: { - address: "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", + DisputeKitClassic: { + address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -3558,6 +3907,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -3600,6 +3956,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -3618,6 +3987,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -3652,11 +4034,6 @@ export default { stateMutability: "nonpayable", type: "function", }, - ], - }, - DisputeKitClassicNeo_Proxy: { - address: "0xd40aA608801a639E292e10C235B90488D04070b1", - abi: [ { inputs: [ { @@ -3673,18 +4050,10 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - DisputeKitClassicUniversity: { - address: "0xDaE66157D72Baa099cd63a833c353776206feea4", + DisputeKitClassicNeo: { + address: "0xd40aA608801a639E292e10C235B90488D04070b1", abi: [ { stateMutability: "payable", @@ -4350,6 +4719,16 @@ export default { name: "_voteID", type: "uint256", }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, ], name: "getDegreeOfCoherence", outputs: [ @@ -4622,8 +5001,8 @@ export default { }, ], }, - DisputeKitClassicUniversity_Implementation: { - address: "0xf36fa321Bb64b6E39f5DA3dbb053ccE63D077f8B", + DisputeKitClassicNeo_Implementation: { + address: "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", abi: [ { inputs: [], @@ -5286,15 +5665,25 @@ export default { name: "_voteID", type: "uint256", }, - ], - name: "getDegreeOfCoherence", - outputs: [ { internalType: "uint256", name: "", type: "uint256", }, - ], + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "getDegreeOfCoherence", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", type: "function", }, @@ -5542,8 +5931,8 @@ export default { }, ], }, - DisputeKitClassicUniversity_Proxy: { - address: "0xDaE66157D72Baa099cd63a833c353776206feea4", + DisputeKitClassicNeo_Proxy: { + address: "0xd40aA608801a639E292e10C235B90488D04070b1", abi: [ { inputs: [ @@ -5571,13 +5960,16 @@ export default { }, ], }, - DisputeKitClassic_Implementation: { - address: "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + DisputeKitClassicUniversity: { + address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -6235,6 +6627,16 @@ export default { name: "_voteID", type: "uint256", }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, ], name: "getDegreeOfCoherence", outputs: [ @@ -6489,11 +6891,6 @@ export default { stateMutability: "nonpayable", type: "function", }, - ], - }, - DisputeKitClassic_Proxy: { - address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", - abi: [ { inputs: [ { @@ -6510,70 +6907,112 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + ], + }, + DisputeKitClassicUniversity_Implementation: { + address: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + abi: [ { - stateMutability: "payable", - type: "fallback", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { - stateMutability: "payable", - type: "receive", + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", }, - ], - }, - DisputeResolver: { - address: "0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "address", + name: "implementation", type: "address", }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "nonpayable", - type: "constructor", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { anonymous: false, inputs: [ { indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { indexed: true, internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_coreRoundID", type: "uint256", }, { - indexed: false, + indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "_choice", type: "uint256", }, + ], + name: "ChoiceFunded", + type: "event", + }, + { + anonymous: false, + inputs: [ { - indexed: false, + indexed: true, internalType: "uint256", - name: "_templateId", + name: "_coreDisputeID", type: "uint256", }, + { + indexed: true, + internalType: "address", + name: "_juror", + type: "address", + }, { indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", + }, + { + indexed: false, + internalType: "bytes32", + name: "_commit", + type: "bytes32", }, ], - name: "DisputeRequest", + name: "CommitCast", type: "event", }, { @@ -6581,188 +7020,196 @@ export default { inputs: [ { indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_coreRoundID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_ruling", + name: "_choice", type: "uint256", }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ { - internalType: "contract IArbitratorV2", - name: "", + indexed: true, + internalType: "address", + name: "_contributor", type: "address", }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, ], - stateMutability: "view", - type: "function", + name: "Contribution", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_coreDisputeID", type: "uint256", }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_numberOfChoices", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + indexed: false, + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Initialized", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + indexed: true, + internalType: "address", + name: "newImplementation", type: "address", }, ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Upgraded", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_disputeTemplate", - type: "string", + indexed: true, + internalType: "address", + name: "_juror", + type: "address", }, { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", + indexed: false, + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, { + indexed: true, internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_choice", type: "uint256", }, - ], - name: "createDisputeForTemplate", - outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + indexed: false, + internalType: "string", + name: "_justification", + type: "string", }, ], - stateMutability: "payable", - type: "function", + name: "VoteCast", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", + indexed: true, + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_choice", type: "uint256", }, - ], - name: "createDisputeForTemplateUri", - outputs: [ { + indexed: true, + internalType: "address", + name: "_contributor", + type: "address", + }, + { + indexed: false, internalType: "uint256", - name: "disputeID", + name: "_amount", type: "uint256", }, ], - stateMutability: "payable", - type: "function", + name: "Withdrawal", + type: "event", }, { - inputs: [ + inputs: [], + name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - name: "disputes", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "LOSER_STAKE_MULTIPLIER", outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, { internalType: "uint256", - name: "ruling", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ONE_BASIS_POINT", + outputs: [ { internalType: "uint256", - name: "numberOfRulingOptions", + name: "", type: "uint256", }, ], @@ -6771,12 +7218,12 @@ export default { }, { inputs: [], - name: "governor", + name: "WINNER_STAKE_MULTIPLIER", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -6786,122 +7233,128 @@ export default { inputs: [ { internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_coreDisputeID", type: "uint256", }, + ], + name: "areCommitsAllCast", + outputs: [ { - internalType: "uint256", - name: "_ruling", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [], - name: "templateRegistry", + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + ], + name: "areVotesAllCast", outputs: [ { - internalType: "contract IDisputeTemplateRegistry", + internalType: "bool", name: "", - type: "address", + type: "bool", }, ], stateMutability: "view", type: "function", }, - ], - }, - DisputeResolverNeo: { - address: "0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", + }, + { + internalType: "bytes32", + name: "_commit", + type: "bytes32", }, ], + name: "castCommit", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_coreDisputeID", type: "uint256", }, { - indexed: false, + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", + }, + { internalType: "uint256", - name: "_externalDisputeID", + name: "_choice", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_templateId", + name: "_salt", type: "uint256", }, { - indexed: false, internalType: "string", - name: "_templateUri", + name: "_justification", type: "string", }, ], - name: "DisputeRequest", - type: "event", + name: "castVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "address", + name: "_core", type: "address", }, + ], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", + internalType: "address payable", + name: "_governor", + type: "address", }, ], - name: "Ruling", - type: "event", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "arbitrator", + name: "core", outputs: [ { - internalType: "contract IArbitratorV2", + internalType: "contract KlerosCore", name: "", type: "address", }, @@ -6917,7 +7370,7 @@ export default { type: "uint256", }, ], - name: "arbitratorDisputeIDToLocalID", + name: "coreDisputeIDToLocal", outputs: [ { internalType: "uint256", @@ -6931,38 +7384,27 @@ export default { { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "uint256", + name: "_nbVotes", + type: "uint256", }, ], - name: "changeTemplateRegistry", + name: "createDispute", outputs: [], stateMutability: "nonpayable", type: "function", @@ -6970,64 +7412,30 @@ export default { { 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", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, ], - name: "createDisputeForTemplate", + name: "currentRuling", outputs: [ { internalType: "uint256", - name: "disputeID", + name: "ruling", 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", + internalType: "bool", + name: "tied", + type: "bool", }, - ], - name: "createDisputeForTemplateUri", - outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + internalType: "bool", + name: "overridden", + type: "bool", }, ], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { @@ -7040,38 +7448,20 @@ export default { ], name: "disputes", outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, { internalType: "uint256", - name: "ruling", + name: "numberOfChoices", type: "uint256", }, { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", + internalType: "bool", + name: "jumped", + type: "bool", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "bytes", + name: "extraData", + type: "bytes", }, ], stateMutability: "view", @@ -7081,138 +7471,120 @@ export default { inputs: [ { internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_coreDisputeID", type: "uint256", }, { internalType: "uint256", - name: "_ruling", + name: "_nonce", type: "uint256", }, ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", + name: "draw", outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "", + internalType: "address", + name: "drawnAddress", type: "address", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, - ], - }, - DisputeResolverRuler: { - address: "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "address", + name: "_destination", type: "address", }, { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], + name: "executeGovernorProposal", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_choice", type: "uint256", }, + ], + name: "fundAppeal", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_externalDisputeID", + name: "_coreDisputeID", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_templateId", + name: "_coreRoundID", type: "uint256", }, + ], + name: "getCoherentCount", + outputs: [ { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "DisputeRequest", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_coreRoundID", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_ruling", + name: "_voteID", type: "uint256", }, - ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", - outputs: [ { - internalType: "contract IArbitratorV2", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - name: "arbitratorDisputeIDToLocalID", + name: "getDegreeOfCoherence", outputs: [ { internalType: "uint256", @@ -7226,176 +7598,126 @@ export default { { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "getFundedChoices", + outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "uint256[]", + name: "fundedChoices", + type: "uint256[]", }, ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplate", - type: "string", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_choice", type: "uint256", }, ], - name: "createDisputeForTemplate", + name: "getRoundInfo", outputs: [ { internalType: "uint256", - name: "disputeID", + name: "winningChoice", type: "uint256", }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + internalType: "bool", + name: "tied", + type: "bool", }, { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", + internalType: "uint256", + name: "totalVoted", + type: "uint256", }, { internalType: "uint256", - name: "_numberOfRulingOptions", + name: "totalCommited", type: "uint256", }, - ], - name: "createDisputeForTemplateUri", - outputs: [ { internalType: "uint256", - name: "disputeID", + name: "nbVoters", + type: "uint256", + }, + { + internalType: "uint256", + name: "choiceCount", type: "uint256", }, ], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", - name: "", + name: "_coreDisputeID", type: "uint256", }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, - { - internalType: "bool", - name: "isRuled", - type: "bool", - }, { internalType: "uint256", - name: "ruling", + name: "_coreRoundID", type: "uint256", }, { internalType: "uint256", - name: "numberOfRulingOptions", + name: "_voteID", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", + name: "getVoteInfo", outputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", + internalType: "bytes32", + name: "commit", + type: "bytes32", }, { internalType: "uint256", - name: "_ruling", + name: "choice", type: "uint256", }, + { + internalType: "bool", + name: "voted", + type: "bool", + }, ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "templateRegistry", + name: "governor", outputs: [ { - internalType: "contract IDisputeTemplateRegistry", + internalType: "address", name: "", type: "address", }, @@ -7403,306 +7725,139 @@ export default { stateMutability: "view", type: "function", }, - ], - }, - DisputeResolverUniversity: { - address: "0x88d793dA6e88Ebd58136A1e1483cc4cf0D915ca4", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "address", + name: "_governor", type: "address", }, { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + internalType: "contract KlerosCore", + name: "_core", type: "address", }, ], + name: "initialize", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - 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", + name: "_coreDisputeID", 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", + name: "_coreRoundID", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_ruling", + name: "_voteID", type: "uint256", }, ], - name: "Ruling", - type: "event", - }, - { - inputs: [], - name: "arbitrator", + name: "isVoteActive", outputs: [ { - internalType: "contract IArbitratorV2", + internalType: "bool", name: "", - type: "address", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { internalType: "address", - name: "_governor", + name: "newImplementation", type: "address", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "changeTemplateRegistry", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_disputeTemplate", - type: "string", + internalType: "address payable", + name: "_beneficiary", + type: "address", }, { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_choice", type: "uint256", }, ], - name: "createDisputeForTemplate", + name: "withdrawFeesAndRewards", outputs: [ { internalType: "uint256", - name: "disputeID", + name: "amount", type: "uint256", }, ], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, + ], + }, + DisputeKitClassicUniversity_Proxy: { + address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + abi: [ { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + internalType: "address", + name: "_implementation", + type: "address", }, { - 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", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "rule", - outputs: [], stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", + type: "constructor", }, - ], - }, - DisputeTemplateRegistry: { - address: "0x596D3B09E684D62217682216e9b7a0De75933391", - abi: [ { stateMutability: "payable", type: "fallback", @@ -7711,6 +7866,16 @@ export default { stateMutability: "payable", type: "receive", }, + ], + }, + DisputeKitClassic_Implementation: { + address: "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, { inputs: [], name: "AlreadyInitialized", @@ -7759,141 +7924,234 @@ export default { { indexed: true, internalType: "uint256", - name: "_templateId", + name: "_coreDisputeID", type: "uint256", }, { indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", + indexed: true, + internalType: "uint256", + name: "_choice", + type: "uint256", }, ], - name: "DisputeTemplate", + 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: "uint64", - name: "version", - type: "uint64", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", + }, + { + indexed: false, + internalType: "bytes32", + name: "_commit", + type: "bytes32", }, ], - name: "Initialized", + 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: "newImplementation", + name: "_contributor", type: "address", }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, ], - name: "Upgraded", + name: "Contribution", type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + indexed: false, + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Initialized", + type: "event", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "string", - name: "_templateTag", - type: "string", + indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_templateData", - type: "string", + 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: "_templateDataMappings", + name: "_justification", type: "string", }, ], - name: "setDisputeTemplate", + 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: "templateId", + name: "", type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "templates", + name: "LOSER_STAKE_MULTIPLIER", outputs: [ { internalType: "uint256", @@ -7905,152 +8163,142 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "ONE_BASIS_POINT", + outputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WINNER_STAKE_MULTIPLIER", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, + ], + name: "areCommitsAllCast", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeTemplateRegistry_Implementation: { - address: "0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + 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: "slot", + name: "_commit", type: "bytes32", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "castCommit", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_templateId", + name: "_coreDisputeID", type: "uint256", }, { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", + internalType: "uint256[]", + name: "_voteIDs", + type: "uint256[]", }, { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", + internalType: "uint256", + name: "_choice", + type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "uint256", + name: "_salt", + type: "uint256", }, - ], - name: "DisputeTemplate", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "string", + name: "_justification", + type: "string", }, ], - name: "Initialized", - type: "event", + name: "castVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "_core", type: "address", }, ], - name: "Upgraded", - type: "event", + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: "address", + internalType: "address payable", name: "_governor", type: "address", }, @@ -8062,10 +8310,10 @@ export default { }, { inputs: [], - name: "governor", + name: "core", outputs: [ { - internalType: "address", + internalType: "contract KlerosCore", name: "", type: "address", }, @@ -8076,24 +8324,17 @@ export default { { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", + name: "coreDisputeIDToLocal", outputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], stateMutability: "view", @@ -8102,251 +8343,132 @@ export default { { inputs: [ { - internalType: "string", - name: "_templateTag", - type: "string", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "string", - name: "_templateData", - type: "string", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, { - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, - ], - name: "setDisputeTemplate", - outputs: [ { internalType: "uint256", - name: "templateId", + name: "_nbVotes", type: "uint256", }, ], + name: "createDispute", + outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "templates", - outputs: [ + inputs: [ { internalType: "uint256", - name: "", + name: "_coreDisputeID", 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", - }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0x596D3B09E684D62217682216e9b7a0De75933391", - abi: [ - { - inputs: [ + name: "currentRuling", + outputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "ruling", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "bool", + name: "tied", + type: "bool", }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - EvidenceModule: { - address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "bool", + name: "overridden", + type: "bool", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ + name: "disputes", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "numberOfChoices", type: "uint256", }, { - indexed: true, - internalType: "address", - name: "_party", - type: "address", + internalType: "bool", + name: "jumped", + type: "bool", }, { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", + internalType: "bytes", + name: "extraData", + type: "bytes", }, ], - name: "Evidence", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_nonce", + type: "uint256", }, ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", + name: "draw", outputs: [ { internalType: "address", - name: "", + name: "drawnAddress", type: "address", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_destination", 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", + name: "_amount", type: "uint256", }, { - internalType: "string", - name: "_evidence", - type: "string", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "submitEvidence", + name: "executeGovernorProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -8354,17 +8476,17 @@ export default { { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "_choice", + type: "uint256", }, ], - name: "upgradeToAndCall", + name: "fundAppeal", outputs: [], stateMutability: "payable", type: "function", @@ -8372,121 +8494,182 @@ export default { { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - EvidenceModule_Implementation: { - address: "0x05AD81f245209b7f91885fd96e57c9da90554824", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "getCoherentCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + 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: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "getDegreeOfCoherence", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "getFundedChoices", + outputs: [ + { + internalType: "uint256[]", + name: "fundedChoices", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "_coreDisputeID", type: "uint256", }, { - indexed: true, - internalType: "address", - name: "_party", - type: "address", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", + internalType: "uint256", + name: "_choice", + type: "uint256", }, ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ + name: "getRoundInfo", + outputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + 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", }, ], - name: "Initialized", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voteID", + type: "uint256", + }, + ], + name: "getVoteInfo", + outputs: [ + { internalType: "address", - name: "newImplementation", + name: "account", type: "address", }, + { + internalType: "bytes32", + name: "commit", + type: "bytes32", + }, + { + internalType: "uint256", + name: "choice", + type: "uint256", + }, + { + internalType: "bool", + name: "voted", + type: "bool", + }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [], @@ -8508,6 +8691,11 @@ export default { name: "_governor", type: "address", }, + { + internalType: "contract KlerosCore", + name: "_core", + type: "address", + }, ], name: "initialize", outputs: [], @@ -8516,46 +8704,77 @@ export default { }, { inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_externalDisputeID", + name: "_coreDisputeID", type: "uint256", }, { - internalType: "string", - name: "_evidence", - type: "string", + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_voteID", + type: "uint256", }, + ], + name: "isVoteActive", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", }, ], name: "upgradeToAndCall", @@ -8563,10 +8782,57 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "address payable", + name: "_beneficiary", + type: "address", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_choice", + type: "uint256", + }, + ], + name: "withdrawFeesAndRewards", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, ], }, - EvidenceModule_Proxy: { - address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + DisputeKitClassic_Proxy: { + address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", abi: [ { inputs: [ @@ -8594,405 +8860,366 @@ export default { }, ], }, - KlerosCore: { - address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + DisputeResolver: { + address: "0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [ + { + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, + { + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", }, { - inputs: [], - name: "AlreadyInitialized", - type: "error", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_arbitratorDisputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_templateId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "_templateUri", + type: "string", + }, + ], + name: "DisputeRequest", + type: "event", }, { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", + 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: "AppealPeriodNotPassed", - type: "error", + name: "arbitrator", + outputs: [ + { + internalType: "contract IArbitratorV2", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "arbitratorDisputeIDToLocalID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", + inputs: [ + { + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, + ], + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - 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: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", + inputs: [ + { + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", + }, + ], + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingFailed", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "string", + name: "_disputeTemplate", + type: "string", }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", + internalType: "string", + name: "_disputeTemplateDataMappings", + type: "string", }, { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", + internalType: "uint256", + name: "_numberOfRulingOptions", + type: "uint256", }, ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ + name: "createDisputeForTemplate", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "disputeID", type: "uint256", }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, ], - name: "AppealDecision", - type: "event", + stateMutability: "payable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", + }, + { + internalType: "string", + name: "_disputeTemplateUri", + type: "string", + }, + { internalType: "uint256", - name: "_disputeID", + name: "_numberOfRulingOptions", type: "uint256", }, + ], + name: "createDisputeForTemplateUri", + outputs: [ { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - name: "AppealPossible", - type: "event", + stateMutability: "payable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, + ], + name: "disputes", + outputs: [ { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", + internalType: "bytes", + name: "arbitratorExtraData", + type: "bytes", }, { - indexed: false, internalType: "bool", - name: "_hiddenVotes", + name: "isRuled", type: "bool", }, { - indexed: false, internalType: "uint256", - name: "_minStake", + name: "ruling", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_alpha", + name: "numberOfRulingOptions", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ { - 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[]", + internalType: "address", + name: "", + type: "address", }, ], - name: "CourtCreated", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_arbitratorDisputeID", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_roundID", + name: "_ruling", type: "uint256", }, + ], + name: "rule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "templateRegistry", + outputs: [ { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", + internalType: "contract IDisputeTemplateRegistry", + name: "", + type: "address", }, ], - name: "CourtJump", - type: "event", + stateMutability: "view", + type: "function", }, + ], + }, + DisputeResolverNeo: { + address: "0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C", + abi: [ { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { - indexed: false, + indexed: true, internalType: "uint256", - name: "_alpha", + name: "_arbitratorDisputeID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_feeForJuror", + name: "_externalDisputeID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_jurorsForCourtJump", + name: "_templateId", type: "uint256", }, { indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "string", + name: "_templateUri", + type: "string", }, ], - name: "CourtModified", + name: "DisputeRequest", type: "event", }, { anonymous: false, inputs: [ + { + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, { indexed: true, internalType: "uint256", @@ -9000,213 +9227,283 @@ export default { type: "uint256", }, { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], - name: "DisputeCreation", + name: "Ruling", type: "event", }, { - anonymous: false, + inputs: [], + name: "arbitrator", + outputs: [ + { + internalType: "contract IArbitratorV2", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeKitID", + name: "", type: "uint256", }, + ], + name: "arbitratorDisputeIDToLocalID", + outputs: [ { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "DisputeKitCreated", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, + ], + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, ], - name: "DisputeKitEnabled", - type: "event", + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "string", + name: "_disputeTemplate", + type: "string", + }, + { + internalType: "string", + name: "_disputeTemplateDataMappings", + type: "string", }, { - indexed: true, internalType: "uint256", - name: "_fromDisputeKitID", + name: "_numberOfRulingOptions", type: "uint256", }, + ], + name: "createDisputeForTemplate", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_toDisputeKitID", + name: "disputeID", type: "uint256", }, ], - name: "DisputeKitJump", - type: "event", + stateMutability: "payable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "string", + name: "_disputeTemplateUri", + type: "string", }, { - indexed: false, internalType: "uint256", - name: "_roundID", + name: "_numberOfRulingOptions", type: "uint256", }, + ], + name: "createDisputeForTemplateUri", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_voteID", + name: "disputeID", type: "uint256", }, ], - name: "Draw", - type: "event", + stateMutability: "payable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ + name: "disputes", + outputs: [ + { + internalType: "bytes", + name: "arbitratorExtraData", + type: "bytes", + }, + { + internalType: "bool", + name: "isRuled", + type: "bool", + }, { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "ruling", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_roundID", + name: "numberOfRulingOptions", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_pnkAmount", + name: "_arbitratorDisputeID", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_feeAmount", + name: "_ruling", type: "uint256", }, + ], + name: "rule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "templateRegistry", + outputs: [ { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", + internalType: "contract IDisputeTemplateRegistry", + name: "", type: "address", }, ], - name: "LeftoverRewardSent", - type: "event", + stateMutability: "view", + type: "function", }, + ], + }, + DisputeResolverRuler: { + address: "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", + abi: [ { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, ], - name: "NewCurrencyRate", - type: "event", + stateMutability: "nonpayable", + type: "constructor", }, { anonymous: false, inputs: [ + { + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", + }, { indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_arbitratorDisputeID", type: "uint256", }, { indexed: false, - internalType: "enum KlerosCore.Period", - name: "_period", - type: "uint8", + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_templateId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "_templateUri", + type: "string", }, ], - name: "NewPeriod", + name: "DisputeRequest", type: "event", }, { @@ -9214,8 +9511,8 @@ export default { inputs: [ { indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, { @@ -9235,76 +9532,72 @@ export default { type: "event", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "arbitrator", + outputs: [ { - indexed: true, - internalType: "address", - name: "_account", + internalType: "contract IArbitratorV2", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, internalType: "uint256", - name: "_roundID", + name: "", type: "uint256", }, + ], + name: "arbitratorDisputeIDToLocalID", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_degreeOfCoherency", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, ], - name: "TokenAndETHShift", - type: "event", + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "_governor", type: "address", }, ], - name: "Upgraded", - type: "event", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", type: "address", }, ], - name: "addNewDisputeKit", + name: "changeTemplateRegistry", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9312,87 +9605,94 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + internalType: "string", + name: "_disputeTemplate", + type: "string", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "string", + name: "_disputeTemplateDataMappings", + type: "string", }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "appealCost", + name: "createDisputeForTemplate", outputs: [ { internalType: "uint256", - name: "cost", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ + { + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", + }, + { + internalType: "string", + name: "_disputeTemplateUri", + type: "string", + }, { internalType: "uint256", - name: "_disputeID", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "appealPeriod", + name: "createDisputeForTemplateUri", outputs: [ { internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "disputes", + outputs: [ { internalType: "bytes", - name: "_extraData", + name: "arbitratorExtraData", type: "bytes", }, { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "bool", + name: "isRuled", + type: "bool", }, - ], - name: "arbitrationCost", - outputs: [ { internalType: "uint256", - name: "cost", + name: "ruling", + type: "uint256", + }, + { + internalType: "uint256", + name: "numberOfRulingOptions", type: "uint256", }, ], @@ -9400,19 +9700,13 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", - name: "cost", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], stateMutability: "view", @@ -9421,109 +9715,158 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint256", + name: "_arbitratorDisputeID", + type: "uint256", }, { - internalType: "bool", - name: "_accepted", - type: "bool", + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], - name: "changeAcceptedFeeTokens", + name: "rule", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "templateRegistry", + outputs: [ + { + internalType: "contract IDisputeTemplateRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + DisputeResolverUniversity: { + address: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", + abi: [ { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "_minStake", - type: "uint256", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { + indexed: true, internalType: "uint256", - name: "_alpha", + name: "_arbitratorDisputeID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_feeForJuror", + name: "_externalDisputeID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_jurorsForCourtJump", + name: "_templateId", type: "uint256", }, { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + indexed: false, + internalType: "string", + name: "_templateUri", + type: "string", }, ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeRequest", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "contract IERC20", - name: "_feeToken", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", + name: "Ruling", + type: "event", + }, + { + inputs: [], + name: "arbitrator", + outputs: [ + { + internalType: "contract IArbitratorV2", + name: "", + type: "address", + }, + ], + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address payable", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + name: "arbitratorDisputeIDToLocalID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, ], - name: "changeJurorProsecutionModule", + name: "changeArbitrator", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9531,12 +9874,12 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "address", + name: "_governor", type: "address", }, ], - name: "changePinakion", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9544,12 +9887,12 @@ export default { { inputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModule", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", type: "address", }, ], - name: "changeSortitionModule", + name: "changeTemplateRegistry", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9557,299 +9900,278 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_toToken", - type: "address", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", + }, + { + internalType: "string", + name: "_disputeTemplate", + type: "string", + }, + { + internalType: "string", + name: "_disputeTemplateDataMappings", + type: "string", }, { internalType: "uint256", - name: "_amountInEth", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "convertEthToTokenAmount", + name: "createDisputeForTemplate", outputs: [ { internalType: "uint256", - name: "", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - internalType: "bool", - name: "hiddenVotes", - type: "bool", + internalType: "string", + name: "_disputeTemplateUri", + type: "string", }, { internalType: "uint256", - name: "minStake", + name: "_numberOfRulingOptions", type: "uint256", }, + ], + name: "createDisputeForTemplateUri", + outputs: [ { internalType: "uint256", - name: "alpha", + name: "disputeID", type: "uint256", }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, { internalType: "uint256", - name: "_minStake", + name: "", type: "uint256", }, + ], + name: "disputes", + outputs: [ + { + internalType: "bytes", + name: "arbitratorExtraData", + type: "bytes", + }, { - internalType: "uint256", - name: "_alpha", - type: "uint256", + internalType: "bool", + name: "isRuled", + type: "bool", }, { internalType: "uint256", - name: "_feeForJuror", + name: "ruling", type: "uint256", }, { internalType: "uint256", - name: "_jurorsForCourtJump", + name: "numberOfRulingOptions", 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", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_numberOfChoices", + name: "_arbitratorDisputeID", type: "uint256", }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, { internalType: "uint256", - name: "_feeAmount", + name: "_ruling", type: "uint256", }, ], - name: "createDispute", + name: "rule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "templateRegistry", outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + internalType: "contract IDisputeTemplateRegistry", + name: "", + type: "address", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, + ], + }, + DisputeTemplateRegistry: { + address: "0x596D3B09E684D62217682216e9b7a0De75933391", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, { inputs: [ { - internalType: "contract IERC20", - name: "", + internalType: "address", + name: "implementation", type: "address", }, ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_templateId", type: "uint256", }, - ], - name: "currentRuling", - outputs: [ { - internalType: "uint256", - name: "ruling", - type: "uint256", + indexed: true, + internalType: "string", + name: "_templateTag", + type: "string", }, { - internalType: "bool", - name: "tied", - type: "bool", + indexed: false, + internalType: "string", + name: "_templateData", + type: "string", }, { - internalType: "bool", - name: "overridden", - type: "bool", + indexed: false, + internalType: "string", + name: "_templateDataMappings", + type: "string", }, ], - stateMutability: "view", - type: "function", + name: "DisputeTemplate", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "disputeKits", - outputs: [ + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "contract IDisputeKit", - name: "", + indexed: true, + internalType: "address", + name: "newImplementation", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "disputes", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", + internalType: "address", + name: "", type: "address", }, - { - internalType: "enum KlerosCore.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, ], stateMutability: "view", type: "function", @@ -9857,252 +10179,245 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "draw", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize2", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "string", + name: "_templateTag", + type: "string", }, { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", + internalType: "string", + name: "_templateData", + type: "string", }, { - internalType: "bool", - name: "_enable", - type: "bool", + internalType: "string", + name: "_templateDataMappings", + type: "string", + }, + ], + name: "setDisputeTemplate", + outputs: [ + { + internalType: "uint256", + name: "templateId", + type: "uint256", }, ], - name: "enableDisputeKits", - outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "templates", + outputs: [ { internalType: "uint256", - name: "_disputeID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_round", - type: "uint256", + internalType: "address", + name: "newImplementation", + type: "address", }, { - internalType: "uint256", - name: "_iterations", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "execute", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_destination", + name: "_implementation", type: "address", }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, { internalType: "bytes", name: "_data", type: "bytes", }, ], - name: "executeGovernorProposal", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", + }, + ], + }, + DisputeTemplateRegistry_Implementation: { + address: "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", }, { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "implementation", + type: "address", }, ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "InvalidImplementation", + type: "error", }, { inputs: [], - name: "getDisputeKitsLength", - outputs: [ + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_templateId", type: "uint256", }, - ], - name: "getNumberOfRounds", - outputs: [ { - internalType: "uint256", - name: "", - 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", }, ], - stateMutability: "view", - type: "function", + name: "DisputeTemplate", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "getNumberOfVotes", - outputs: [ + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - 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 KlerosCore.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", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -10125,134 +10440,19 @@ export default { name: "_governor", type: "address", }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", + name: "initialize2", outputs: [], stateMutability: "nonpayable", type: "function", }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], name: "proxiableUUID", @@ -10269,57 +10469,40 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", + internalType: "string", + name: "_templateTag", + type: "string", }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_account", - type: "address", + internalType: "string", + name: "_templateData", + type: "string", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "string", + name: "_templateDataMappings", + type: "string", }, + ], + name: "setDisputeTemplate", + outputs: [ { internalType: "uint256", - name: "_newStake", + name: "templateId", type: "uint256", }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, ], - name: "setStakeBySortitionModule", - outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "sortitionModule", + name: "templates", outputs: [ { - internalType: "contract ISortitionModule", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -10344,10 +10527,28 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "version", + outputs: [ { - internalType: "address", - name: "_implementation", + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + DisputeTemplateRegistry_Proxy: { + address: "0x596D3B09E684D62217682216e9b7a0De75933391", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_implementation", type: "address", }, { @@ -10359,10 +10560,18 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - KlerosCoreNeo: { - address: "0x26bf077037550e437605F07e25EfcAd510715C3A", + EvidenceModule: { + address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", abi: [ { stateMutability: "payable", @@ -10379,97 +10588,221 @@ export default { }, { inputs: [], - name: "AppealFeesNotEnough", + name: "FailedDelegateCall", type: "error", }, { - inputs: [], - name: "AppealPeriodNotPassed", + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", type: "error", }, { inputs: [], - name: "ArbitrableNotWhitelisted", + name: "NotInitializing", type: "error", }, { inputs: [], - name: "ArbitrationFeesNotEnough", + name: "UUPSUnauthorizedCallContext", type: "error", }, { - inputs: [], - name: "ArraysLengthMismatch", + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", type: "error", }, { - inputs: [], - name: "CannotDisableClassicDK", - 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", }, { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", }, { - inputs: [], - name: "DepthLevelMax", - type: "error", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", }, { inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "DisputeKitOnly", - type: "error", + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "DisputeNotAppealable", - type: "error", + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "DisputePeriodIsFinal", - type: "error", + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "DisputeStillDrawing", - type: "error", + inputs: [ + { + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + internalType: "string", + name: "_evidence", + type: "string", + }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", }, { inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "GovernorOnly", - type: "error", + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", }, + ], + }, + EvidenceModule_Implementation: { + address: "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", + abi: [ { inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], - name: "InvalidDisputKitParent", + name: "AlreadyInitialized", type: "error", }, { inputs: [], - name: "InvalidForkingCourtAsParent", + name: "FailedDelegateCall", type: "error", }, { @@ -10485,169 +10818,464 @@ export default { }, { inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEligibleForStaking", + name: "NotInitializing", type: "error", }, { inputs: [], - name: "NotEvidencePeriod", + name: "UUPSUnauthorizedCallContext", type: "error", }, { - inputs: [], - name: "NotExecutionPeriod", + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", type: "error", }, { - inputs: [], - name: "NotInitializing", - 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: "RulingAlreadyExecuted", - type: "error", + 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: "SortitionModuleOnly", - type: "error", + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "StakingInTooManyCourts", + 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", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + EvidenceModule_Proxy: { + address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + 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", + }, + ], + }, + KlerosCore: { + address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", type: "error", }, { inputs: [], - name: "StakingLessThanCourtMinStake", + name: "AppealFeesNotEnough", type: "error", }, { inputs: [], - name: "StakingMoreThanMaxStakePerJuror", + name: "AppealPeriodNotPassed", type: "error", }, { inputs: [], - name: "StakingMoreThanMaxTotalStaked", + name: "ArbitrationFeesNotEnough", type: "error", }, { inputs: [], - name: "StakingNotPossibeInThisCourt", + name: "CannotDisableClassicDK", type: "error", }, { inputs: [], - name: "StakingTransferFailed", + name: "CommitPeriodNotPassed", type: "error", }, { inputs: [], - name: "TokenNotAccepted", + name: "DisputeKitNotSupportedByCourt", type: "error", }, { inputs: [], - name: "TransferFailed", + name: "DisputeKitOnly", type: "error", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", + name: "DisputeNotAppealable", type: "error", }, { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", + inputs: [], + name: "DisputePeriodIsFinal", type: "error", }, { inputs: [], - name: "UnstakingTransferFailed", + name: "DisputeStillDrawing", type: "error", }, { inputs: [], - name: "UnsuccessfulCall", + name: "EvidenceNotPassedAndNotAppeal", type: "error", }, { inputs: [], - name: "UnsupportedDisputeKit", + name: "FailedDelegateCall", type: "error", }, { inputs: [], - name: "VotePeriodNotPassed", + name: "GovernorOnly", type: "error", }, { inputs: [], - name: "WhenNotPausedOnly", + name: "GuardianOrGovernorOnly", type: "error", }, { inputs: [], - name: "WhenPausedOnly", + name: "InvalidDisputKitParent", type: "error", }, { inputs: [], - name: "WrongDisputeKitIndex", + name: "InvalidForkingCourtAsParent", type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IERC20", - name: "_token", + internalType: "address", + name: "implementation", type: "address", }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, ], - name: "AcceptedFeeToken", - type: "event", + name: "InvalidImplementation", + type: "error", }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, + inputs: [], + name: "MinStakeLowerThanParentCourt", + type: "error", + }, + { + inputs: [], + name: "MustSupportDisputeKitClassic", + type: "error", + }, + { + inputs: [], + name: "NotEvidencePeriod", + type: "error", + }, + { + inputs: [], + name: "NotExecutionPeriod", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "RulingAlreadyExecuted", + type: "error", + }, + { + inputs: [], + name: "SortitionModuleOnly", + type: "error", + }, + { + inputs: [], + name: "StakingInTooManyCourts", + type: "error", + }, + { + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", + }, + { + inputs: [], + name: "StakingNotPossibeInThisCourt", + type: "error", + }, + { + inputs: [], + name: "StakingTransferFailed", + type: "error", + }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, + { + inputs: [], + name: "TokenNotAccepted", + type: "error", + }, + { + inputs: [], + name: "TransferFailed", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + inputs: [], + name: "UnstakingTransferFailed", + type: "error", + }, + { + inputs: [], + name: "UnsuccessfulCall", + type: "error", + }, + { + inputs: [], + name: "UnsupportedDisputeKit", + type: "error", + }, + { + inputs: [], + name: "VotePeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "WhenNotPausedOnly", + type: "error", + }, + { + inputs: [], + name: "WhenPausedOnly", + type: "error", + }, + { + inputs: [], + name: "WrongDisputeKitIndex", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + { + indexed: true, + internalType: "bool", + name: "_accepted", + type: "bool", + }, + ], + name: "AcceptedFeeToken", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, ], name: "AppealDecision", type: "event", @@ -10676,9 +11304,9 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", + internalType: "uint96", name: "_courtID", - type: "uint256", + type: "uint96", }, { indexed: true, @@ -11209,25 +11837,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "arbitrableWhitelist", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -11289,24 +11898,6 @@ export default { 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: [ { @@ -11399,19 +11990,6 @@ export default { stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", - }, - ], - name: "changeJurorNft", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -12080,17 +12658,19 @@ export default { name: "_sortitionModuleAddress", type: "address", }, - { - internalType: "contract IERC721", - name: "_jurorNft", - type: "address", - }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -12134,19 +12714,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "jurorNft", - outputs: [ - { - internalType: "contract IERC721", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], name: "jurorProsecutionModule", @@ -12303,6 +12870,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -12321,13 +12901,16 @@ export default { }, ], }, - KlerosCoreNeo_Implementation: { - address: "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", + KlerosCoreNeo: { + address: "0x26bf077037550e437605F07e25EfcAd510715C3A", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -14260,11 +14843,6 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - KlerosCoreNeo_Proxy: { - address: "0x26bf077037550e437605F07e25EfcAd510715C3A", - abi: [ { inputs: [ { @@ -14281,26 +14859,15 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - KlerosCoreRuler: { - address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + KlerosCoreNeo_Implementation: { + address: "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -14312,16 +14879,71 @@ export default { 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", @@ -14334,7 +14956,12 @@ export default { }, { inputs: [], - name: "GovernorOrInstructorOnly", + name: "GuardianOrGovernorOnly", + type: "error", + }, + { + inputs: [], + name: "InvalidDisputKitParent", type: "error", }, { @@ -14355,17 +14982,32 @@ export default { }, { inputs: [], - name: "NoRulerSet", + name: "MinStakeLowerThanParentCourt", type: "error", }, { inputs: [], - name: "NotInitializing", + name: "MustSupportDisputeKitClassic", type: "error", }, { inputs: [], - name: "RulerOnly", + name: "NotEligibleForStaking", + type: "error", + }, + { + inputs: [], + name: "NotEvidencePeriod", + type: "error", + }, + { + inputs: [], + name: "NotExecutionPeriod", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", type: "error", }, { @@ -14375,7 +15017,37 @@ export default { }, { inputs: [], - name: "RulingModeNotSet", + 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", }, { @@ -14404,11 +15076,41 @@ export default { 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: [ @@ -14466,49 +15168,6 @@ export default { name: "AppealPossible", type: "event", }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - type: "event", - }, { anonymous: false, inputs: [ @@ -14560,6 +15219,12 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, + { + indexed: false, + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", + }, ], name: "CourtCreated", type: "event", @@ -14667,13 +15332,19 @@ export default { anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", }, ], - name: "Initialized", + name: "DisputeKitCreated", type: "event", }, { @@ -14681,36 +15352,55 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { indexed: true, internalType: "uint256", - name: "_roundID", + name: "_disputeKitID", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", + indexed: true, + internalType: "bool", + name: "_enable", + type: "bool", }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", + ], + 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: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint256", + name: "_toDisputeKitID", + type: "uint256", }, ], - name: "LeftoverRewardSent", + name: "DisputeKitJump", type: "event", }, { @@ -14718,24 +15408,43 @@ export default { inputs: [ { indexed: true, - internalType: "contract IERC20", - name: "_feeToken", + internalType: "address", + name: "_address", type: "address", }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, { indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", + internalType: "uint256", + name: "_roundID", + type: "uint256", }, { indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + internalType: "uint256", + name: "_voteID", + type: "uint256", }, ], - name: "NewCurrencyRate", + name: "Draw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", type: "event", }, { @@ -14747,14 +15456,32 @@ export default { name: "_disputeID", type: "uint256", }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, { indexed: false, - internalType: "enum KlerosCoreRuler.Period", - name: "_period", - type: "uint8", + internalType: "uint256", + name: "_pnkAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, ], - name: "NewPeriod", + name: "LeftoverRewardSent", type: "event", }, { @@ -14762,24 +15489,24 @@ export default { inputs: [ { indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", + indexed: false, + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", + indexed: false, + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - name: "RulerChanged", + name: "NewCurrencyRate", type: "event", }, { @@ -14787,40 +15514,24 @@ export default { inputs: [ { indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", + internalType: "enum KlerosCoreBase.Period", + name: "_period", + type: "uint8", }, ], - name: "RulerSettingsChanged", + name: "NewPeriod", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Paused", type: "event", }, { @@ -14897,6 +15608,12 @@ export default { name: "TokenAndETHShift", type: "event", }, + { + anonymous: false, + inputs: [], + name: "Unpaused", + type: "event", + }, { anonymous: false, inputs: [ @@ -14910,6 +15627,19 @@ export default { name: "Upgraded", type: "event", }, + { + inputs: [ + { + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -14924,14 +15654,9 @@ export default { }, { internalType: "bytes", - name: "", + name: "_extraData", type: "bytes", }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, ], name: "appeal", outputs: [], @@ -14945,11 +15670,6 @@ export default { name: "_disputeID", type: "uint256", }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, ], name: "appealCost", outputs: [ @@ -14962,6 +15682,49 @@ export default { 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: [ { @@ -15023,6 +15786,24 @@ export default { 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: [ { @@ -15105,12 +15886,12 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "address", + name: "_guardian", type: "address", }, ], - name: "changePinakion", + name: "changeGuardian", outputs: [], stateMutability: "nonpayable", type: "function", @@ -15118,17 +15899,12 @@ export default { { inputs: [ { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", + internalType: "contract IERC721", + name: "_jurorNft", type: "address", }, ], - name: "changeRuler", + name: "changeJurorNft", outputs: [], stateMutability: "nonpayable", type: "function", @@ -15136,27 +15912,12 @@ export default { { inputs: [ { - internalType: "contract IArbitrableV2", - name: "_arbitrable", + internalType: "address", + name: "_jurorProsecutionModule", type: "address", }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, ], - name: "changeRulingModeToAutomaticPreset", + name: "changeJurorProsecutionModule", outputs: [], stateMutability: "nonpayable", type: "function", @@ -15164,12 +15925,12 @@ export default { { inputs: [ { - internalType: "contract IArbitrableV2", - name: "_arbitrable", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, ], - name: "changeRulingModeToAutomaticRandom", + name: "changePinakion", outputs: [], stateMutability: "nonpayable", type: "function", @@ -15177,12 +15938,12 @@ export default { { inputs: [ { - internalType: "contract IArbitrableV2", - name: "_arbitrable", + internalType: "contract ISortitionModule", + name: "_sortitionModule", type: "address", }, ], - name: "changeRulingModeToManual", + name: "changeSortitionModule", outputs: [], stateMutability: "nonpayable", type: "function", @@ -15297,6 +16058,16 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, + { + internalType: "bytes", + name: "_sortitionExtraData", + type: "bytes", + }, + { + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", + }, ], name: "createCourt", outputs: [], @@ -15419,6 +16190,25 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "disputeKits", + outputs: [ + { + internalType: "contract IDisputeKit", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -15440,7 +16230,7 @@ export default { type: "address", }, { - internalType: "enum KlerosCoreRuler.Period", + internalType: "enum KlerosCoreBase.Period", name: "period", type: "uint8", }, @@ -15449,10 +16239,56 @@ export default { 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: [ { @@ -15465,6 +16301,11 @@ export default { name: "_round", type: "uint256", }, + { + internalType: "uint256", + name: "_iterations", + type: "uint256", + }, ], name: "execute", outputs: [], @@ -15501,21 +16342,6 @@ export default { name: "_disputeID", type: "uint256", }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, ], name: "executeRuling", outputs: [], @@ -15524,7 +16350,7 @@ export default { }, { inputs: [], - name: "getNextDisputeID", + name: "getDisputeKitsLength", outputs: [ { internalType: "uint256", @@ -15590,23 +16416,63 @@ export default { 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 KlerosCoreRuler.Round", + internalType: "struct KlerosCoreBase.Round", name: "", type: "tuple", }, @@ -15646,6 +16512,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "guardian", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -15653,16 +16532,56 @@ export default { 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: [], @@ -15670,44 +16589,68 @@ export default { type: "function", }, { - inputs: [], - name: "pinakion", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "isDisputeKitJumping", outputs: [ { - internalType: "contract IERC20", + internalType: "bool", name: "", - type: "address", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + inputs: [ { - internalType: "bytes32", + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + ], + name: "isSupported", + outputs: [ + { + internalType: "bool", name: "", - type: "bytes32", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "jurorNft", + outputs: [ { - internalType: "contract IArbitrableV2", - name: "arbitrable", + internalType: "contract IERC721", + name: "", type: "address", }, ], - name: "rulers", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "jurorProsecutionModule", outputs: [ { internalType: "address", - name: "ruler", + name: "", type: "address", }, ], @@ -15718,26 +16661,56 @@ export default { inputs: [ { internalType: "uint256", - name: "disputeID", + name: "_disputeID", type: "uint256", }, ], - name: "rulingResults", + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, { internalType: "bool", - name: "tied", + 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: "bool", - name: "overridden", - type: "bool", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], stateMutability: "view", @@ -15746,37 +16719,69 @@ export default { { inputs: [ { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", }, ], - name: "settings", - outputs: [ + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { internalType: "uint256", - name: "presetRuling", + name: "_newStake", type: "uint256", }, { internalType: "bool", - name: "presetTied", + name: "_alreadyTransferred", type: "bool", }, + ], + name: "setStakeBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "sortitionModule", + outputs: [ { - internalType: "bool", - name: "presetOverridden", - type: "bool", + internalType: "contract ISortitionModule", + name: "", + type: "address", }, ], stateMutability: "view", type: "function", }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -15795,6 +16800,11 @@ export default { stateMutability: "payable", type: "function", }, + ], + }, + KlerosCoreNeo_Proxy: { + address: "0x26bf077037550e437605F07e25EfcAd510715C3A", + abi: [ { inputs: [ { @@ -15811,15 +16821,26 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - KlerosCoreRuler_Implementation: { - address: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + KlerosCoreRuler: { + address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -17314,11 +18335,6 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - KlerosCoreRuler_Proxy: { - address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - abi: [ { inputs: [ { @@ -17335,31 +18351,15 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - KlerosCoreUniversity: { - address: "0x10BaAFDe8B4d3164CA781571e2F1513317f57980", + KlerosCoreRuler_Implementation: { + address: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, { inputs: [], - name: "AllJurorsDrawn", - type: "error", + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -17371,11 +18371,6 @@ export default { name: "AppealFeesNotEnough", type: "error", }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, { inputs: [], name: "ArbitrationFeesNotEnough", @@ -17383,188 +18378,98 @@ export default { }, { inputs: [], - name: "ArraysLengthMismatch", + name: "DisputeNotAppealable", type: "error", }, { inputs: [], - name: "CannotDisableClassicDK", + name: "FailedDelegateCall", type: "error", }, { inputs: [], - name: "CommitPeriodNotPassed", + name: "GovernorOnly", type: "error", }, { inputs: [], - name: "DepthLevelMax", + name: "GovernorOrInstructorOnly", type: "error", }, { inputs: [], - name: "DisputeKitNotSupportedByCourt", + name: "InvalidForkingCourtAsParent", type: "error", }, { - inputs: [], - name: "DisputeKitOnly", + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", type: "error", }, { inputs: [], - name: "DisputeNotAppealable", + name: "NoRulerSet", type: "error", }, { inputs: [], - name: "DisputePeriodIsFinal", + name: "NotInitializing", type: "error", }, { inputs: [], - name: "DisputeStillDrawing", + name: "RulerOnly", type: "error", }, { inputs: [], - name: "EvidenceNotPassedAndNotAppeal", + name: "RulingAlreadyExecuted", type: "error", }, { inputs: [], - name: "FailedDelegateCall", + name: "RulingModeNotSet", type: "error", }, { inputs: [], - name: "GovernorOnly", + name: "TokenNotAccepted", type: "error", }, { inputs: [], - name: "GovernorOrInstructorOnly", + name: "TransferFailed", type: "error", }, { inputs: [], - name: "InstructorOnly", + name: "UUPSUnauthorizedCallContext", type: "error", }, { - inputs: [], - name: "InvalidDisputKitParent", + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", type: "error", }, { inputs: [], - name: "InvalidForkingCourtAsParent", + name: "UnsuccessfulCall", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NoJurorDrawn", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingFailed", - 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: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, + anonymous: false, inputs: [ { indexed: true, @@ -17620,6 +18525,49 @@ export default { name: "AppealPossible", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "enum KlerosCoreRuler.RulingMode", + name: "mode", + type: "uint8", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "tied", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "overridden", + type: "bool", + }, + ], + name: "AutoRuled", + type: "event", + }, { anonymous: false, inputs: [ @@ -17671,12 +18619,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "CourtCreated", type: "event", @@ -17780,112 +18722,6 @@ export default { 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: [ @@ -17972,7 +18808,7 @@ export default { }, { indexed: false, - internalType: "enum KlerosCoreUniversity.Period", + internalType: "enum KlerosCoreRuler.Period", name: "_period", type: "uint8", }, @@ -17991,7 +18827,73 @@ export default { }, { indexed: true, - internalType: "uint256", + internalType: "address", + name: "_oldRuler", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_newRuler", + type: "address", + }, + ], + name: "RulerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + components: [ + { + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", + }, + { + internalType: "uint256", + name: "presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "presetOverridden", + type: "bool", + }, + ], + indexed: false, + internalType: "struct KlerosCoreRuler.RulerSettings", + name: "_settings", + type: "tuple", + }, + ], + name: "RulerSettingsChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "uint256", name: "_disputeID", type: "uint256", }, @@ -18067,19 +18969,6 @@ export default { name: "Upgraded", type: "event", }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -18094,9 +18983,14 @@ export default { }, { internalType: "bytes", - name: "_extraData", + name: "", type: "bytes", }, + { + internalType: "bool", + name: "_jump", + type: "bool", + }, ], name: "appeal", outputs: [], @@ -18110,36 +19004,17 @@ export default { name: "_disputeID", type: "uint256", }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bool", + name: "_jump", + type: "bool", }, ], - name: "appealPeriod", + name: "appealCost", outputs: [ { internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", + name: "cost", type: "uint256", }, ], @@ -18289,25 +19164,30 @@ export default { { inputs: [ { - internalType: "address", - name: "_instructor", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, ], - name: "changeInstructor", + name: "changePinakion", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, { internalType: "address", - name: "_jurorProsecutionModule", + name: "_newRuler", type: "address", }, ], - name: "changeJurorProsecutionModule", + name: "changeRuler", outputs: [], stateMutability: "nonpayable", type: "function", @@ -18315,12 +19195,27 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, + { + internalType: "uint256", + name: "_presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "_presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "_presetOverridden", + type: "bool", + }, ], - name: "changePinakion", + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", type: "function", @@ -18328,12 +19223,25 @@ export default { { inputs: [ { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModule", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToAutomaticRandom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", type: "function", @@ -18448,11 +19356,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -18575,25 +19478,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -18615,7 +19499,7 @@ export default { type: "address", }, { - internalType: "enum KlerosCoreUniversity.Period", + internalType: "enum KlerosCoreRuler.Period", name: "period", type: "uint8", }, @@ -18624,11 +19508,6 @@ export default { name: "ruled", type: "bool", }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, ], stateMutability: "view", type: "function", @@ -18641,12 +19520,12 @@ export default { type: "uint256", }, { - internalType: "address", - name: "_juror", - type: "address", + internalType: "uint256", + name: "_round", + type: "uint256", }, ], - name: "draw", + name: "execute", outputs: [], stateMutability: "nonpayable", type: "function", @@ -18654,22 +19533,22 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "address", + name: "_destination", + type: "address", }, { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", + internalType: "uint256", + name: "_amount", + type: "uint256", }, { - internalType: "bool", - name: "_enable", - type: "bool", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "enableDisputeKits", + name: "executeGovernorProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -18683,63 +19562,32 @@ export default { }, { internalType: "uint256", - name: "_round", + name: "_ruling", type: "uint256", }, { - internalType: "uint256", - name: "_iterations", - type: "uint256", + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", }, ], - name: "execute", + name: "executeRuling", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, + inputs: [], + name: "getNextDisputeID", + outputs: [ { 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: "", + name: "", type: "uint256", }, ], @@ -18801,63 +19649,23 @@ export default { outputs: [ { components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, { internalType: "uint256", name: "totalFeesForJurors", type: "uint256", }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, { internalType: "uint256", name: "sumFeeRewardPaid", type: "uint256", }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, { internalType: "contract IERC20", name: "feeToken", type: "address", }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, ], - internalType: "struct KlerosCoreUniversity.Round", + internalType: "struct KlerosCoreRuler.Round", name: "", type: "tuple", }, @@ -18904,46 +19712,16 @@ export default { name: "_governor", type: "address", }, - { - internalType: "address", - name: "_instructor", - type: "address", - }, { internalType: "contract IERC20", name: "_pinakion", type: "address", }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, { internalType: "uint256[4]", name: "_courtParameters", type: "uint256[4]", }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModuleAddress", - type: "address", - }, ], name: "initialize", outputs: [], @@ -18952,10 +19730,10 @@ export default { }, { inputs: [], - name: "instructor", + name: "pinakion", outputs: [ { - internalType: "address", + internalType: "contract IERC20", name: "", type: "address", }, @@ -18964,19 +19742,13 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], stateMutability: "view", @@ -18985,34 +19757,16 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", + internalType: "contract IArbitrableV2", + name: "arbitrable", + type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", + name: "rulers", outputs: [ { internalType: "address", - name: "", + name: "ruler", type: "address", }, ], @@ -19023,95 +19777,60 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "disputeID", type: "uint256", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", + name: "rulingResults", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "uint256", + name: "ruling", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "bool", + name: "tied", + type: "bool", }, { - internalType: "uint256", - name: "_newStake", - type: "uint256", + internalType: "bool", + name: "overridden", + type: "bool", }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_account", + internalType: "contract IArbitrableV2", + name: "arbitrable", type: "address", }, + ], + name: "settings", + outputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", }, { internalType: "uint256", - name: "_newStake", + name: "presetRuling", type: "uint256", }, { internalType: "bool", - name: "_alreadyTransferred", + name: "presetTied", type: "bool", }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ { - internalType: "contract ISortitionModuleUniversity", - name: "", - type: "address", + internalType: "bool", + name: "presetOverridden", + type: "bool", }, ], stateMutability: "view", @@ -19135,6 +19854,11 @@ export default { stateMutability: "payable", type: "function", }, + ], + }, + KlerosCoreRuler_Proxy: { + address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + abi: [ { inputs: [ { @@ -19151,22 +19875,164 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - ], - }, - KlerosCoreUniversity_Implementation: { - address: "0x8466ab62E7c923e8F2E61d0358C495676D6F939b", - abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", }, { - inputs: [], - name: "AllJurorsDrawn", - type: "error", + stateMutability: "payable", + type: "receive", }, - { + ], + }, + KlerosCoreSnapshotProxy: { + address: "0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "totalStaked", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "core", + outputs: [ + { + internalType: "contract IKlerosCore", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + KlerosCoreUniversity: { + address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AllJurorsDrawn", + type: "error", + }, + { inputs: [], name: "AlreadyInitialized", type: "error", @@ -19319,7 +20185,22 @@ export default { }, { inputs: [], - name: "StakingFailed", + name: "StakingInTooManyCourts", + type: "error", + }, + { + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", + }, + { + inputs: [], + name: "StakingNotPossibeInThisCourt", + type: "error", + }, + { + inputs: [], + name: "StakingTransferFailed", type: "error", }, { @@ -19348,6 +20229,11 @@ export default { name: "UUPSUnsupportedProxiableUUID", type: "error", }, + { + inputs: [], + name: "UnstakingTransferFailed", + type: "error", + }, { inputs: [], name: "UnsuccessfulCall", @@ -20940,11 +21826,6 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - KlerosCoreUniversity_Proxy: { - address: "0x10BaAFDe8B4d3164CA781571e2F1513317f57980", - abi: [ { inputs: [ { @@ -20961,24 +21842,21 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - KlerosCore_Implementation: { - address: "0x91a373BBdE0532F86410682F362e2Cf685e95085", + KlerosCoreUniversity_Implementation: { + address: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", abi: [ { inputs: [], stateMutability: "nonpayable", type: "constructor", }, + { + inputs: [], + name: "AllJurorsDrawn", + type: "error", + }, { inputs: [], name: "AlreadyInitialized", @@ -21059,6 +21937,16 @@ export default { name: "GovernorOnly", type: "error", }, + { + inputs: [], + name: "GovernorOrInstructorOnly", + type: "error", + }, + { + inputs: [], + name: "InstructorOnly", + type: "error", + }, { inputs: [], name: "InvalidDisputKitParent", @@ -21090,6 +21978,11 @@ export default { name: "MustSupportDisputeKitClassic", type: "error", }, + { + inputs: [], + name: "NoJurorDrawn", + type: "error", + }, { inputs: [], name: "NotEvidencePeriod", @@ -21117,7 +22010,22 @@ export default { }, { inputs: [], - name: "StakingFailed", + name: "StakingInTooManyCourts", + type: "error", + }, + { + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", + }, + { + inputs: [], + name: "StakingNotPossibeInThisCourt", + type: "error", + }, + { + inputs: [], + name: "StakingTransferFailed", type: "error", }, { @@ -21146,6 +22054,11 @@ export default { name: "UUPSUnsupportedProxiableUUID", type: "error", }, + { + inputs: [], + name: "UnstakingTransferFailed", + type: "error", + }, { inputs: [], name: "UnsuccessfulCall", @@ -21189,496 +22102,2958 @@ export default { anonymous: false, inputs: [ { - indexed: true, + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "AppealDecision", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "AppealPossible", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_courtID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint96", + name: "_parent", + type: "uint96", + }, + { + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "_minStake", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", + }, + ], + name: "CourtCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", + }, + { + indexed: false, + internalType: "uint96", + name: "_toCourtID", + type: "uint96", + }, + ], + name: "CourtJump", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "_minStake", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + ], + name: "CourtModified", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "DisputeCreation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", + }, + ], + name: "DisputeKitCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + { + indexed: true, + internalType: "bool", + name: "_enable", + type: "bool", + }, + ], + name: "DisputeKitEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_fromDisputeKitID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_toDisputeKitID", + type: "uint256", + }, + ], + name: "DisputeKitJump", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_voteID", + type: "uint256", + }, + ], + name: "Draw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_pnkAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "LeftoverRewardSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + indexed: false, + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + indexed: false, + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", + }, + ], + name: "NewCurrencyRate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "enum KlerosCoreUniversity.Period", + name: "_period", + type: "uint8", + }, + ], + name: "NewPeriod", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + ], + name: "Ruling", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_degreeOfCoherency", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_pnkAmount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "_feeAmount", + type: "int256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "TokenAndETHShift", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [ + { + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "appeal", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "appealCost", + outputs: [ + { + internalType: "uint256", + name: "cost", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "appealPeriod", + outputs: [ + { + internalType: "uint256", + name: "start", + type: "uint256", + }, + { + internalType: "uint256", + name: "end", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "arbitrationCost", + outputs: [ + { + internalType: "uint256", + name: "cost", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "arbitrationCost", + outputs: [ + { + internalType: "uint256", + name: "cost", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "bool", + name: "_accepted", + type: "bool", + }, + ], + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + internalType: "uint256", + name: "_minStake", + type: "uint256", + }, + { + internalType: "uint256", + name: "_alpha", + type: "uint256", + }, + { + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", + }, + { + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + ], + name: "changeCourtParameters", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", + }, + ], + name: "changeCurrencyRates", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_instructor", + type: "address", + }, + ], + name: "changeInstructor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_jurorProsecutionModule", + type: "address", + }, + ], + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_pinakion", + type: "address", + }, + ], + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISortitionModuleUniversity", + name: "_sortitionModule", + type: "address", + }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_toToken", + type: "address", + }, + { + internalType: "uint256", + name: "_amountInEth", + type: "uint256", + }, + ], + name: "convertEthToTokenAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "courts", + outputs: [ + { + internalType: "uint96", + name: "parent", + type: "uint96", + }, + { + internalType: "bool", + name: "hiddenVotes", + type: "bool", + }, + { + internalType: "uint256", + name: "minStake", + type: "uint256", + }, + { + internalType: "uint256", + name: "alpha", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "jurorsForCourtJump", + type: "uint256", + }, + { + internalType: "bool", + name: "disabled", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "_parent", + type: "uint96", + }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + internalType: "uint256", + name: "_minStake", + type: "uint256", + }, + { + internalType: "uint256", + name: "_alpha", + type: "uint256", + }, + { + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", + }, + { + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", + }, + ], + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "createDispute", + outputs: [ + { + internalType: "uint256", + name: "disputeID", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "_feeAmount", + type: "uint256", + }, + ], + name: "createDispute", + outputs: [ + { + internalType: "uint256", + name: "disputeID", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + name: "currencyRates", + outputs: [ + { + internalType: "bool", + name: "feePaymentAccepted", + type: "bool", + }, + { + internalType: "uint64", + name: "rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "rateDecimals", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "currentRuling", + outputs: [ + { + internalType: "uint256", + name: "ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "disputeKits", + outputs: [ + { + internalType: "contract IDisputeKit", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "disputes", + outputs: [ + { + internalType: "uint96", + name: "courtID", + type: "uint96", + }, + { + internalType: "contract IArbitrableV2", + name: "arbitrated", + type: "address", + }, + { + internalType: "enum KlerosCoreUniversity.Period", + name: "period", + type: "uint8", + }, + { + internalType: "bool", + name: "ruled", + type: "bool", + }, + { + internalType: "uint256", + name: "lastPeriodChange", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "address", + name: "_juror", + type: "address", + }, + ], + name: "draw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256[]", + name: "_disputeKitIDs", + type: "uint256[]", + }, + { + internalType: "bool", + name: "_enable", + type: "bool", + }, + ], + name: "enableDisputeKits", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_round", + type: "uint256", + }, + { + internalType: "uint256", + name: "_iterations", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_destination", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getDisputeKitsLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "getNumberOfRounds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "getNumberOfVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_round", + type: "uint256", + }, + ], + name: "getRoundInfo", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "disputeKitID", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkAtStakePerJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalFeesForJurors", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "repartitions", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkPenalties", + type: "uint256", + }, + { + internalType: "address[]", + name: "drawnJurors", + type: "address[]", + }, + { + internalType: "uint256", + name: "sumFeeRewardPaid", + type: "uint256", + }, + { + internalType: "uint256", + name: "sumPnkRewardPaid", + type: "uint256", + }, + { + internalType: "contract IERC20", + name: "feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "drawIterations", + type: "uint256", + }, + ], + internalType: "struct KlerosCoreUniversity.Round", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + ], + name: "getTimesPerPeriod", + outputs: [ + { + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "address", + name: "_instructor", + type: "address", + }, + { + internalType: "contract IERC20", + name: "_pinakion", + type: "address", + }, + { + internalType: "address", + name: "_jurorProsecutionModule", + type: "address", + }, + { + internalType: "contract IDisputeKit", + name: "_disputeKit", + type: "address", + }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", + }, + { + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + internalType: "contract ISortitionModuleUniversity", + name: "_sortitionModuleAddress", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "instructor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "isDisputeKitJumping", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + ], + name: "isSupported", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "jurorProsecutionModule", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pinakion", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, + ], + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, + { + internalType: "bool", + name: "_alreadyTransferred", + type: "bool", + }, + ], + name: "setStakeBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "sortitionModule", + outputs: [ + { + internalType: "contract ISortitionModuleUniversity", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + ], + }, + KlerosCoreUniversity_Proxy: { + address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + 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", + }, + ], + }, + KlerosCore_Implementation: { + address: "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AppealFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "ArbitrationFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "CannotDisableClassicDK", + type: "error", + }, + { + inputs: [], + name: "CommitPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "DisputeKitNotSupportedByCourt", + type: "error", + }, + { + inputs: [], + name: "DisputeKitOnly", + type: "error", + }, + { + inputs: [], + name: "DisputeNotAppealable", + type: "error", + }, + { + inputs: [], + name: "DisputePeriodIsFinal", + type: "error", + }, + { + inputs: [], + name: "DisputeStillDrawing", + type: "error", + }, + { + inputs: [], + name: "EvidenceNotPassedAndNotAppeal", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [], + name: "GovernorOnly", + type: "error", + }, + { + inputs: [], + name: "GuardianOrGovernorOnly", + type: "error", + }, + { + inputs: [], + name: "InvalidDisputKitParent", + type: "error", + }, + { + inputs: [], + name: "InvalidForkingCourtAsParent", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "MinStakeLowerThanParentCourt", + type: "error", + }, + { + inputs: [], + name: "MustSupportDisputeKitClassic", + type: "error", + }, + { + inputs: [], + name: "NotEvidencePeriod", + type: "error", + }, + { + inputs: [], + name: "NotExecutionPeriod", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "RulingAlreadyExecuted", + type: "error", + }, + { + inputs: [], + name: "SortitionModuleOnly", + type: "error", + }, + { + inputs: [], + name: "StakingInTooManyCourts", + type: "error", + }, + { + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", + }, + { + inputs: [], + name: "StakingNotPossibeInThisCourt", + type: "error", + }, + { + inputs: [], + name: "StakingTransferFailed", + type: "error", + }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, + { + inputs: [], + name: "TokenNotAccepted", + type: "error", + }, + { + inputs: [], + name: "TransferFailed", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + inputs: [], + name: "UnstakingTransferFailed", + type: "error", + }, + { + inputs: [], + name: "UnsuccessfulCall", + type: "error", + }, + { + inputs: [], + name: "UnsupportedDisputeKit", + type: "error", + }, + { + inputs: [], + name: "VotePeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "WhenNotPausedOnly", + type: "error", + }, + { + inputs: [], + name: "WhenPausedOnly", + type: "error", + }, + { + inputs: [], + name: "WrongDisputeKitIndex", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + { + indexed: true, + internalType: "bool", + name: "_accepted", + type: "bool", + }, + ], + name: "AcceptedFeeToken", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "AppealDecision", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "AppealPossible", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: true, + internalType: "uint96", + name: "_parent", + type: "uint96", + }, + { + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "_minStake", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", + }, + ], + name: "CourtCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", + }, + { + indexed: false, + internalType: "uint96", + name: "_toCourtID", + type: "uint96", + }, + ], + name: "CourtJump", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "_minStake", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + ], + name: "CourtModified", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + ], + name: "DisputeCreation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", + }, + ], + name: "DisputeKitCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", + }, + { + indexed: true, + internalType: "bool", + name: "_enable", + type: "bool", + }, + ], + name: "DisputeKitEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_fromDisputeKitID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_toDisputeKitID", + type: "uint256", + }, + ], + name: "DisputeKitJump", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_voteID", + type: "uint256", + }, + ], + name: "Draw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_pnkAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_feeAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "LeftoverRewardSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + indexed: false, + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + indexed: false, + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", + }, + ], + name: "NewCurrencyRate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "enum KlerosCoreBase.Period", + name: "_period", + type: "uint8", + }, + ], + name: "NewPeriod", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + ], + name: "Ruling", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_degreeOfCoherency", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_pnkAmount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "_feeAmount", + type: "int256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "TokenAndETHShift", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [ + { + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "appeal", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "appealCost", + outputs: [ + { + internalType: "uint256", + name: "cost", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "appealPeriod", + outputs: [ + { + internalType: "uint256", + name: "start", + type: "uint256", + }, + { + internalType: "uint256", + name: "end", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "arbitrationCost", + outputs: [ + { + internalType: "uint256", + name: "cost", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "arbitrationCost", + outputs: [ + { internalType: "uint256", - name: "_disputeID", + name: "cost", type: "uint256", }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, ], - name: "AppealDecision", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "bool", + name: "_accepted", + type: "bool", }, ], - name: "AppealPossible", - type: "event", + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, internalType: "uint96", - name: "_parent", + 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: "changeCourtParameters", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - name: "CourtCreated", - type: "event", + name: "changeCurrencyRates", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address payable", + name: "_governor", + type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "address", + name: "_guardian", + type: "address", }, + ], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", + internalType: "address", + name: "_jurorProsecutionModule", + type: "address", }, + ], + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", + internalType: "contract IERC20", + name: "_pinakion", + type: "address", }, ], - name: "CourtJump", - type: "event", + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "contract ISortitionModule", + name: "_sortitionModule", + type: "address", }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", + internalType: "contract IERC20", + name: "_toToken", + type: "address", }, { - indexed: false, internalType: "uint256", - name: "_minStake", + name: "_amountInEth", type: "uint256", }, + ], + name: "convertEthToTokenAmount", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_alpha", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_feeForJuror", + name: "", type: "uint256", }, + ], + name: "courts", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", + internalType: "uint96", + name: "parent", + type: "uint96", }, { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "bool", + name: "hiddenVotes", + type: "bool", }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "minStake", type: "uint256", }, { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint256", + name: "alpha", + type: "uint256", }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeKitID", + name: "feeForJuror", type: "uint256", }, { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", + internalType: "uint256", + name: "jurorsForCourtJump", + type: "uint256", + }, + { + internalType: "bool", + name: "disabled", + type: "bool", }, ], - name: "DisputeKitCreated", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint96", - name: "_courtID", + name: "_parent", type: "uint96", }, { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, internalType: "bool", - name: "_enable", + name: "_hiddenVotes", type: "bool", }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_minStake", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_roundID", + name: "_alpha", type: "uint256", }, { - indexed: true, internalType: "uint256", - name: "_fromDisputeKitID", + name: "_feeForJuror", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_toDisputeKitID", + 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: "DisputeKitJump", - type: "event", + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_numberOfChoices", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, + ], + name: "createDispute", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_voteID", + name: "disputeID", type: "uint256", }, ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", + stateMutability: "payable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_numberOfChoices", type: "uint256", }, { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, { - indexed: false, internalType: "uint256", name: "_feeAmount", type: "uint256", }, + ], + name: "createDispute", + outputs: [ { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - name: "LeftoverRewardSent", - type: "event", + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "contract IERC20", - name: "_feeToken", + name: "", type: "address", }, + ], + name: "currencyRates", + outputs: [ + { + internalType: "bool", + name: "feePaymentAccepted", + type: "bool", + }, { - indexed: false, internalType: "uint64", - name: "_rateInEth", + name: "rateInEth", type: "uint64", }, { - indexed: false, internalType: "uint8", - name: "_rateDecimals", + name: "rateDecimals", type: "uint8", }, ], - name: "NewCurrencyRate", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, + ], + name: "currentRuling", + outputs: [ { - indexed: false, - internalType: "enum KlerosCore.Period", - name: "_period", - type: "uint8", + internalType: "uint256", + name: "ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", }, ], - name: "NewPeriod", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "", type: "uint256", }, + ], + name: "disputeKits", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", + internalType: "contract IDisputeKit", + name: "", + type: "address", }, ], - name: "Ruling", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_account", + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "disputes", + outputs: [ + { + internalType: "uint96", + name: "courtID", + type: "uint96", + }, + { + internalType: "contract IArbitrableV2", + name: "arbitrated", type: "address", }, { - indexed: true, + internalType: "enum KlerosCoreBase.Period", + name: "period", + type: "uint8", + }, + { + internalType: "bool", + name: "ruled", + type: "bool", + }, + { internalType: "uint256", - name: "_disputeID", + name: "lastPeriodChange", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: true, internalType: "uint256", - name: "_roundID", + name: "_disputeID", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_degreeOfCoherency", + name: "_iterations", type: "uint256", }, + ], + name: "draw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", + internalType: "uint256[]", + name: "_disputeKitIDs", + type: "uint256[]", }, { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "bool", + name: "_enable", + type: "bool", }, ], - name: "TokenAndETHShift", - type: "event", + name: "enableDisputeKits", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", + internalType: "uint256", + name: "_round", + type: "uint256", + }, + { + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - name: "addNewDisputeKit", + name: "execute", outputs: [], stateMutability: "nonpayable", type: "function", @@ -21686,24 +25061,24 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "_destination", + type: "address", }, { internalType: "uint256", - name: "_numberOfChoices", + name: "_amount", type: "uint256", }, { internalType: "bytes", - name: "_extraData", + name: "_data", type: "bytes", }, ], - name: "appeal", + name: "executeGovernorProposal", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { @@ -21714,11 +25089,18 @@ export default { type: "uint256", }, ], - name: "appealCost", + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getDisputeKitsLength", outputs: [ { internalType: "uint256", - name: "cost", + name: "", type: "uint256", }, ], @@ -21733,16 +25115,30 @@ export default { type: "uint256", }, ], - name: "appealPeriod", + name: "getNumberOfRounds", outputs: [ { internalType: "uint256", - name: "start", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", type: "uint256", }, + ], + name: "getNumberOfVotes", + outputs: [ { internalType: "uint256", - name: "end", + name: "", type: "uint256", }, ], @@ -21752,22 +25148,79 @@ export default { { inputs: [ { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint256", + name: "_round", + type: "uint256", }, ], - name: "arbitrationCost", + name: "getRoundInfo", outputs: [ { - internalType: "uint256", - name: "cost", - type: "uint256", + 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", @@ -21776,46 +25229,74 @@ export default { { inputs: [ { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, ], - name: "arbitrationCost", + name: "getTimesPerPeriod", outputs: [ { - internalType: "uint256", - name: "cost", - type: "uint256", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "governor", + outputs: [ { - internalType: "contract IERC20", - name: "_feeToken", + internalType: "address", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "guardian", + outputs: [ { - internalType: "bool", - name: "_accepted", - type: "bool", + internalType: "address", + name: "", + type: "address", }, ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + 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", @@ -21823,130 +25304,148 @@ export default { type: "bool", }, { - internalType: "uint256", - name: "_minStake", - type: "uint256", + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", }, { - internalType: "uint256", - name: "_alpha", - type: "uint256", + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", + internalType: "bytes", + name: "_sortitionExtraData", + type: "bytes", }, + { + internalType: "contract ISortitionModule", + name: "_sortitionModuleAddress", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "_jurorsForCourtJump", + name: "_disputeID", type: "uint256", }, + ], + name: "isDisputeKitJumping", + outputs: [ { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, + ], + name: "isSupported", + outputs: [ { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "jurorProsecutionModule", + outputs: [ { - internalType: "address payable", - name: "_governor", + internalType: "address", + name: "", type: "address", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, ], - name: "changeJurorProsecutionModule", + name: "passPeriod", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", + inputs: [], + name: "pause", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "paused", + outputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "pinakion", + outputs: [ { internalType: "contract IERC20", - name: "_toToken", + name: "", type: "address", }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, ], - name: "convertEthToTokenAmount", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", @@ -21954,188 +25453,258 @@ export default { }, { inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ { internalType: "uint96", - name: "parent", + name: "_courtID", type: "uint96", }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, { internalType: "uint256", - name: "minStake", + name: "_newStake", type: "uint256", }, + ], + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "alpha", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { internalType: "uint256", - name: "jurorsForCourtJump", + name: "_newStake", type: "uint256", }, { internalType: "bool", - name: "disabled", + name: "_alreadyTransferred", type: "bool", }, ], - stateMutability: "view", + name: "setStakeBySortitionModule", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, + inputs: [], + name: "sortitionModule", + outputs: [ { - internalType: "uint256", - name: "_minStake", - type: "uint256", + internalType: "contract ISortitionModule", + name: "", + type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_alpha", - type: "uint256", + internalType: "address", + name: "newImplementation", + type: "address", }, { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", + internalType: "string", + name: "", + type: "string", }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + KlerosCore_Proxy: { + address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + abi: [ + { + inputs: [ { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "address", + name: "_implementation", + type: "address", }, { internalType: "bytes", - name: "_sortitionExtraData", + name: "_data", type: "bytes", }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + }, + KlerosV2NeoEarlyUser: { + address: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", + internalType: "string", + name: "_symbol", + type: "string", }, ], - name: "createCourt", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + indexed: true, + internalType: "address", + name: "owner", + type: "address", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: true, + internalType: "address", + name: "approved", + type: "address", }, - ], - name: "createDispute", - outputs: [ { + indexed: true, internalType: "uint256", - name: "disputeID", + name: "tokenId", type: "uint256", }, ], - stateMutability: "payable", - type: "function", + name: "Approval", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + indexed: true, + internalType: "address", + name: "owner", + type: "address", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: true, + internalType: "address", + name: "operator", + type: "address", }, { - internalType: "contract IERC20", - name: "_feeToken", + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", type: "address", }, { + indexed: true, internalType: "uint256", - name: "_feeAmount", + name: "tokenId", type: "uint256", }, ], - name: "createDispute", - outputs: [ + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, { internalType: "uint256", - name: "disputeID", + name: "tokenId", type: "uint256", }, ], + name: "approve", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "contract IERC20", - name: "", + internalType: "address", + name: "owner", type: "address", }, ], - name: "currencyRates", + name: "balanceOf", outputs: [ { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", + internalType: "uint256", + name: "", + type: "uint256", }, ], stateMutability: "view", @@ -22144,27 +25713,30 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "_newOwner", + type: "address", }, ], - name: "currentRuling", - outputs: [ + name: "changeOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "ruling", + name: "tokenId", type: "uint256", }, + ], + name: "getApproved", + outputs: [ { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", + internalType: "address", + name: "", + type: "address", }, ], stateMutability: "view", @@ -22173,57 +25745,49 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", }, ], - name: "disputeKits", + name: "isApprovedForAll", outputs: [ { - internalType: "contract IDisputeKit", + internalType: "bool", name: "", - type: "address", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "name", + outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], - name: "disputes", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", outputs: [ { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", + internalType: "address", + name: "", type: "address", }, - { - internalType: "enum KlerosCore.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, ], stateMutability: "view", type: "function", @@ -22232,39 +25796,30 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "tokenId", type: "uint256", }, + ], + name: "ownerOf", + outputs: [ { - internalType: "uint256", - name: "_iterations", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", + internalType: "address", + name: "to", + type: "address", }, ], - name: "enableDisputeKits", + name: "safeMint", outputs: [], stateMutability: "nonpayable", type: "function", @@ -22272,22 +25827,22 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "from", + type: "address", }, { - internalType: "uint256", - name: "_round", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, { internalType: "uint256", - name: "_iterations", + name: "tokenId", type: "uint256", }, ], - name: "execute", + name: "safeTransferFrom", outputs: [], stateMutability: "nonpayable", type: "function", @@ -22296,21 +25851,26 @@ export default { inputs: [ { internalType: "address", - name: "_destination", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", type: "address", }, { internalType: "uint256", - name: "_amount", + name: "tokenId", type: "uint256", }, { internalType: "bytes", - name: "_data", + name: "data", type: "bytes", }, ], - name: "executeGovernorProposal", + name: "safeTransferFrom", outputs: [], stateMutability: "nonpayable", type: "function", @@ -22318,43 +25878,48 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", }, ], - name: "executeRuling", + name: "setApprovalForAll", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "getDisputeKitsLength", + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", + inputs: [], + name: "symbol", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -22364,16 +25929,16 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "tokenId", type: "uint256", }, ], - name: "getNumberOfVotes", + name: "tokenURI", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -22382,178 +25947,180 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "from", + type: "address", }, { - internalType: "uint256", - name: "_round", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, - ], - 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 KlerosCore.Round", - name: "", - type: "tuple", + internalType: "uint256", + name: "tokenId", + type: "uint256", }, ], - stateMutability: "view", + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", type: "function", }, + ], + }, + PNK: { + address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, { + anonymous: false, inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + indexed: true, + internalType: "address", + name: "owner", + type: "address", }, - ], - name: "getTimesPerPeriod", - outputs: [ { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Approval", + type: "event", }, { - inputs: [], - name: "governor", - outputs: [ + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "", + name: "from", type: "address", }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, ], - stateMutability: "view", - type: "function", + name: "Transfer", + type: "event", }, { inputs: [ { internalType: "address", - name: "_governor", + name: "owner", type: "address", }, { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "address", + name: "spender", type: "address", }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "_jurorProsecutionModule", + name: "spender", type: "address", }, { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", + internalType: "uint256", + name: "amount", + type: "uint256", }, + ], + name: "approve", + outputs: [ { internalType: "bool", - name: "_hiddenVotes", + name: "", type: "bool", }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "address", + name: "account", + type: "address", }, + ], + name: "balanceOf", + outputs: [ { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", + internalType: "uint8", + name: "", + type: "uint8", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "_disputeID", + name: "subtractedValue", type: "uint256", }, ], - name: "isDisputeKitJumping", + name: "decreaseAllowance", outputs: [ { internalType: "bool", @@ -22561,23 +26128,23 @@ export default { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "_disputeKitID", + name: "addedValue", type: "uint256", }, ], - name: "isSupported", + name: "increaseAllowance", outputs: [ { internalType: "bool", @@ -22585,43 +26152,30 @@ export default { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "jurorProsecutionModule", + name: "name", outputs: [ { - internalType: "address", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [], - name: "pinakion", + name: "symbol", outputs: [ { - internalType: "contract IERC20", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", @@ -22629,12 +26183,12 @@ export default { }, { inputs: [], - name: "proxiableUUID", + name: "totalSupply", outputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], stateMutability: "view", @@ -22643,18 +26197,24 @@ export default { { inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "address", + name: "to", + type: "address", }, { internalType: "uint256", - name: "_newStake", + name: "amount", type: "uint256", }, ], - name: "setStake", - outputs: [], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, @@ -22662,108 +26222,165 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "from", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "address", + name: "to", + type: "address", }, { internalType: "uint256", - name: "_newStake", + name: "amount", type: "uint256", }, + ], + name: "transferFrom", + outputs: [ { internalType: "bool", - name: "_alreadyTransferred", + name: "", type: "bool", }, ], - name: "setStakeBySortitionModule", - outputs: [], stateMutability: "nonpayable", type: "function", }, + ], + }, + PNKFaucet: { + address: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", + abi: [ + { + inputs: [ + { + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, { inputs: [], - name: "sortitionModule", + name: "amount", outputs: [ { - internalType: "contract ISortitionModule", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "balance", + outputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - name: "upgradeToAndCall", + name: "changeAmount", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, - ], - }, - KlerosCore_Proxy: { - address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - abi: [ { inputs: [ { internalType: "address", - name: "_implementation", + name: "_governor", type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "address", + name: "", + type: "address", }, ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "request", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - stateMutability: "payable", - type: "fallback", + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - stateMutability: "payable", - type: "receive", + inputs: [], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, - ], - }, - KlerosV2NeoEarlyUser: { - address: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", - abi: [ { inputs: [ { - internalType: "string", - name: "_name", - type: "string", + internalType: "address", + name: "", + type: "address", }, + ], + name: "withdrewAlready", + outputs: [ { - internalType: "string", - name: "_symbol", - type: "string", + internalType: "bool", + name: "", + type: "bool", }, ], + stateMutability: "view", + type: "function", + }, + ], + }, + PinakionV2: { + address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", + abi: [ + { + inputs: [], stateMutability: "nonpayable", type: "constructor", }, @@ -22779,13 +26396,13 @@ export default { { indexed: true, internalType: "address", - name: "approved", + name: "spender", type: "address", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "tokenId", + name: "value", type: "uint256", }, ], @@ -22798,65 +26415,70 @@ export default { { indexed: true, internalType: "address", - name: "owner", + name: "from", type: "address", }, { indexed: true, internalType: "address", - name: "operator", + name: "to", type: "address", }, { indexed: false, - internalType: "bool", - name: "approved", - type: "bool", + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: "ApprovalForAll", + name: "Transfer", type: "event", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "from", + name: "owner", type: "address", }, { - indexed: true, internalType: "address", - name: "to", + name: "spender", type: "address", }, + ], + name: "allowance", + outputs: [ { - indexed: true, internalType: "uint256", - name: "tokenId", + name: "", type: "uint256", }, ], - name: "Transfer", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "address", - name: "to", + name: "spender", type: "address", }, { internalType: "uint256", - name: "tokenId", + name: "amount", type: "uint256", }, ], name: "approve", - outputs: [], + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, @@ -22864,7 +26486,7 @@ export default { inputs: [ { internalType: "address", - name: "owner", + name: "account", type: "address", }, ], @@ -22880,51 +26502,56 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "decimals", + outputs: [ { - internalType: "address", - name: "_newOwner", - type: "address", + internalType: "uint8", + name: "", + type: "uint8", }, ], - name: "changeOwner", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "tokenId", + name: "subtractedValue", type: "uint256", }, ], - name: "getApproved", + name: "decreaseAllowance", outputs: [ { - internalType: "address", + internalType: "bool", name: "", - type: "address", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "owner", + name: "spender", type: "address", }, { - internalType: "address", - name: "operator", - type: "address", + internalType: "uint256", + name: "addedValue", + type: "uint256", }, ], - name: "isApprovedForAll", + name: "increaseAllowance", outputs: [ { internalType: "bool", @@ -22932,7 +26559,7 @@ export default { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { @@ -22950,31 +26577,25 @@ export default { }, { inputs: [], - name: "owner", + name: "symbol", outputs: [ { - internalType: "address", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ownerOf", + inputs: [], + name: "totalSupply", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -22987,32 +26608,20 @@ export default { name: "to", type: "address", }, - ], - name: "safeMint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, { internalType: "uint256", - name: "tokenId", + name: "amount", type: "uint256", }, ], - name: "safeTransferFrom", - outputs: [], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, @@ -23030,145 +26639,112 @@ export default { }, { internalType: "uint256", - name: "tokenId", + name: "amount", type: "uint256", }, + ], + name: "transferFrom", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "safeTransferFrom", - outputs: [], stateMutability: "nonpayable", type: "function", }, + ], + }, + PolicyRegistry: { + address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, { inputs: [ { internalType: "address", - name: "operator", + name: "implementation", type: "address", }, - { - internalType: "bool", - name: "approved", - type: "bool", - }, ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "InvalidImplementation", + type: "error", }, { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", + inputs: [], + name: "NotInitializing", + type: "error", }, { inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", + name: "UUPSUnauthorizedCallContext", + type: "error", }, { inputs: [ { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "tokenURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - PNK: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: "address", - name: "owner", - type: "address", + internalType: "uint256", + name: "_courtID", + type: "uint256", }, { - indexed: true, - internalType: "address", - name: "spender", - type: "address", + indexed: false, + internalType: "string", + name: "_courtName", + type: "string", }, { indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "string", + name: "_policy", + type: "string", }, ], - name: "Approval", + name: "PolicyUpdate", type: "event", }, { @@ -23177,44 +26753,34 @@ export default { { indexed: true, internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", + name: "newImplementation", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, ], - name: "Transfer", + name: "Upgraded", type: "event", }, { inputs: [ { internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", + name: "_governor", type: "address", }, ], - name: "allowance", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -23224,40 +26790,36 @@ export default { inputs: [ { internalType: "address", - name: "spender", + name: "_governor", type: "address", }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize2", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "balanceOf", + name: "policies", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -23265,12 +26827,12 @@ export default { }, { inputs: [], - name: "decimals", + name: "proxiableUUID", outputs: [ { - internalType: "uint8", + internalType: "bytes32", name: "", - type: "uint8", + type: "bytes32", }, ], stateMutability: "view", @@ -23278,25 +26840,24 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, { internalType: "uint256", - name: "subtractedValue", + name: "_courtID", type: "uint256", }, - ], - name: "decreaseAllowance", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "string", + name: "_courtName", + type: "string", + }, + { + internalType: "string", + name: "_policy", + type: "string", }, ], + name: "setPolicy", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -23304,29 +26865,23 @@ export default { inputs: [ { internalType: "address", - name: "spender", + name: "newImplementation", type: "address", }, { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - stateMutability: "nonpayable", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [], - name: "name", + name: "version", outputs: [ { internalType: "string", @@ -23337,122 +26892,198 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + ], + }, + PolicyRegistry_Implementation: { + address: "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, { inputs: [], - name: "symbol", - outputs: [ + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "address", + name: "implementation", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "InvalidImplementation", + type: "error", }, { inputs: [], - name: "totalSupply", - outputs: [ + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "to", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "amount", + name: "_courtID", type: "uint256", }, - ], - name: "transfer", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "string", + name: "_courtName", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_policy", + type: "string", }, ], - stateMutability: "nonpayable", - type: "function", + name: "PolicyUpdate", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "from", + name: "newImplementation", type: "address", }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [ { internalType: "address", - name: "to", + name: "_governor", type: "address", }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, ], - name: "transferFrom", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "bool", + internalType: "address", name: "", - type: "bool", + type: "address", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, - ], - }, - PNKFaucet: { - address: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", - abi: [ { inputs: [ { - internalType: "contract IERC20", - name: "_token", + internalType: "address", + name: "_governor", type: "address", }, ], + name: "initialize", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { inputs: [], - name: "amount", - outputs: [ + name: "initialize2", + 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: "balance", + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", @@ -23462,11 +27093,21 @@ export default { inputs: [ { internalType: "uint256", - name: "_amount", + name: "_courtID", type: "uint256", }, + { + internalType: "string", + name: "_courtName", + type: "string", + }, + { + internalType: "string", + name: "_policy", + type: "string", + }, ], - name: "changeAmount", + name: "setPolicy", outputs: [], stateMutability: "nonpayable", type: "function", @@ -23475,107 +27116,132 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "newImplementation", type: "address", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "request", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [], - name: "token", + name: "version", outputs: [ { - internalType: "contract IERC20", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + ], + }, + PolicyRegistry_Proxy: { + address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + abi: [ { inputs: [ { internalType: "address", - name: "", + name: "_implementation", type: "address", }, - ], - name: "withdrewAlready", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, ], }, - PinakionV2: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", + RandomizerOracle: { + address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", + abi: [], + }, + RandomizerRNG: { + address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, { inputs: [], - stateMutability: "nonpayable", - type: "constructor", + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "owner", + name: "implementation", type: "address", }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - indexed: true, - internalType: "address", - name: "spender", - type: "address", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ { indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "Approval", + name: "Initialized", type: "event", }, { @@ -23584,44 +27250,47 @@ export default { { indexed: true, internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", + name: "newImplementation", type: "address", }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "callbackGasLimit", + outputs: [ { - indexed: false, internalType: "uint256", - name: "value", + name: "", type: "uint256", }, ], - name: "Transfer", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", + name: "_governor", type: "address", }, ], - name: "allowance", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -23630,36 +27299,43 @@ export default { { inputs: [ { - internalType: "address", - name: "spender", + internalType: "contract IRandomizer", + name: "_randomizer", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "approve", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "balanceOf", + name: "randomNumbers", outputs: [ { internalType: "uint256", @@ -23672,12 +27348,12 @@ export default { }, { inputs: [], - name: "decimals", + name: "randomizer", outputs: [ { - internalType: "uint8", + internalType: "contract IRandomizer", name: "", - type: "uint8", + type: "address", }, ], stateMutability: "view", @@ -23685,112 +27361,96 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, { internalType: "uint256", - name: "subtractedValue", + name: "_id", type: "uint256", }, - ], - name: "decreaseAllowance", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes32", + name: "_value", + type: "bytes32", }, ], + name: "randomizerCallback", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, { internalType: "uint256", - name: "addedValue", + name: "_amount", type: "uint256", }, ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], + name: "randomizerWithdraw", + outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "name", - outputs: [ + inputs: [ { - internalType: "string", + internalType: "uint256", name: "", - type: "string", + type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", + name: "receiveRandomness", outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "randomNumber", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "totalSupply", - outputs: [ + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - stateMutability: "view", + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "to", + name: "", type: "address", }, + ], + name: "requesterToID", + outputs: [ { internalType: "uint256", - name: "amount", + name: "", type: "uint256", }, ], - name: "transfer", - outputs: [ + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "_callbackGasLimit", + type: "uint256", }, ], + name: "setCallbackGasLimit", + outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -23798,43 +27458,58 @@ export default { inputs: [ { internalType: "address", - name: "from", + name: "_randomizer", type: "address", }, + ], + name: "setRandomizer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "to", + name: "newImplementation", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "transferFrom", - outputs: [ + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, ], }, - PolicyRegistry: { - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + RandomizerRNG_Implementation: { + address: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -23896,58 +27571,109 @@ export default { inputs: [ { indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "callbackGasLimit", + outputs: [ + { internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", + internalType: "address", + name: "_governor", + type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ { - indexed: false, - internalType: "string", - name: "_policy", - type: "string", + internalType: "address", + name: "", + type: "address", }, ], - name: "PolicyUpdate", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, + internalType: "contract IRandomizer", + name: "_randomizer", + type: "address", + }, + { internalType: "address", - name: "newImplementation", + name: "_governor", type: "address", }, ], - name: "Upgraded", - type: "event", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + name: "randomNumbers", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", type: "function", }, { inputs: [], - name: "governor", + name: "randomizer", outputs: [ { - internalType: "address", + internalType: "contract IRandomizer", name: "", type: "address", }, @@ -23958,12 +27684,30 @@ export default { { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", }, ], - name: "initialize", + name: "randomizerCallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "randomizerWithdraw", outputs: [], stateMutability: "nonpayable", type: "function", @@ -23976,49 +27720,71 @@ export default { type: "uint256", }, ], - name: "policies", + name: "receiveRandomness", outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "randomNumber", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + inputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], - stateMutability: "view", + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "requesterToID", + outputs: [ { internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "string", - name: "_courtName", - type: "string", + internalType: "uint256", + name: "_callbackGasLimit", + type: "uint256", }, + ], + name: "setCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "string", - name: "_policy", - type: "string", + internalType: "address", + name: "_randomizer", + type: "address", }, ], - name: "setPolicy", + name: "setRandomizer", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24041,6 +27807,11 @@ export default { stateMutability: "payable", type: "function", }, + ], + }, + RandomizerRNG_Proxy: { + address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + abi: [ { inputs: [ { @@ -24057,15 +27828,26 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - PolicyRegistry_Implementation: { - address: "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + SortitionModule: { + address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -24122,29 +27904,148 @@ export default { 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: "string", - name: "_courtName", - type: "string", + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "StakeDelayedAlreadyTransferredDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { indexed: false, - internalType: "string", - name: "_policy", - type: "string", + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "StakeDelayedAlreadyTransferredWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_courtID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "StakeDelayedNotTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "_unlock", + type: "bool", + }, + ], + name: "StakeLocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_address", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_courtID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amountAllCourts", + type: "uint256", }, ], - name: "PolicyUpdate", + name: "StakeSet", type: "event", }, { @@ -24174,27 +28075,27 @@ export default { type: "function", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "_maxDrawingTime", + type: "uint256", }, ], - stateMutability: "view", + name: "changeMaxDrawingTime", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "_minStakingTime", + type: "uint256", }, ], - name: "initialize", + name: "changeMinStakingTime", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24202,30 +28103,29 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "contract RNG", + name: "_rng", + type: "address", }, - ], - name: "policies", - outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "_rngLookahead", + type: "uint256", }, ], - stateMutability: "view", + name: "changeRandomNumberGenerator", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "core", outputs: [ { - internalType: "bytes32", + internalType: "contract KlerosCore", name: "", - type: "bytes32", + type: "address", }, ], stateMutability: "view", @@ -24235,21 +28135,16 @@ export default { inputs: [ { internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, { - internalType: "string", - name: "_courtName", - type: "string", - }, - { - internalType: "string", - name: "_policy", - type: "string", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "setPolicy", + name: "createDisputeHook", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24257,142 +28152,169 @@ export default { { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "bytes32", + name: "_key", + type: "bytes32", }, { internalType: "bytes", - name: "data", + name: "_extraData", type: "bytes", }, ], - name: "upgradeToAndCall", + name: "createTree", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, - ], - }, - PolicyRegistry_Proxy: { - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", - abi: [ { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, + inputs: [], + name: "delayedStakeReadIndex", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - RandomizerOracle: { - address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - abi: [], - }, - RandomizerRNG: { - address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "delayedStakeWriteIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "delayedStakes", + outputs: [ { internalType: "address", - name: "implementation", + name: "account", type: "address", }, + { + internalType: "uint96", + name: "courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "bool", + name: "alreadyTransferred", + type: "bool", + }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "disputesWithoutJurors", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "bytes32", - name: "slot", + name: "_key", type: "bytes32", }, + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_nonce", + type: "uint256", + }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "draw", + outputs: [ + { + internalType: "address", + name: "drawnAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - name: "Initialized", - type: "event", + name: "executeDelayedStakes", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "_juror", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", + name: "getJurorBalance", outputs: [ { internalType: "uint256", - name: "", + name: "totalStaked", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalLocked", + type: "uint256", + }, + { + internalType: "uint256", + name: "stakedInCourt", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbCourts", type: "uint256", }, ], @@ -24403,13 +28325,19 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_juror", type: "address", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + name: "getJurorCourtIDs", + outputs: [ + { + internalType: "uint96[]", + name: "", + type: "uint96[]", + }, + ], + stateMutability: "view", type: "function", }, { @@ -24427,94 +28355,45 @@ export default { }, { 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", + internalType: "contract KlerosCore", + name: "_core", + type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "", + name: "_minStakingTime", type: "uint256", }, - ], - name: "randomNumbers", - outputs: [ { internalType: "uint256", - name: "", + name: "_maxDrawingTime", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomizer", - outputs: [ { - internalType: "contract IRandomizer", - name: "", + internalType: "contract RNG", + name: "_rng", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_id", + name: "_rngLookahead", type: "uint256", }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, ], - name: "randomizerCallback", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "randomizerWithdraw", + inputs: [], + name: "initialize3", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24522,48 +28401,40 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_juror", + type: "address", }, ], - name: "receiveRandomness", + name: "isJurorStaked", outputs: [ { - internalType: "uint256", - name: "randomNumber", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, ], - name: "requesterToID", + name: "jurors", outputs: [ { internalType: "uint256", - name: "", + name: "stakedPnk", + type: "uint256", + }, + { + internalType: "uint256", + name: "lockedPnk", type: "uint256", }, ], @@ -24571,146 +28442,76 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "lastPhaseChange", + outputs: [ { internalType: "uint256", - name: "_callbackGasLimit", + name: "", type: "uint256", }, ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_randomizer", + name: "jurorAccount", type: "address", }, - ], - name: "setRandomizer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint96", + name: "courtId", + type: "uint96", }, + ], + name: "latestDelayedStakeIndex", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_implementation", + name: "_account", type: "address", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", }, ], + name: "lockStake", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - RandomizerRNG_Implementation: { - address: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - 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", + type: "function", }, { 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: [ + name: "maxDrawingTime", + outputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [], - name: "callbackGasLimit", + name: "minStakingTime", outputs: [ { internalType: "uint256", @@ -24721,27 +28522,52 @@ export default { 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: "_governor", + name: "_account", type: "address", }, + { + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", + }, ], - name: "changeGovernor", + name: "penalizeStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "phase", outputs: [ { - internalType: "address", + internalType: "enum ISortitionModule.Phase", name: "", - type: "address", + type: "uint8", }, ], stateMutability: "view", @@ -24750,17 +28576,17 @@ export default { { inputs: [ { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", + name: "postDrawHook", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24779,14 +28605,21 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "randomNumber", + outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - name: "randomNumbers", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "randomNumberRequestBlock", outputs: [ { internalType: "uint256", @@ -24799,10 +28632,10 @@ export default { }, { inputs: [], - name: "randomizer", + name: "rng", outputs: [ { - internalType: "contract IRandomizer", + internalType: "contract RNG", name: "", type: "address", }, @@ -24811,77 +28644,89 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "rngLookahead", + outputs: [ { internalType: "uint256", - name: "_id", + name: "", type: "uint256", }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, ], - name: "randomizerWithdraw", + name: "setJurorInactive", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, { internalType: "uint256", - name: "", + name: "_newStake", type: "uint256", }, + { + internalType: "bool", + name: "_alreadyTransferred", + type: "bool", + }, ], - name: "receiveRandomness", + name: "setStake", outputs: [ { internalType: "uint256", - name: "randomNumber", + name: "pnkDeposit", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "", + name: "pnkWithdrawal", type: "uint256", }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, ], - name: "requestRandomness", - outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_ID", + type: "bytes32", }, ], - name: "requesterToID", + name: "stakeOf", outputs: [ { internalType: "uint256", @@ -24894,26 +28739,42 @@ export default { }, { inputs: [ + { + internalType: "address", + name: "_juror", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + ], + name: "stakeOf", + outputs: [ { internalType: "uint256", - name: "_callbackGasLimit", + name: "", type: "uint256", }, ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "_randomizer", + name: "_account", type: "address", }, + { + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", + }, ], - name: "setRandomizer", + name: "unlockStake", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24936,11 +28797,19 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - RandomizerRNG_Proxy: { - address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - abi: [ + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -24957,18 +28826,10 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - SortitionModule: { - address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + SortitionModuleNeo: { + address: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", abi: [ { stateMutability: "payable", @@ -25185,40 +29046,40 @@ export default { type: "event", }, { - inputs: [], - name: "DEFAULT_K", - outputs: [ + inputs: [ { internalType: "uint256", - name: "", + name: "_maxDrawingTime", type: "uint256", }, ], - stateMutability: "view", + name: "changeMaxDrawingTime", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "MAX_STAKE_PATHS", - outputs: [ + inputs: [ { internalType: "uint256", - name: "", + name: "_maxStakePerJuror", type: "uint256", }, ], - stateMutability: "view", + name: "changeMaxStakePerJuror", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_maxDrawingTime", + name: "_maxTotalStaked", type: "uint256", }, ], - name: "changeMaxDrawingTime", + name: "changeMaxTotalStaked", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25521,6 +29382,16 @@ export default { name: "_rngLookahead", type: "uint256", }, + { + internalType: "uint256", + name: "_maxStakePerJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxTotalStaked", + type: "uint256", + }, ], name: "initialize", outputs: [], @@ -25620,14 +29491,40 @@ export default { type: "uint256", }, ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", + 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: "maxDrawingTime", + name: "maxTotalStaked", outputs: [ { internalType: "uint256", @@ -25834,9 +29731,9 @@ export default { type: "uint256", }, { - internalType: "bool", - name: "succeeded", - type: "bool", + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", }, ], stateMutability: "nonpayable", @@ -25890,6 +29787,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "totalStaked", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -25944,16 +29854,13 @@ export default { }, ], }, - SortitionModuleNeo: { - address: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", + SortitionModuleNeo_Implementation: { + address: "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -26517,242 +30424,40 @@ export default { { 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", + internalType: "address", + name: "_juror", + type: "address", + }, + ], + name: "isJurorStaked", outputs: [ { - internalType: "bytes32", + internalType: "bool", name: "", - type: "bytes32", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "randomNumber", + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "jurors", outputs: [ { internalType: "uint256", - name: "", + name: "stakedPnk", + type: "uint256", + }, + { + internalType: "uint256", + name: "lockedPnk", type: "uint256", }, ], @@ -26761,7 +30466,7 @@ export default { }, { inputs: [], - name: "randomNumberRequestBlock", + name: "lastPhaseChange", outputs: [ { internalType: "uint256", @@ -26773,21 +30478,19 @@ export default { type: "function", }, { - inputs: [], - name: "rng", - outputs: [ + inputs: [ { - internalType: "contract RNG", + internalType: "address", name: "", type: "address", }, + { + internalType: "uint96", + name: "", + type: "uint96", + }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", + name: "latestDelayedStakeIndex", outputs: [ { internalType: "uint256", @@ -26805,70 +30508,33 @@ export default { name: "_account", type: "address", }, + { + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", + }, ], - name: "setJurorInactive", + name: "lockStake", 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", + inputs: [], + name: "maxDrawingTime", outputs: [ { internalType: "uint256", - name: "pnkDeposit", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkWithdrawal", + name: "", type: "uint256", }, - { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", - }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_ID", - type: "bytes32", - }, - ], - name: "stakeOf", + inputs: [], + name: "maxStakePerJuror", outputs: [ { internalType: "uint256", @@ -26880,19 +30546,8 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "stakeOf", + inputs: [], + name: "maxTotalStaked", outputs: [ { internalType: "uint256", @@ -26905,7 +30560,7 @@ export default { }, { inputs: [], - name: "totalStaked", + name: "minStakingTime", outputs: [ { internalType: "uint256", @@ -26918,572 +30573,522 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, { internalType: "uint256", - name: "_relativeAmount", + name: "_randomNumber", type: "uint256", }, ], - name: "unlockStake", + name: "notifyRandomNumber", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", + inputs: [], + name: "passPhase", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_implementation", + name: "_account", type: "address", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "_relativeAmount", + type: "uint256", }, ], + name: "penalizeStake", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModuleNeo_Implementation: { - address: "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", + type: "function", }, { inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ + name: "phase", + outputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "enum ISortitionModule.Phase", + name: "", + type: "uint8", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256", + name: "", + type: "uint256", }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Initialized", - type: "event", + name: "postDrawHook", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "proxiableUUID", + outputs: [ { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - name: "NewPhase", - type: "event", + stateMutability: "view", + type: "function", }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, + { + inputs: [], + name: "randomNumber", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "randomNumberRequestBlock", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferred", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "rng", + outputs: [ { - indexed: true, - internalType: "address", - name: "_address", + internalType: "contract RNG", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rngLookahead", + outputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_account", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, ], - name: "StakeDelayedNotTransferred", - type: "event", + name: "setJurorInactive", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_account", type: "address", }, { - indexed: false, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { internalType: "uint256", - name: "_relativeAmount", + name: "_newStake", type: "uint256", }, { - indexed: false, internalType: "bool", - name: "_unlock", + name: "_alreadyTransferred", type: "bool", }, ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, + name: "setStake", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "pnkDeposit", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "pnkWithdrawal", type: "uint256", }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, ], - name: "StakeSet", - type: "event", + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_ID", + type: "bytes32", }, ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ + name: "stakeOf", + outputs: [ { internalType: "uint256", - name: "_maxDrawingTime", + name: "", type: "uint256", }, ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", + internalType: "address", + name: "_juror", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", }, ], - name: "changeMaxStakePerJuror", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "stakeOf", + outputs: [ { internalType: "uint256", - name: "_maxTotalStaked", + name: "", type: "uint256", }, ], - name: "changeMaxTotalStaked", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "totalStaked", + outputs: [ { internalType: "uint256", - name: "_minStakingTime", + name: "", type: "uint256", }, ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "_account", type: "address", }, { internalType: "uint256", - name: "_rngLookahead", + name: "_relativeAmount", type: "uint256", }, ], - name: "changeRandomNumberGenerator", + name: "unlockStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "core", - outputs: [ + inputs: [ { - internalType: "contract KlerosCore", - name: "", + internalType: "address", + name: "newImplementation", type: "address", }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, ], - stateMutability: "view", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", type: "function", }, + ], + }, + SortitionModuleNeo_Proxy: { + address: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", + abi: [ { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_implementation", + type: "address", }, { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "createDisputeHook", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + ], + }, + SortitionModuleUniversity: { + address: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", }, { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "address", + name: "implementation", + type: "address", }, ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "InvalidImplementation", + type: "error", }, { inputs: [], - name: "delayedStakeReadIndex", - outputs: [ + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - stateMutability: "view", - type: "function", + name: "Initialized", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "enum ISortitionModule.Phase", + name: "_phase", + type: "uint8", }, ], - name: "delayedStakes", - outputs: [ + name: "NewPhase", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "account", + name: "_address", type: "address", }, { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { + indexed: false, internalType: "uint256", - name: "stake", + name: "_relativeAmount", type: "uint256", }, { + indexed: false, internalType: "bool", - name: "alreadyTransferred", + name: "_unlock", type: "bool", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "StakeLocked", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + indexed: true, + internalType: "address", + name: "_address", + type: "address", }, { + indexed: false, internalType: "uint256", - name: "_coreDisputeID", + name: "_courtID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_nonce", + name: "_amount", type: "uint256", }, ], - name: "draw", - outputs: [ + name: "StakeSet", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "drawnAddress", + name: "newImplementation", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { - inputs: [ + inputs: [], + name: "core", + outputs: [ { - internalType: "uint256", - name: "_iterations", - type: "uint256", + internalType: "contract KlerosCoreUniversity", + name: "", + type: "address", }, ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, { internalType: "uint256", - name: "stakedInCourt", + name: "", type: "uint256", }, { internalType: "uint256", - name: "nbCourts", + name: "", type: "uint256", }, ], - stateMutability: "view", + name: "createDisputeHook", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_juror", - type: "address", + internalType: "bytes32", + name: "_key", + type: "bytes32", }, - ], - name: "getJurorCourtIDs", - outputs: [ { - internalType: "uint96[]", - name: "", - type: "uint96[]", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - stateMutability: "view", + name: "createTree", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "disputesWithoutJurors", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -27492,65 +31097,27 @@ export default { { 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: "bytes32", + name: "", + type: "bytes32", }, { internalType: "uint256", - name: "_maxStakePerJuror", + name: "", type: "uint256", }, { internalType: "uint256", - name: "_maxTotalStaked", + name: "", type: "uint256", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "isJurorStaked", + name: "draw", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "drawnAddress", + type: "address", }, ], stateMutability: "view", @@ -27560,33 +31127,35 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "_juror", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, ], - name: "jurors", + name: "getJurorBalance", outputs: [ { internalType: "uint256", - name: "stakedPnk", + name: "totalStaked", type: "uint256", }, { internalType: "uint256", - name: "lockedPnk", + name: "totalLocked", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastPhaseChange", - outputs: [ { internalType: "uint256", - name: "", + name: "stakedInCourt", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbCourts", type: "uint256", }, ], @@ -27597,21 +31166,29 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "_juror", type: "address", }, + ], + name: "getJurorCourtIDs", + outputs: [ { - internalType: "uint96", + internalType: "uint96[]", name: "", - type: "uint96", + type: "uint96[]", }, ], - name: "latestDelayedStakeIndex", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -27621,53 +31198,57 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "_governor", type: "address", }, { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", + internalType: "contract KlerosCoreUniversity", + name: "_core", + type: "address", }, ], - name: "lockStake", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "maxDrawingTime", + inputs: [ + { + internalType: "address", + name: "_juror", + type: "address", + }, + ], + name: "isJurorStaked", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "maxStakePerJuror", + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "jurors", outputs: [ { internalType: "uint256", - name: "", + name: "stakedPnk", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxTotalStaked", - outputs: [ { internalType: "uint256", - name: "", + name: "lockedPnk", type: "uint256", }, ], @@ -27675,16 +31256,21 @@ export default { type: "function", }, { - inputs: [], - name: "minStakingTime", - outputs: [ + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, { internalType: "uint256", - name: "", + name: "_relativeAmount", type: "uint256", }, ], - stateMutability: "view", + name: "lockStake", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -27700,13 +31286,6 @@ export default { stateMutability: "nonpayable", type: "function", }, - { - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -27725,19 +31304,6 @@ export default { stateMutability: "nonpayable", type: "function", }, - { - inputs: [], - name: "phase", - outputs: [ - { - internalType: "enum ISortitionModule.Phase", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -27769,58 +31335,6 @@ export default { 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: [ { @@ -27878,30 +31392,6 @@ export default { 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: [ { @@ -27909,34 +31399,10 @@ export default { 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", + name: "setTransientJuror", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -27975,11 +31441,6 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - SortitionModuleNeo_Proxy: { - address: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - abi: [ { inputs: [ { @@ -27989,33 +31450,22 @@ export default { }, { internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "constructor", }, ], }, - SortitionModuleUniversity: { - address: "0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04", + SortitionModuleUniversity_Implementation: { + address: "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -28351,7 +31801,7 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, ], @@ -28500,9 +31950,9 @@ export default { type: "uint256", }, { - internalType: "bool", - name: "succeeded", - type: "bool", + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", }, ], stateMutability: "nonpayable", @@ -28557,6 +32007,11 @@ export default { stateMutability: "payable", type: "function", }, + ], + }, + SortitionModuleUniversity_Proxy: { + address: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + abi: [ { inputs: [ { @@ -28573,10 +32028,18 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - SortitionModuleUniversity_Implementation: { - address: "0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d", + SortitionModule_Implementation: { + address: "0x45129beB9B84BFb07bA885085C1D60437494a93f", abi: [ { inputs: [], @@ -28663,17 +32126,17 @@ export default { { indexed: false, internalType: "uint256", - name: "_relativeAmount", + name: "_courtID", type: "uint256", }, { indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - name: "StakeLocked", + name: "StakeDelayedAlreadyTransferredDeposited", type: "event", }, { @@ -28686,10 +32149,10 @@ export default { type: "address", }, { - indexed: false, - internalType: "uint256", + indexed: true, + internalType: "uint96", name: "_courtID", - type: "uint256", + type: "uint96", }, { indexed: false, @@ -28698,7 +32161,7 @@ export default { type: "uint256", }, ], - name: "StakeSet", + name: "StakeDelayedAlreadyTransferredWithdrawn", type: "event", }, { @@ -28707,168 +32170,157 @@ export default { { indexed: true, internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract KlerosCoreUniversity", - name: "", + name: "_address", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_courtID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "", + name: "_amount", type: "uint256", }, ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "StakeDelayedNotTransferred", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: true, + internalType: "address", + name: "_address", + type: "address", }, - ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_relativeAmount", type: "uint256", }, + { + indexed: false, + internalType: "bool", + name: "_unlock", + type: "bool", + }, ], - stateMutability: "view", - type: "function", + name: "StakeLocked", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + indexed: true, + internalType: "address", + name: "_address", + type: "address", }, { + indexed: false, internalType: "uint256", - name: "", + name: "_courtID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "", + name: "_amountAllCourts", type: "uint256", }, ], - name: "draw", - outputs: [ + name: "StakeSet", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "drawnAddress", + name: "newImplementation", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [ { internalType: "address", - name: "_juror", + name: "_governor", type: "address", }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalLocked", - type: "uint256", - }, + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "stakedInCourt", + name: "_maxDrawingTime", type: "uint256", }, + ], + name: "changeMaxDrawingTime", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "nbCourts", + name: "_minStakingTime", type: "uint256", }, ], - stateMutability: "view", + name: "changeMinStakingTime", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_juror", + internalType: "contract RNG", + name: "_rng", type: "address", }, - ], - name: "getJurorCourtIDs", - outputs: [ { - internalType: "uint96[]", - name: "", - type: "uint96[]", + internalType: "uint256", + name: "_rngLookahead", + type: "uint256", }, ], - stateMutability: "view", + name: "changeRandomNumberGenerator", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "governor", + name: "core", outputs: [ { - internalType: "address", + internalType: "contract KlerosCore", name: "", type: "address", }, @@ -28879,17 +32331,17 @@ export default { { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, { - internalType: "contract KlerosCoreUniversity", - name: "_core", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "initialize", + name: "createDisputeHook", outputs: [], stateMutability: "nonpayable", type: "function", @@ -28897,40 +32349,41 @@ export default { { inputs: [ { - internalType: "address", - name: "_juror", - type: "address", + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - name: "isJurorStaked", + name: "createTree", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "delayedStakeReadIndex", outputs: [ { - internalType: "bool", + internalType: "uint256", name: "", - type: "bool", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "jurors", + inputs: [], + name: "delayedStakeWriteIndex", outputs: [ { internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", + name: "", type: "uint256", }, ], @@ -28939,79 +32392,75 @@ export default { }, { inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "delayedStakes", + outputs: [ { internalType: "address", - name: "_account", + name: "account", type: "address", }, { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", + internalType: "uint96", + name: "courtID", + type: "uint96", }, - ], - name: "lockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_randomNumber", + name: "stake", type: "uint256", }, + { + internalType: "bool", + name: "alreadyTransferred", + type: "bool", + }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, + inputs: [], + name: "disputesWithoutJurors", + outputs: [ { internalType: "uint256", - name: "_relativeAmount", + name: "", type: "uint256", }, ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ + { + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, { internalType: "uint256", - name: "", + name: "_coreDisputeID", type: "uint256", }, { internalType: "uint256", - name: "", + name: "_nonce", type: "uint256", }, ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", + name: "draw", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "address", + name: "drawnAddress", + type: "address", }, ], stateMutability: "view", @@ -29020,12 +32469,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_account", - type: "address", + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - name: "setJurorInactive", + name: "executeDelayedStakes", outputs: [], stateMutability: "nonpayable", type: "function", @@ -29034,7 +32483,7 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "_juror", type: "address", }, { @@ -29042,36 +32491,31 @@ export default { name: "_courtID", type: "uint96", }, + ], + name: "getJurorBalance", + outputs: [ { internalType: "uint256", - name: "_newStake", + name: "totalStaked", type: "uint256", }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, - ], - name: "setStake", - outputs: [ { internalType: "uint256", - name: "pnkDeposit", + name: "totalLocked", type: "uint256", }, { internalType: "uint256", - name: "pnkWithdrawal", + name: "stakedInCourt", type: "uint256", }, { - internalType: "bool", - name: "succeeded", - type: "bool", + internalType: "uint256", + name: "nbCourts", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -29082,295 +32526,297 @@ export default { type: "address", }, ], - name: "setTransientJuror", - outputs: [], - stateMutability: "nonpayable", + name: "getJurorCourtIDs", + outputs: [ + { + internalType: "uint96[]", + name: "", + type: "uint96[]", + }, + ], + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "governor", + outputs: [ { internalType: "address", - name: "_account", + name: "", type: "address", }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "newImplementation", + name: "_governor", type: "address", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "contract KlerosCore", + name: "_core", + type: "address", }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - SortitionModuleUniversity_Proxy: { - address: "0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04", - abi: [ - { - inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "_minStakingTime", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "_maxDrawingTime", + type: "uint256", }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - SortitionModule_Implementation: { - address: "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "implementation", + internalType: "contract RNG", + name: "_rng", type: "address", }, + { + internalType: "uint256", + name: "_rngLookahead", + type: "uint256", + }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "address", + name: "_juror", + type: "address", }, ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ + name: "isJurorStaked", + outputs: [ { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "NewPhase", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "account", type: "address", }, + ], + name: "jurors", + outputs: [ + { + internalType: "uint256", + name: "stakedPnk", + type: "uint256", + }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "lockedPnk", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastPhaseChange", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferred", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "jurorAccount", type: "address", }, { - indexed: true, internalType: "uint96", - name: "_courtID", + name: "courtId", type: "uint96", }, + ], + name: "latestDelayedStakeIndex", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_account", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_relativeAmount", type: "uint256", }, + ], + name: "lockStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maxDrawingTime", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedNotTransferred", - type: "event", + 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", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_account", type: "address", }, { - indexed: false, internalType: "uint256", name: "_relativeAmount", type: "uint256", }, + ], + name: "penalizeStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "phase", + outputs: [ { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", + internalType: "enum ISortitionModule.Phase", + name: "", + type: "uint8", }, ], - name: "StakeLocked", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeSet", - type: "event", + name: "postDrawHook", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "proxiableUUID", + outputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "randomNumber", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [], - name: "DEFAULT_K", + name: "randomNumberRequestBlock", outputs: [ { internalType: "uint256", @@ -29383,7 +32829,20 @@ export default { }, { inputs: [], - name: "MAX_STAKE_PATHS", + name: "rng", + outputs: [ + { + internalType: "contract RNG", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rngLookahead", outputs: [ { internalType: "uint256", @@ -29396,56 +32855,104 @@ export default { }, { 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: "_maxDrawingTime", + name: "pnkWithdrawal", type: "uint256", }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, ], - name: "changeMaxDrawingTime", - outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_ID", + type: "bytes32", + }, + ], + name: "stakeOf", + outputs: [ { internalType: "uint256", - name: "_minStakingTime", + name: "", type: "uint256", }, ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "_juror", type: "address", }, { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", + name: "stakeOf", outputs: [ { - internalType: "contract KlerosCore", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -29454,17 +32961,17 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, { internalType: "uint256", - name: "", + name: "_relativeAmount", type: "uint256", }, ], - name: "createDisputeHook", + name: "unlockStake", outputs: [], stateMutability: "nonpayable", type: "function", @@ -29472,189 +32979,247 @@ export default { { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + internalType: "address", + name: "newImplementation", + type: "address", }, { internalType: "bytes", - name: "_extraData", + name: "data", type: "bytes", }, ], - name: "createTree", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [], - name: "delayedStakeReadIndex", + name: "version", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", type: "function", }, + ], + }, + SortitionModule_Proxy: { + address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + abi: [ { - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [ + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, + ], + }, + TransactionBatcher: { + address: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", + abi: [ { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address[]", + name: "targets", + type: "address[]", }, - ], - name: "delayedStakes", - outputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256[]", + name: "values", + type: "uint256[]", }, { - internalType: "uint96", - name: "courtID", - type: "uint96", + internalType: "bytes[]", + name: "datas", + type: "bytes[]", }, + ], + name: "batchSend", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "stake", - type: "uint256", + internalType: "address[]", + name: "targets", + type: "address[]", }, { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "datas", + type: "bytes[]", }, ], - stateMutability: "view", + name: "batchSendUnchecked", + outputs: [], + stateMutability: "payable", type: "function", }, + ], + }, + WETH: { + address: "0x3829A2486d53ee984a0ca2D76552715726b77138", + abi: [ { - inputs: [], - name: "disputesWithoutJurors", - outputs: [ + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", }, ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + indexed: true, + internalType: "address", + name: "owner", + type: "address", }, { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: true, + internalType: "address", + name: "spender", + type: "address", }, { + indexed: false, internalType: "uint256", - name: "_nonce", + name: "value", type: "uint256", }, ], - name: "draw", - outputs: [ + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "drawnAddress", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "_iterations", + name: "value", type: "uint256", }, ], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Transfer", + type: "event", }, { inputs: [ { internalType: "address", - name: "_juror", + name: "owner", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "address", + name: "spender", + type: "address", }, ], - name: "getJurorBalance", + name: "allowance", outputs: [ { internalType: "uint256", - name: "totalStaked", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "totalLocked", - type: "uint256", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "stakedInCourt", + name: "amount", type: "uint256", }, + ], + name: "approve", + outputs: [ { - internalType: "uint256", - name: "nbCourts", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_juror", + name: "account", type: "address", }, ], - name: "getJurorCourtIDs", + name: "balanceOf", outputs: [ { - internalType: "uint96[]", + internalType: "uint256", name: "", - type: "uint96[]", + type: "uint256", }, ], stateMutability: "view", @@ -29662,12 +33227,12 @@ export default { }, { inputs: [], - name: "governor", + name: "decimals", outputs: [ { - internalType: "address", + internalType: "uint8", name: "", - type: "address", + type: "uint8", }, ], stateMutability: "view", @@ -29677,37 +33242,23 @@ export default { inputs: [ { internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", + name: "spender", type: "address", }, { internalType: "uint256", - name: "_minStakingTime", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxDrawingTime", + name: "subtractedValue", type: "uint256", }, + ], + name: "decreaseAllowance", + outputs: [ { - internalType: "contract RNG", - name: "_rng", - type: "address", - }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "initialize", - outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -29715,11 +33266,16 @@ export default { inputs: [ { internalType: "address", - name: "_juror", + name: "spender", type: "address", }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, ], - name: "isJurorStaked", + name: "increaseAllowance", outputs: [ { internalType: "bool", @@ -29727,28 +33283,30 @@ export default { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "name", + outputs: [ { - internalType: "address", + internalType: "string", name: "", - type: "address", + type: "string", }, ], - name: "jurors", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", outputs: [ { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", - }, - { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", + internalType: "string", + name: "", + type: "string", }, ], stateMutability: "view", @@ -29756,7 +33314,7 @@ export default { }, { inputs: [], - name: "lastPhaseChange", + name: "totalSupply", outputs: [ { internalType: "uint256", @@ -29771,47 +33329,74 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "to", type: "address", }, { - internalType: "uint96", - name: "", - type: "uint96", + internalType: "uint256", + name: "amount", + type: "uint256", }, ], - name: "latestDelayedStakeIndex", + name: "transfer", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_account", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", type: "address", }, { internalType: "uint256", - name: "_relativeAmount", + name: "amount", type: "uint256", }, ], - name: "lockStake", - outputs: [], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, + ], + }, + WETHFaucet: { + address: "0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd", + abi: [ + { + inputs: [ + { + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, { inputs: [], - name: "maxDrawingTime", + name: "amount", outputs: [ { internalType: "uint256", @@ -29824,7 +33409,7 @@ export default { }, { inputs: [], - name: "minStakingTime", + name: "balance", outputs: [ { internalType: "uint256", @@ -29839,18 +33424,11 @@ export default { inputs: [ { internalType: "uint256", - name: "_randomNumber", + name: "_amount", type: "uint256", }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", + name: "changeAmount", outputs: [], stateMutability: "nonpayable", type: "function", @@ -29859,72 +33437,43 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "_governor", type: "address", }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, ], - name: "penalizeStake", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "phase", + name: "governor", outputs: [ { - internalType: "enum ISortitionModule.Phase", + internalType: "address", name: "", - type: "uint8", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postDrawHook", + inputs: [], + name: "request", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomNumber", + name: "token", outputs: [ { - internalType: "uint256", + internalType: "contract IERC20", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -29932,119 +33481,116 @@ export default { }, { inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "rng", - outputs: [ + inputs: [ { - internalType: "contract RNG", + internalType: "address", name: "", type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "rngLookahead", + name: "withdrewAlready", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], stateMutability: "view", type: "function", }, + ], + }, + VeaInboxArbToEthDevnet: { + address: "0xF6C5640de593fEf76129F1F1A863F7ddc65776C9", + abi: [ { inputs: [ + { + internalType: "uint256", + name: "_epochPeriod", + type: "uint256", + }, { internalType: "address", - name: "_account", + name: "_veaOutboxArbToEth", type: "address", }, ], - name: "setJurorInactive", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { + anonymous: false, 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", + indexed: false, + internalType: "bytes", + name: "_nodeData", + type: "bytes", }, ], - name: "setStake", - outputs: [ + name: "MessageSent", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", + indexed: false, + internalType: "bytes32", + name: "_snapshot", + type: "bytes32", }, { + indexed: false, internalType: "uint256", - name: "pnkWithdrawal", + name: "_epoch", type: "uint256", }, { - internalType: "bool", - name: "succeeded", - type: "bool", + indexed: false, + internalType: "uint64", + name: "_count", + type: "uint64", }, ], - stateMutability: "nonpayable", - type: "function", + name: "SnapshotSaved", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "_epochSent", + type: "uint256", }, { + indexed: false, internalType: "bytes32", - name: "_ID", + name: "_ticketId", type: "bytes32", }, ], - name: "stakeOf", + name: "SnapshotSent", + type: "event", + }, + { + inputs: [], + name: "count", outputs: [ { - internalType: "uint256", + internalType: "uint64", name: "", - type: "uint256", + type: "uint64", }, ], stateMutability: "view", @@ -30053,21 +33599,16 @@ export default { { inputs: [ { - internalType: "address", - name: "_juror", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "_timestamp", + type: "uint256", }, ], - name: "stakeOf", + name: "epochAt", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -30075,137 +33616,183 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, + inputs: [], + name: "epochFinalized", + outputs: [ { internalType: "uint256", - name: "_relativeAmount", + name: "epoch", type: "uint256", }, ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "epochNow", + outputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "epoch", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "epochPeriod", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "upgradeToAndCall", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "saveSnapshot", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, - ], - }, - SortitionModule_Proxy: { - address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", - abi: [ { inputs: [ { internalType: "address", - name: "_implementation", + name: "_to", type: "address", }, + { + internalType: "bytes4", + name: "_fnSelector", + type: "bytes4", + }, { internalType: "bytes", name: "_data", type: "bytes", }, ], + name: "sendMessage", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + type: "function", }, - ], - }, - TransactionBatcher: { - address: "0x35f93986950804ac1F93519BF68C2a7Dd776db0E", - abi: [ { inputs: [ { - internalType: "address[]", - name: "targets", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "values", - type: "uint256[]", + internalType: "uint256", + name: "_epoch", + type: "uint256", }, { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", + components: [ + { + internalType: "bytes32", + name: "stateRoot", + type: "bytes32", + }, + { + internalType: "address", + name: "claimer", + type: "address", + }, + { + internalType: "uint32", + name: "timestampClaimed", + type: "uint32", + }, + { + internalType: "uint32", + name: "timestampVerification", + type: "uint32", + }, + { + internalType: "uint32", + name: "blocknumberVerification", + type: "uint32", + }, + { + internalType: "enum Party", + name: "honest", + type: "uint8", + }, + { + internalType: "address", + name: "challenger", + type: "address", + }, + ], + internalType: "struct Claim", + name: "_claim", + type: "tuple", }, ], - name: "batchSend", + name: "sendSnapshot", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address[]", - name: "targets", - type: "address[]", + internalType: "uint256", + name: "epoch", + type: "uint256", }, + ], + name: "snapshots", + outputs: [ { - internalType: "uint256[]", - name: "values", - type: "uint256[]", + internalType: "bytes32", + name: "", + type: "bytes32", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "veaOutboxArbToEth", + outputs: [ { - internalType: "bytes[]", - name: "datas", - type: "bytes[]", + internalType: "address", + name: "", + type: "address", }, ], - name: "batchSendUnchecked", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, ], }, - WETH: { - address: "0x3829A2486d53ee984a0ca2D76552715726b77138", + VeaInboxArbToEthTestnet: { + address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06", abi: [ { inputs: [ { - internalType: "string", - name: "_name", - type: "string", + internalType: "uint256", + name: "_epochPeriod", + type: "uint256", }, { - internalType: "string", - name: "_symbol", - type: "string", + internalType: "address", + name: "_veaOutboxArbToEth", + type: "address", }, ], stateMutability: "nonpayable", @@ -30214,72 +33801,68 @@ export default { { anonymous: false, inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, { indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "bytes", + name: "_nodeData", + type: "bytes", }, ], - name: "Approval", + name: "MessageSent", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", + indexed: false, + internalType: "bytes32", + name: "_snapshot", + type: "bytes32", }, { indexed: false, internalType: "uint256", - name: "value", + name: "_epoch", type: "uint256", }, + { + indexed: false, + internalType: "uint64", + name: "_count", + type: "uint64", + }, ], - name: "Transfer", + name: "SnapshotSaved", type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "owner", - type: "address", + indexed: true, + internalType: "uint256", + name: "_epochSent", + type: "uint256", }, { - internalType: "address", - name: "spender", - type: "address", + indexed: false, + internalType: "bytes32", + name: "_ticketId", + type: "bytes32", }, ], - name: "allowance", + name: "SnapshotSent", + type: "event", + }, + { + inputs: [], + name: "count", outputs: [ { - internalType: "uint256", + internalType: "uint64", name: "", - type: "uint256", + type: "uint64", }, ], stateMutability: "view", @@ -30287,41 +33870,43 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, { internalType: "uint256", - name: "amount", + name: "_timestamp", type: "uint256", }, ], - name: "approve", + name: "epochAt", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "epoch", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "epochFinalized", + outputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "epoch", + type: "uint256", }, ], - name: "balanceOf", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "epochNow", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -30330,36 +33915,48 @@ export default { }, { inputs: [], - name: "decimals", + name: "epochPeriod", outputs: [ { - internalType: "uint8", + internalType: "uint256", name: "", - type: "uint8", + type: "uint256", }, ], stateMutability: "view", type: "function", }, + { + inputs: [], + name: "saveSnapshot", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { internalType: "address", - name: "spender", + name: "_to", type: "address", }, { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", + internalType: "bytes4", + name: "_fnSelector", + type: "bytes4", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "decreaseAllowance", + name: "sendMessage", outputs: [ { - internalType: "bool", + internalType: "uint64", name: "", - type: "bool", + type: "uint64", }, ], stateMutability: "nonpayable", @@ -30368,142 +33965,194 @@ export default { { inputs: [ { - internalType: "address", - name: "spender", - type: "address", + internalType: "uint256", + name: "_epoch", + type: "uint256", + }, + { + components: [ + { + internalType: "bytes32", + name: "stateRoot", + type: "bytes32", + }, + { + internalType: "address", + name: "claimer", + type: "address", + }, + { + internalType: "uint32", + name: "timestampClaimed", + type: "uint32", + }, + { + internalType: "uint32", + name: "timestampVerification", + type: "uint32", + }, + { + internalType: "uint32", + name: "blocknumberVerification", + type: "uint32", + }, + { + internalType: "enum Party", + name: "honest", + type: "uint8", + }, + { + internalType: "address", + name: "challenger", + type: "address", + }, + ], + internalType: "struct Claim", + name: "_claim", + type: "tuple", }, + ], + name: "sendSnapshot", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "addedValue", + name: "epoch", type: "uint256", }, ], - name: "increaseAllowance", + name: "snapshots", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "name", + name: "veaOutboxArbToEth", outputs: [ { - internalType: "string", + internalType: "address", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", type: "function", }, + ], + }, + VeaInboxArbToGnosisDevnet: { + address: "0xF6286b9C6c7F1B33Ea976FA43434027c7b8421A7", + abi: [ { - inputs: [], - name: "symbol", - outputs: [ + inputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "_epochPeriod", + type: "uint256", + }, + { + internalType: "address", + name: "_routerArbToGnosis", + type: "address", }, ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", }, { - inputs: [], - name: "totalSupply", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "bytes", + name: "_nodeData", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + name: "MessageSent", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "to", - type: "address", + indexed: false, + internalType: "bytes32", + name: "_snapshot", + type: "bytes32", }, { + indexed: false, internalType: "uint256", - name: "amount", + name: "_epoch", type: "uint256", }, - ], - name: "transfer", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "uint64", + name: "_count", + type: "uint64", }, ], - stateMutability: "nonpayable", - type: "function", + name: "SnapshotSaved", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { + indexed: true, internalType: "uint256", - name: "amount", + name: "_epochSent", type: "uint256", }, + { + indexed: false, + internalType: "bytes32", + name: "_ticketId", + type: "bytes32", + }, ], - name: "transferFrom", + name: "SnapshotSent", + type: "event", + }, + { + inputs: [], + name: "count", outputs: [ { - internalType: "bool", + internalType: "uint64", name: "", - type: "bool", + type: "uint64", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, - ], - }, - WETHFaucet: { - address: "0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd", - abi: [ { inputs: [ { - internalType: "contract IERC20", - name: "_token", - type: "address", + internalType: "uint256", + name: "_timestamp", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "amount", + name: "epochAt", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -30512,11 +34161,11 @@ export default { }, { inputs: [], - name: "balance", + name: "epochFinalized", outputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -30524,34 +34173,34 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "epochNow", + outputs: [ { internalType: "uint256", - name: "_amount", + name: "epoch", type: "uint256", }, ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "epochPeriod", + outputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "governor", + name: "routerArbToGnosis", outputs: [ { internalType: "address", @@ -30564,27 +34213,96 @@ export default { }, { inputs: [], - name: "request", + name: "saveSnapshot", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "token", + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "bytes4", + name: "_fnSelector", + type: "bytes4", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "sendMessage", outputs: [ { - internalType: "contract IERC20", + internalType: "uint64", name: "", - type: "address", + type: "uint64", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "withdraw", + inputs: [ + { + internalType: "uint256", + name: "_epoch", + type: "uint256", + }, + { + internalType: "uint256", + name: "_gasLimit", + type: "uint256", + }, + { + components: [ + { + internalType: "bytes32", + name: "stateRoot", + type: "bytes32", + }, + { + internalType: "address", + name: "claimer", + type: "address", + }, + { + internalType: "uint32", + name: "timestampClaimed", + type: "uint32", + }, + { + internalType: "uint32", + name: "timestampVerification", + type: "uint32", + }, + { + internalType: "uint32", + name: "blocknumberVerification", + type: "uint32", + }, + { + internalType: "enum Party", + name: "honest", + type: "uint8", + }, + { + internalType: "address", + name: "challenger", + type: "address", + }, + ], + internalType: "struct Claim", + name: "_claim", + type: "tuple", + }, + ], + name: "sendSnapshot", outputs: [], stateMutability: "nonpayable", type: "function", @@ -30592,17 +34310,17 @@ export default { { inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "epoch", + type: "uint256", }, ], - name: "withdrewAlready", + name: "snapshots", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], stateMutability: "view", @@ -30610,8 +34328,8 @@ export default { }, ], }, - VeaInboxArbToEthDevnet: { - address: "0x77e95F54032f467eC45c48C6affc203f93858783", + VeaInboxArbToGnosisTestnet: { + address: "0x62403e9Fbac618301175C89fb21920e4FF235A6a", abi: [ { inputs: [ @@ -30622,7 +34340,7 @@ export default { }, { internalType: "address", - name: "_veaOutboxArbToEth", + name: "_routerArbToGnosis", type: "address", }, ], @@ -30757,6 +34475,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "routerArbToGnosis", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "saveSnapshot", @@ -30800,6 +34531,11 @@ export default { name: "_epoch", type: "uint256", }, + { + internalType: "uint256", + name: "_gasLimit", + type: "uint256", + }, { components: [ { @@ -30852,7 +34588,7 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "epoch", type: "uint256", }, ], @@ -30867,19 +34603,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "veaOutboxArbToEth", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, ], }, }, diff --git a/contracts/deployments/devnet.viem.ts b/contracts/deployments/devnet.viem.ts index 9712fe618..127d161ee 100644 --- a/contracts/deployments/devnet.viem.ts +++ b/contracts/deployments/devnet.viem.ts @@ -312,6 +312,1424 @@ export const blockHashRngConfig = { abi: blockHashRngAbi, } as const; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ChainlinkRNG +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8) + */ +export const chainlinkRngAbi = [ + { + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_sortitionModule", internalType: "address", type: "address" }, + { name: "_vrfCoordinator", internalType: "address", type: "address" }, + { name: "_keyHash", internalType: "bytes32", type: "bytes32" }, + { name: "_subscriptionId", internalType: "uint256", type: "uint256" }, + { name: "_requestConfirmations", internalType: "uint16", type: "uint16" }, + { name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }, + ], + stateMutability: "nonpayable", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "address", type: "address" }, + { name: "want", internalType: "address", type: "address" }, + ], + name: "OnlyCoordinatorCanFulfill", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "address", type: "address" }, + { name: "owner", internalType: "address", type: "address" }, + { name: "coordinator", internalType: "address", type: "address" }, + ], + name: "OnlyOwnerOrCoordinator", + }, + { type: "error", inputs: [], name: "ZeroAddress" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "vrfCoordinator", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "CoordinatorSet", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferred", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "randomWord", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "RequestFulfilled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + ], + name: "RequestSent", + }, + { + type: "function", + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "callbackGasLimit", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }], + name: "changeCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_keyHash", internalType: "bytes32", type: "bytes32" }], + name: "changeKeyHash", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_requestConfirmations", internalType: "uint16", type: "uint16" }], + name: "changeRequestConfirmations", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_sortitionModule", internalType: "address", type: "address" }], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_subscriptionId", internalType: "uint256", type: "uint256" }], + name: "changeSubscriptionId", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], + name: "changeVrfCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "keyHash", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "lastRequestId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], + name: "randomNumbers", + outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "requestId", internalType: "uint256", type: "uint256" }, + { name: "randomWords", internalType: "uint256[]", type: "uint256[]" }, + ], + name: "rawFulfillRandomWords", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "receiveRandomness", + outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "requestConfirmations", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "s_vrfCoordinator", + outputs: [ + { + name: "", + internalType: "contract IVRFCoordinatorV2Plus", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], + name: "setCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "sortitionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "subscriptionId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8) + */ +export const chainlinkRngAddress = { + 421614: "0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8) + */ +export const chainlinkRngConfig = { + address: chainlinkRngAddress, + abi: chainlinkRngAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ChainlinkVRFCoordinator +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) + */ +export const chainlinkVrfCoordinatorAbi = [ + { + type: "constructor", + inputs: [{ name: "blockhashStore", internalType: "address", type: "address" }], + stateMutability: "nonpayable", + }, + { + type: "error", + inputs: [ + { name: "internalBalance", internalType: "uint256", type: "uint256" }, + { name: "externalBalance", internalType: "uint256", type: "uint256" }, + ], + name: "BalanceInvariantViolated", + }, + { + type: "error", + inputs: [{ name: "blockNum", internalType: "uint256", type: "uint256" }], + name: "BlockhashNotInStore", + }, + { + type: "error", + inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], + name: "CoordinatorAlreadyRegistered", + }, + { + type: "error", + inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], + name: "CoordinatorNotRegistered", + }, + { type: "error", inputs: [], name: "FailedToSendNative" }, + { type: "error", inputs: [], name: "FailedToTransferLink" }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint32", type: "uint32" }, + { name: "want", internalType: "uint32", type: "uint32" }, + ], + name: "GasLimitTooBig", + }, + { + type: "error", + inputs: [ + { name: "gasPrice", internalType: "uint256", type: "uint256" }, + { name: "maxGas", internalType: "uint256", type: "uint256" }, + ], + name: "GasPriceExceeded", + }, + { type: "error", inputs: [], name: "IncorrectCommitment" }, + { type: "error", inputs: [], name: "IndexOutOfRange" }, + { type: "error", inputs: [], name: "InsufficientBalance" }, + { type: "error", inputs: [], name: "InvalidCalldata" }, + { + type: "error", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "InvalidConsumer", + }, + { type: "error", inputs: [], name: "InvalidExtraArgsTag" }, + { + type: "error", + inputs: [{ name: "linkWei", internalType: "int256", type: "int256" }], + name: "InvalidLinkWeiPrice", + }, + { + type: "error", + inputs: [ + { name: "premiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "max", internalType: "uint8", type: "uint8" }, + ], + name: "InvalidPremiumPercentage", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint16", type: "uint16" }, + { name: "min", internalType: "uint16", type: "uint16" }, + { name: "max", internalType: "uint16", type: "uint16" }, + ], + name: "InvalidRequestConfirmations", + }, + { type: "error", inputs: [], name: "InvalidSubscription" }, + { type: "error", inputs: [], name: "LinkAlreadySet" }, + { + type: "error", + inputs: [ + { + name: "flatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "flatFeeNativePPM", internalType: "uint32", type: "uint32" }, + ], + name: "LinkDiscountTooHigh", + }, + { type: "error", inputs: [], name: "LinkNotSet" }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint256", type: "uint256" }, + { name: "max", internalType: "uint32", type: "uint32" }, + ], + name: "MsgDataTooBig", + }, + { + type: "error", + inputs: [{ name: "proposedOwner", internalType: "address", type: "address" }], + name: "MustBeRequestedOwner", + }, + { + type: "error", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "MustBeSubOwner", + }, + { type: "error", inputs: [], name: "NoCorrespondingRequest" }, + { + type: "error", + inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], + name: "NoSuchProvingKey", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint32", type: "uint32" }, + { name: "want", internalType: "uint32", type: "uint32" }, + ], + name: "NumWordsTooBig", + }, + { type: "error", inputs: [], name: "OnlyCallableFromLink" }, + { type: "error", inputs: [], name: "PaymentTooLarge" }, + { type: "error", inputs: [], name: "PendingRequestExists" }, + { + type: "error", + inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], + name: "ProvingKeyAlreadyRegistered", + }, + { type: "error", inputs: [], name: "Reentrant" }, + { type: "error", inputs: [], name: "TooManyConsumers" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + indexed: false, + }, + { + name: "maxGasLimit", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "stalenessSeconds", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "nativePremiumPercentage", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + { + name: "linkPremiumPercentage", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + ], + name: "ConfigSet", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "coordinatorAddress", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "CoordinatorDeregistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "coordinatorAddress", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "CoordinatorRegistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + indexed: false, + }, + ], + name: "FallbackWeiPerUnitLinkUsed", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "FundsRecovered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newCoordinator", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "MigrationCompleted", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "NativeFundsRecovered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferred", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + { + name: "maxGas", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "ProvingKeyDeregistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + { + name: "maxGas", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "ProvingKeyRegistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "outputSeed", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "payment", + internalType: "uint96", + type: "uint96", + indexed: false, + }, + { + name: "nativePayment", + internalType: "bool", + type: "bool", + indexed: false, + }, + { name: "success", internalType: "bool", type: "bool", indexed: false }, + { + name: "onlyPremium", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "RandomWordsFulfilled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: true, + }, + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "preSeed", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + indexed: false, + }, + { + name: "callbackGasLimit", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "numWords", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "extraArgs", + internalType: "bytes", + type: "bytes", + indexed: false, + }, + { + name: "sender", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "RandomWordsRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amountLink", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "amountNative", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionCanceled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "consumer", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionConsumerAdded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "consumer", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionConsumerRemoved", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "owner", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "oldBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "newBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionFunded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "oldNativeBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "newNativeBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionFundedWithNative", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "from", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + ], + name: "SubscriptionOwnerTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "from", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + ], + name: "SubscriptionOwnerTransferred", + }, + { + type: "function", + inputs: [], + name: "BLOCKHASH_STORE", + outputs: [ + { + name: "", + internalType: "contract BlockhashStoreInterface", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "LINK", + outputs: [ + { + name: "", + internalType: "contract LinkTokenInterface", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "LINK_NATIVE_FEED", + outputs: [ + { + name: "", + internalType: "contract AggregatorV3Interface", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "MAX_CONSUMERS", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "MAX_NUM_WORDS", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "MAX_REQUEST_CONFIRMATIONS", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "acceptSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "addConsumer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "to", internalType: "address", type: "address" }, + ], + name: "cancelSubscription", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "createSubscription", + outputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "deregisterMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "publicProvingKey", + internalType: "uint256[2]", + type: "uint256[2]", + }, + ], + name: "deregisterProvingKey", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "proof", + internalType: "struct VRF.Proof", + type: "tuple", + components: [ + { name: "pk", internalType: "uint256[2]", type: "uint256[2]" }, + { name: "gamma", internalType: "uint256[2]", type: "uint256[2]" }, + { name: "c", internalType: "uint256", type: "uint256" }, + { name: "s", internalType: "uint256", type: "uint256" }, + { name: "seed", internalType: "uint256", type: "uint256" }, + { name: "uWitness", internalType: "address", type: "address" }, + { + name: "cGammaWitness", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { + name: "sHashWitness", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { name: "zInv", internalType: "uint256", type: "uint256" }, + ], + }, + { + name: "rc", + internalType: "struct VRFTypes.RequestCommitmentV2Plus", + type: "tuple", + components: [ + { name: "blockNum", internalType: "uint64", type: "uint64" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, + { name: "numWords", internalType: "uint32", type: "uint32" }, + { name: "sender", internalType: "address", type: "address" }, + { name: "extraArgs", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "onlyPremium", internalType: "bool", type: "bool" }, + ], + name: "fulfillRandomWords", + outputs: [{ name: "payment", internalType: "uint96", type: "uint96" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "fundSubscriptionWithNative", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "startIndex", internalType: "uint256", type: "uint256" }, + { name: "maxCount", internalType: "uint256", type: "uint256" }, + ], + name: "getActiveSubscriptionIds", + outputs: [{ name: "ids", internalType: "uint256[]", type: "uint256[]" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "getSubscription", + outputs: [ + { name: "balance", internalType: "uint96", type: "uint96" }, + { name: "nativeBalance", internalType: "uint96", type: "uint96" }, + { name: "reqCount", internalType: "uint64", type: "uint64" }, + { name: "subOwner", internalType: "address", type: "address" }, + { name: "consumers", internalType: "address[]", type: "address[]" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "publicKey", internalType: "uint256[2]", type: "uint256[2]" }], + name: "hashOfKey", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "newCoordinator", internalType: "address", type: "address" }, + ], + name: "migrate", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "onTokenTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "ownerCancelSubscription", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "pendingRequestExists", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address payable", type: "address" }], + name: "recoverNativeFunds", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "registerMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "publicProvingKey", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { name: "maxGas", internalType: "uint64", type: "uint64" }, + ], + name: "registerProvingKey", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "removeConsumer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "req", + internalType: "struct VRFV2PlusClient.RandomWordsRequest", + type: "tuple", + components: [ + { name: "keyHash", internalType: "bytes32", type: "bytes32" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { + name: "requestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, + { name: "numWords", internalType: "uint32", type: "uint32" }, + { name: "extraArgs", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "requestRandomWords", + outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "newOwner", internalType: "address", type: "address" }, + ], + name: "requestSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "s_config", + outputs: [ + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, + { name: "reentrancyLock", internalType: "bool", type: "bool" }, + { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_currentSubNonce", + outputs: [{ name: "", internalType: "uint64", type: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_fallbackWeiPerUnitLink", + outputs: [{ name: "", internalType: "int256", type: "int256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "s_provingKeyHashes", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "s_provingKeys", + outputs: [ + { name: "exists", internalType: "bool", type: "bool" }, + { name: "maxGas", internalType: "uint64", type: "uint64" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "s_requestCommitments", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_totalBalance", + outputs: [{ name: "", internalType: "uint96", type: "uint96" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_totalNativeBalance", + outputs: [{ name: "", internalType: "uint96", type: "uint96" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, + { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, + ], + name: "setConfig", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "link", internalType: "address", type: "address" }, + { name: "linkNativeFeed", internalType: "address", type: "address" }, + ], + name: "setLINKAndLINKNativeFeed", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "recipient", internalType: "address", type: "address" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "recipient", internalType: "address payable", type: "address" }], + name: "withdrawNative", + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) + */ +export const chainlinkVrfCoordinatorAddress = { + 421614: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) + */ +export const chainlinkVrfCoordinatorConfig = { + address: chainlinkVrfCoordinatorAddress, + abi: chainlinkVrfCoordinatorAbi, +} as const; + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DAI ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -988,6 +2406,8 @@ export const disputeKitClassicAbi = [ { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], name: "getDegreeOfCoherence", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -1051,6 +2471,13 @@ export const disputeKitClassicAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -1069,6 +2496,13 @@ export const disputeKitClassicAbi = [ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -1079,6 +2513,13 @@ export const disputeKitClassicAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -2253,7 +3694,7 @@ export const disputeKitClassicNeoProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ export const disputeKitClassicUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -2665,6 +4106,8 @@ export const disputeKitClassicUniversityAbi = [ { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], name: "getDegreeOfCoherence", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -2783,14 +4226,14 @@ export const disputeKitClassicUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ export const disputeKitClassicUniversityAddress = { - 421614: "0xDaE66157D72Baa099cd63a833c353776206feea4", + 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ export const disputeKitClassicUniversityConfig = { address: disputeKitClassicUniversityAddress, @@ -2802,7 +4245,7 @@ export const disputeKitClassicUniversityConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf36fa321Bb64b6E39f5DA3dbb053ccE63D077f8B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) */ export const disputeKitClassicUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -3213,6 +4656,8 @@ export const disputeKitClassicUniversityImplementationAbi = [ { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], name: "getDegreeOfCoherence", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -3323,14 +4768,14 @@ export const disputeKitClassicUniversityImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf36fa321Bb64b6E39f5DA3dbb053ccE63D077f8B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) */ export const disputeKitClassicUniversityImplementationAddress = { - 421614: "0xf36fa321Bb64b6E39f5DA3dbb053ccE63D077f8B", + 421614: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf36fa321Bb64b6E39f5DA3dbb053ccE63D077f8B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) */ export const disputeKitClassicUniversityImplementationConfig = { address: disputeKitClassicUniversityImplementationAddress, @@ -3342,7 +4787,7 @@ export const disputeKitClassicUniversityImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ export const disputeKitClassicUniversityProxyAbi = [ { @@ -3358,14 +4803,14 @@ export const disputeKitClassicUniversityProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ export const disputeKitClassicUniversityProxyAddress = { - 421614: "0xDaE66157D72Baa099cd63a833c353776206feea4", + 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ export const disputeKitClassicUniversityProxyConfig = { address: disputeKitClassicUniversityProxyAddress, @@ -3377,7 +4822,7 @@ export const disputeKitClassicUniversityProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x692CC78F2570181FFB99297965FeAA8352ab12E8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) */ export const disputeKitClassicImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -3788,6 +5233,8 @@ export const disputeKitClassicImplementationAbi = [ { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], name: "getDegreeOfCoherence", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -3851,6 +5298,13 @@ export const disputeKitClassicImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -3869,6 +5323,13 @@ export const disputeKitClassicImplementationAbi = [ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3879,6 +5340,13 @@ export const disputeKitClassicImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3898,14 +5366,14 @@ export const disputeKitClassicImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x692CC78F2570181FFB99297965FeAA8352ab12E8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) */ export const disputeKitClassicImplementationAddress = { - 421614: "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + 421614: "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x692CC78F2570181FFB99297965FeAA8352ab12E8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) */ export const disputeKitClassicImplementationConfig = { address: disputeKitClassicImplementationAddress, @@ -4661,7 +6129,7 @@ export const disputeResolverRulerConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x88d793dA6e88Ebd58136A1e1483cc4cf0D915ca4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) */ export const disputeResolverUniversityAbi = [ { @@ -4877,14 +6345,14 @@ export const disputeResolverUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x88d793dA6e88Ebd58136A1e1483cc4cf0D915ca4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) */ export const disputeResolverUniversityAddress = { - 421614: "0x88d793dA6e88Ebd58136A1e1483cc4cf0D915ca4", + 421614: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x88d793dA6e88Ebd58136A1e1483cc4cf0D915ca4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) */ export const disputeResolverUniversityConfig = { address: disputeResolverUniversityAddress, @@ -4994,6 +6462,13 @@ export const disputeTemplateRegistryAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -5029,6 +6504,13 @@ export const disputeTemplateRegistryAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -5062,7 +6544,7 @@ export const disputeTemplateRegistryConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) */ export const disputeTemplateRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -5158,6 +6640,13 @@ export const disputeTemplateRegistryImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -5193,17 +6682,24 @@ export const disputeTemplateRegistryImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) */ export const disputeTemplateRegistryImplementationAddress = { - 421614: "0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E", + 421614: "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) */ export const disputeTemplateRegistryImplementationConfig = { address: disputeTemplateRegistryImplementationAddress, @@ -5334,6 +6830,13 @@ export const evidenceModuleAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -5361,6 +6864,13 @@ export const evidenceModuleAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -5391,7 +6901,7 @@ export const evidenceModuleConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x05AD81f245209b7f91885fd96e57c9da90554824) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) */ export const evidenceModuleImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -5474,6 +6984,13 @@ export const evidenceModuleImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -5501,17 +7018,24 @@ export const evidenceModuleImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x05AD81f245209b7f91885fd96e57c9da90554824) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) */ export const evidenceModuleImplementationAddress = { - 421614: "0x05AD81f245209b7f91885fd96e57c9da90554824", + 421614: "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x05AD81f245209b7f91885fd96e57c9da90554824) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) */ export const evidenceModuleImplementationConfig = { address: evidenceModuleImplementationAddress, @@ -6708,10 +8232,8 @@ export const klerosCoreAbi = [ { type: "error", inputs: [], name: "AppealFeesNotEnough" }, { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, { type: "error", inputs: [], name: "CannotDisableClassicDK" }, { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, @@ -6720,6 +8242,7 @@ export const klerosCoreAbi = [ { 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" }, { @@ -6734,7 +8257,11 @@ export const klerosCoreAbi = [ { type: "error", inputs: [], name: "NotInitializing" }, { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingFailed" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -6743,9 +8270,12 @@ export const klerosCoreAbi = [ inputs: [{ name: "slot", internalType: "bytes32", 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: "event", @@ -6805,8 +8335,8 @@ export const klerosCoreAbi = [ inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -7147,13 +8677,14 @@ export const klerosCoreAbi = [ }, { name: "_period", - internalType: "enum KlerosCore.Period", + internalType: "enum KlerosCoreBase.Period", type: "uint8", indexed: false, }, ], name: "NewPeriod", }, + { type: "event", anonymous: false, inputs: [], name: "Paused" }, { type: "event", anonymous: false, @@ -7228,6 +8759,7 @@ export const klerosCoreAbi = [ ], name: "TokenAndETHShift", }, + { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -7346,6 +8878,13 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_guardian", internalType: "address", type: "address" }], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -7491,7 +9030,11 @@ export const klerosCoreAbi = [ internalType: "contract IArbitrableV2", type: "address", }, - { name: "period", internalType: "enum KlerosCore.Period", type: "uint8" }, + { + name: "period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + }, { name: "ruled", internalType: "bool", type: "bool" }, { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], @@ -7578,7 +9121,7 @@ export const klerosCoreAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCore.Round", + internalType: "struct KlerosCoreBase.Round", type: "tuple", components: [ { name: "disputeKitID", internalType: "uint256", type: "uint256" }, @@ -7637,10 +9180,18 @@ export const klerosCoreAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "guardian", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, + { name: "_guardian", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, { name: "_jurorProsecutionModule", @@ -7674,6 +9225,13 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -7705,6 +9263,20 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "paused", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [], @@ -7748,6 +9320,13 @@ export const klerosCoreAbi = [ outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -7758,6 +9337,13 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -12103,64 +13689,153 @@ export const klerosCoreRulerImplementationAbi = [ }, { type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) + */ +export const klerosCoreRulerImplementationAddress = { + 421614: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) + */ +export const klerosCoreRulerImplementationConfig = { + address: klerosCoreRulerImplementationAddress, + abi: klerosCoreRulerImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreRuler_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + */ +export const klerosCoreRulerProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + */ +export const klerosCoreRulerProxyAddress = { + 421614: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + */ +export const klerosCoreRulerProxyConfig = { + address: klerosCoreRulerProxyAddress, + abi: klerosCoreRulerProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreSnapshotProxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) + */ +export const klerosCoreSnapshotProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_core", internalType: "contract IKlerosCore", type: "address" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "core", + outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) - */ -export const klerosCoreRulerImplementationAddress = { - 421614: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) - */ -export const klerosCoreRulerImplementationConfig = { - address: klerosCoreRulerImplementationAddress, - abi: klerosCoreRulerImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) - */ -export const klerosCoreRulerProxyAbi = [ { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) */ -export const klerosCoreRulerProxyAddress = { - 421614: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", +export const klerosCoreSnapshotProxyAddress = { + 421614: "0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) */ -export const klerosCoreRulerProxyConfig = { - address: klerosCoreRulerProxyAddress, - abi: klerosCoreRulerProxyAbi, +export const klerosCoreSnapshotProxyConfig = { + address: klerosCoreSnapshotProxyAddress, + abi: klerosCoreSnapshotProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -12168,7 +13843,7 @@ export const klerosCoreRulerProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ export const klerosCoreUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -12207,7 +13882,10 @@ export const klerosCoreUniversityAbi = [ { type: "error", inputs: [], name: "NotInitializing" }, { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingFailed" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -12216,6 +13894,7 @@ export const klerosCoreUniversityAbi = [ inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], name: "UUPSUnsupportedProxiableUUID", }, + { type: "error", inputs: [], name: "UnstakingTransferFailed" }, { type: "error", inputs: [], name: "UnsuccessfulCall" }, { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, { type: "error", inputs: [], name: "VotePeriodNotPassed" }, @@ -13265,14 +14944,14 @@ export const klerosCoreUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ export const klerosCoreUniversityAddress = { - 421614: "0x10BaAFDe8B4d3164CA781571e2F1513317f57980", + 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ export const klerosCoreUniversityConfig = { address: klerosCoreUniversityAddress, @@ -13284,7 +14963,7 @@ export const klerosCoreUniversityConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8466ab62E7c923e8F2E61d0358C495676D6F939b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) */ export const klerosCoreUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -13322,7 +15001,10 @@ export const klerosCoreUniversityImplementationAbi = [ { type: "error", inputs: [], name: "NotInitializing" }, { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingFailed" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -13331,6 +15013,7 @@ export const klerosCoreUniversityImplementationAbi = [ inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], name: "UUPSUnsupportedProxiableUUID", }, + { type: "error", inputs: [], name: "UnstakingTransferFailed" }, { type: "error", inputs: [], name: "UnsuccessfulCall" }, { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, { type: "error", inputs: [], name: "VotePeriodNotPassed" }, @@ -14372,14 +16055,14 @@ export const klerosCoreUniversityImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8466ab62E7c923e8F2E61d0358C495676D6F939b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) */ export const klerosCoreUniversityImplementationAddress = { - 421614: "0x8466ab62E7c923e8F2E61d0358C495676D6F939b", + 421614: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8466ab62E7c923e8F2E61d0358C495676D6F939b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) */ export const klerosCoreUniversityImplementationConfig = { address: klerosCoreUniversityImplementationAddress, @@ -14391,7 +16074,7 @@ export const klerosCoreUniversityImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ export const klerosCoreUniversityProxyAbi = [ { @@ -14407,14 +16090,14 @@ export const klerosCoreUniversityProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ export const klerosCoreUniversityProxyAddress = { - 421614: "0x10BaAFDe8B4d3164CA781571e2F1513317f57980", + 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ export const klerosCoreUniversityProxyConfig = { address: klerosCoreUniversityProxyAddress, @@ -14426,7 +16109,7 @@ export const klerosCoreUniversityProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x91a373BBdE0532F86410682F362e2Cf685e95085) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) */ export const klerosCoreImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -14434,10 +16117,8 @@ export const klerosCoreImplementationAbi = [ { type: "error", inputs: [], name: "AppealFeesNotEnough" }, { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, { type: "error", inputs: [], name: "CannotDisableClassicDK" }, { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, @@ -14446,6 +16127,7 @@ export const klerosCoreImplementationAbi = [ { 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" }, { @@ -14460,7 +16142,11 @@ export const klerosCoreImplementationAbi = [ { type: "error", inputs: [], name: "NotInitializing" }, { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingFailed" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -14469,9 +16155,12 @@ export const klerosCoreImplementationAbi = [ inputs: [{ name: "slot", internalType: "bytes32", 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: "event", @@ -14531,8 +16220,8 @@ export const klerosCoreImplementationAbi = [ inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -14873,13 +16562,14 @@ export const klerosCoreImplementationAbi = [ }, { name: "_period", - internalType: "enum KlerosCore.Period", + internalType: "enum KlerosCoreBase.Period", type: "uint8", indexed: false, }, ], name: "NewPeriod", }, + { type: "event", anonymous: false, inputs: [], name: "Paused" }, { type: "event", anonymous: false, @@ -14954,6 +16644,7 @@ export const klerosCoreImplementationAbi = [ ], name: "TokenAndETHShift", }, + { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -15072,6 +16763,13 @@ export const klerosCoreImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_guardian", internalType: "address", type: "address" }], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -15217,7 +16915,11 @@ export const klerosCoreImplementationAbi = [ internalType: "contract IArbitrableV2", type: "address", }, - { name: "period", internalType: "enum KlerosCore.Period", type: "uint8" }, + { + name: "period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + }, { name: "ruled", internalType: "bool", type: "bool" }, { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], @@ -15304,7 +17006,7 @@ export const klerosCoreImplementationAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCore.Round", + internalType: "struct KlerosCoreBase.Round", type: "tuple", components: [ { name: "disputeKitID", internalType: "uint256", type: "uint256" }, @@ -15363,10 +17065,18 @@ export const klerosCoreImplementationAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "guardian", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, + { name: "_guardian", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, { name: "_jurorProsecutionModule", @@ -15400,6 +17110,13 @@ export const klerosCoreImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -15431,6 +17148,20 @@ export const klerosCoreImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "paused", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [], @@ -15474,6 +17205,13 @@ export const klerosCoreImplementationAbi = [ outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -15484,17 +17222,24 @@ export const klerosCoreImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x91a373BBdE0532F86410682F362e2Cf685e95085) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) */ export const klerosCoreImplementationAddress = { - 421614: "0x91a373BBdE0532F86410682F362e2Cf685e95085", + 421614: "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x91a373BBdE0532F86410682F362e2Cf685e95085) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) */ export const klerosCoreImplementationConfig = { address: klerosCoreImplementationAddress, @@ -16277,6 +18022,13 @@ export const policyRegistryAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -16312,6 +18064,13 @@ export const policyRegistryAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -16342,7 +18101,7 @@ export const policyRegistryConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAA637C9E2831614158d7eB193D03af4a7223C56E) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) */ export const policyRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -16432,6 +18191,13 @@ export const policyRegistryImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -16467,17 +18233,24 @@ export const policyRegistryImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAA637C9E2831614158d7eB193D03af4a7223C56E) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) */ export const policyRegistryImplementationAddress = { - 421614: "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + 421614: "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAA637C9E2831614158d7eB193D03af4a7223C56E) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) */ export const policyRegistryImplementationConfig = { address: policyRegistryImplementationAddress, @@ -17028,7 +18801,7 @@ export const sortitionModuleAbi = [ indexed: false, }, ], - name: "StakeDelayedAlreadyTransferred", + name: "StakeDelayedAlreadyTransferredDeposited", }, { type: "event", @@ -17122,6 +18895,12 @@ export const sortitionModuleAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -17140,17 +18919,10 @@ export const sortitionModuleAbi = [ }, { type: "function", - inputs: [], - name: "DEFAULT_K", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_STAKE_PATHS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", @@ -17297,6 +19069,13 @@ export const sortitionModuleAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_juror", internalType: "address", type: "address" }], @@ -17306,7 +19085,7 @@ export const sortitionModuleAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], name: "jurors", outputs: [ { name: "stakedPnk", internalType: "uint256", type: "uint256" }, @@ -17324,8 +19103,8 @@ export const sortitionModuleAbi = [ { 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" }], @@ -17450,7 +19229,11 @@ export const sortitionModuleAbi = [ outputs: [ { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "succeeded", internalType: "bool", type: "bool" }, + { + name: "stakingResult", + internalType: "enum StakingResult", + type: "uint8", + }, ], stateMutability: "nonpayable", }, @@ -17494,6 +19277,13 @@ export const sortitionModuleAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -18732,7 +20522,7 @@ export const sortitionModuleNeoProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) */ export const sortitionModuleUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -18938,7 +20728,7 @@ export const sortitionModuleUniversityAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], name: "jurors", outputs: [ { name: "stakedPnk", internalType: "uint256", type: "uint256" }, @@ -19009,7 +20799,11 @@ export const sortitionModuleUniversityAbi = [ outputs: [ { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "succeeded", internalType: "bool", type: "bool" }, + { + name: "stakingResult", + internalType: "enum StakingResult", + type: "uint8", + }, ], stateMutability: "nonpayable", }, @@ -19051,14 +20845,14 @@ export const sortitionModuleUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) */ export const sortitionModuleUniversityAddress = { - 421614: "0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04", + 421614: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) */ export const sortitionModuleUniversityConfig = { address: sortitionModuleUniversityAddress, @@ -19070,7 +20864,7 @@ export const sortitionModuleUniversityConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) */ export const sortitionModuleUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -19275,7 +21069,7 @@ export const sortitionModuleUniversityImplementationAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], name: "jurors", outputs: [ { name: "stakedPnk", internalType: "uint256", type: "uint256" }, @@ -19346,7 +21140,11 @@ export const sortitionModuleUniversityImplementationAbi = [ outputs: [ { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "succeeded", internalType: "bool", type: "bool" }, + { + name: "stakingResult", + internalType: "enum StakingResult", + type: "uint8", + }, ], stateMutability: "nonpayable", }, @@ -19380,14 +21178,14 @@ export const sortitionModuleUniversityImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) */ export const sortitionModuleUniversityImplementationAddress = { - 421614: "0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d", + 421614: "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) */ export const sortitionModuleUniversityImplementationConfig = { address: sortitionModuleUniversityImplementationAddress, @@ -19399,7 +21197,7 @@ export const sortitionModuleUniversityImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) */ export const sortitionModuleUniversityProxyAbi = [ { @@ -19415,14 +21213,14 @@ export const sortitionModuleUniversityProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) */ export const sortitionModuleUniversityProxyAddress = { - 421614: "0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04", + 421614: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) */ export const sortitionModuleUniversityProxyConfig = { address: sortitionModuleUniversityProxyAddress, @@ -19434,7 +21232,7 @@ export const sortitionModuleUniversityProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) */ export const sortitionModuleImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -19501,7 +21299,7 @@ export const sortitionModuleImplementationAbi = [ indexed: false, }, ], - name: "StakeDelayedAlreadyTransferred", + name: "StakeDelayedAlreadyTransferredDeposited", }, { type: "event", @@ -19595,6 +21393,12 @@ export const sortitionModuleImplementationAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -19613,17 +21417,10 @@ export const sortitionModuleImplementationAbi = [ }, { type: "function", - inputs: [], - name: "DEFAULT_K", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_STAKE_PATHS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", @@ -19770,6 +21567,13 @@ export const sortitionModuleImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_juror", internalType: "address", type: "address" }], @@ -19779,7 +21583,7 @@ export const sortitionModuleImplementationAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], name: "jurors", outputs: [ { name: "stakedPnk", internalType: "uint256", type: "uint256" }, @@ -19797,8 +21601,8 @@ export const sortitionModuleImplementationAbi = [ { 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" }], @@ -19923,7 +21727,11 @@ export const sortitionModuleImplementationAbi = [ outputs: [ { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { name: "succeeded", internalType: "bool", type: "bool" }, + { + name: "stakingResult", + internalType: "enum StakingResult", + type: "uint8", + }, ], stateMutability: "nonpayable", }, @@ -19967,17 +21775,24 @@ export const sortitionModuleImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) */ export const sortitionModuleImplementationAddress = { - 421614: "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + 421614: "0x45129beB9B84BFb07bA885085C1D60437494a93f", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) */ export const sortitionModuleImplementationConfig = { address: sortitionModuleImplementationAddress, diff --git a/contracts/deployments/mainnet.viem.ts b/contracts/deployments/mainnet.viem.ts index 48389fec5..9bf3a11c9 100644 --- a/contracts/deployments/mainnet.viem.ts +++ b/contracts/deployments/mainnet.viem.ts @@ -1,1712 +1,2047 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DAI +// BlockHashRNG ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) */ -export const daiAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, +export const blockHashRngAbi = [ + { + type: "function", + inputs: [{ name: "block", internalType: "uint256", type: "uint256" }], + name: "randomNumbers", + outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], + name: "receiveRandomness", + outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_block", internalType: "uint256", type: "uint256" }], + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) + */ +export const blockHashRngAddress = { + 42161: "0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x39D123fc4cFD24EA5bB76195f9ecFE1f0DF35b0B) + */ +export const blockHashRngConfig = { + address: blockHashRngAddress, + abi: blockHashRngAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ChainlinkRNG +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) + */ +export const chainlinkRngAbi = [ + { + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_sortitionModule", internalType: "address", type: "address" }, + { name: "_vrfCoordinator", internalType: "address", type: "address" }, + { name: "_keyHash", internalType: "bytes32", type: "bytes32" }, + { name: "_subscriptionId", internalType: "uint256", type: "uint256" }, + { name: "_requestConfirmations", internalType: "uint16", type: "uint16" }, + { name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }, + ], + stateMutability: "nonpayable", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "address", type: "address" }, + { name: "want", internalType: "address", type: "address" }, + ], + name: "OnlyCoordinatorCanFulfill", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "address", type: "address" }, + { name: "owner", internalType: "address", type: "address" }, + { name: "coordinator", internalType: "address", type: "address" }, + ], + name: "OnlyOwnerOrCoordinator", + }, + { type: "error", inputs: [], name: "ZeroAddress" }, { type: "event", anonymous: false, inputs: [ { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", + name: "vrfCoordinator", internalType: "address", type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", indexed: false, }, ], - name: "Approval", + name: "CoordinatorSet", }, { type: "event", anonymous: false, - inputs: [{ name: "usr", internalType: "address", type: "address", indexed: true }], - name: "Deny", + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferRequested", }, { type: "event", anonymous: false, - inputs: [{ name: "usr", internalType: "address", type: "address", indexed: true }], - name: "Rely", + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferred", }, { type: "event", anonymous: false, inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, { - name: "value", + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "randomWord", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "Transfer", + name: "RequestFulfilled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + ], + name: "RequestSent", }, { type: "function", inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "PERMIT_TYPEHASH", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "callbackGasLimit", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }], + name: "changeCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_keyHash", internalType: "bytes32", type: "bytes32" }], + name: "changeKeyHash", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "burn", + inputs: [{ name: "_requestConfirmations", internalType: "uint16", type: "uint16" }], + name: "changeRequestConfirmations", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", + inputs: [{ name: "_sortitionModule", internalType: "address", type: "address" }], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [{ name: "_subscriptionId", internalType: "uint256", type: "uint256" }], + name: "changeSubscriptionId", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "usr", internalType: "address", type: "address" }], - name: "deny", + inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], + name: "changeVrfCoordinator", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "deploymentChainId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", + inputs: [], + name: "keyHash", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "lastRequestId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "nonces", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], + name: "randomNumbers", + outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - { name: "deadline", internalType: "uint256", type: "uint256" }, - { name: "v", internalType: "uint8", type: "uint8" }, - { name: "r", internalType: "bytes32", type: "bytes32" }, - { name: "s", internalType: "bytes32", type: "bytes32" }, + { name: "requestId", internalType: "uint256", type: "uint256" }, + { name: "randomWords", internalType: "uint256[]", type: "uint256[]" }, ], - name: "permit", + name: "rawFulfillRandomWords", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "usr", internalType: "address", type: "address" }], - name: "rely", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "receiveRandomness", + outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "requestConfirmations", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, + inputs: [], + name: "s_vrfCoordinator", + outputs: [ + { + name: "", + internalType: "contract IVRFCoordinatorV2Plus", + type: "address", + }, ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], + name: "setCoordinator", + outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "sortitionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "wards", + inputs: [], + name: "subscriptionId", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + }, ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) */ -export const daiAddress = { - 42161: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", +export const chainlinkRngAddress = { + 42161: "0x897d83a7d5F23555eFA15e1BE297d5503522cbA3", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) */ -export const daiConfig = { address: daiAddress, abi: daiAbi } as const; +export const chainlinkRngConfig = { + address: chainlinkRngAddress, + abi: chainlinkRngAbi, +} as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicNeo +// ChainlinkVRFCoordinator ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e) */ -export const disputeKitClassicNeoAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, +export const chainlinkVrfCoordinatorAbi = [ + { + type: "constructor", + inputs: [{ name: "blockhashStore", internalType: "address", type: "address" }], + stateMutability: "nonpayable", + }, { type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", + inputs: [ + { name: "internalBalance", internalType: "uint256", type: "uint256" }, + { name: "externalBalance", internalType: "uint256", type: "uint256" }, + ], + name: "BalanceInvariantViolated", }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + inputs: [{ name: "blockNum", internalType: "uint256", type: "uint256" }], + name: "BlockhashNotInStore", + }, + { + type: "error", + inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], + name: "CoordinatorAlreadyRegistered", + }, + { + type: "error", + inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], + name: "CoordinatorNotRegistered", + }, + { type: "error", inputs: [], name: "FailedToSendNative" }, + { type: "error", inputs: [], name: "FailedToTransferLink" }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint32", type: "uint32" }, + { name: "want", internalType: "uint32", type: "uint32" }, + ], + name: "GasLimitTooBig", + }, + { + type: "error", + inputs: [ + { name: "gasPrice", internalType: "uint256", type: "uint256" }, + { name: "maxGas", internalType: "uint256", type: "uint256" }, + ], + name: "GasPriceExceeded", + }, + { type: "error", inputs: [], name: "IncorrectCommitment" }, + { type: "error", inputs: [], name: "IndexOutOfRange" }, + { type: "error", inputs: [], name: "InsufficientBalance" }, + { type: "error", inputs: [], name: "InvalidCalldata" }, + { + type: "error", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "InvalidConsumer", + }, + { type: "error", inputs: [], name: "InvalidExtraArgsTag" }, + { + type: "error", + inputs: [{ name: "linkWei", internalType: "int256", type: "int256" }], + name: "InvalidLinkWeiPrice", + }, + { + type: "error", + inputs: [ + { name: "premiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "max", internalType: "uint8", type: "uint8" }, + ], + name: "InvalidPremiumPercentage", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint16", type: "uint16" }, + { name: "min", internalType: "uint16", type: "uint16" }, + { name: "max", internalType: "uint16", type: "uint16" }, + ], + name: "InvalidRequestConfirmations", + }, + { type: "error", inputs: [], name: "InvalidSubscription" }, + { type: "error", inputs: [], name: "LinkAlreadySet" }, + { + type: "error", + inputs: [ + { + name: "flatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "flatFeeNativePPM", internalType: "uint32", type: "uint32" }, + ], + name: "LinkDiscountTooHigh", + }, + { type: "error", inputs: [], name: "LinkNotSet" }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint256", type: "uint256" }, + { name: "max", internalType: "uint32", type: "uint32" }, + ], + name: "MsgDataTooBig", }, + { + type: "error", + inputs: [{ name: "proposedOwner", internalType: "address", type: "address" }], + name: "MustBeRequestedOwner", + }, + { + type: "error", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "MustBeSubOwner", + }, + { type: "error", inputs: [], name: "NoCorrespondingRequest" }, + { + type: "error", + inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], + name: "NoSuchProvingKey", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint32", type: "uint32" }, + { name: "want", internalType: "uint32", type: "uint32" }, + ], + name: "NumWordsTooBig", + }, + { type: "error", inputs: [], name: "OnlyCallableFromLink" }, + { type: "error", inputs: [], name: "PaymentTooLarge" }, + { type: "error", inputs: [], name: "PendingRequestExists" }, + { + type: "error", + inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], + name: "ProvingKeyAlreadyRegistered", + }, + { type: "error", inputs: [], name: "Reentrant" }, + { type: "error", inputs: [], name: "TooManyConsumers" }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + indexed: false, }, { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "maxGasLimit", + internalType: "uint32", + type: "uint32", + indexed: false, }, { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "stalenessSeconds", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "nativePremiumPercentage", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + { + name: "linkPremiumPercentage", + internalType: "uint8", + type: "uint8", + indexed: false, }, ], - name: "ChoiceFunded", + name: "ConfigSet", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", + name: "coordinatorAddress", internalType: "address", type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", indexed: false, }, + ], + name: "CoordinatorDeregistered", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "_commit", - internalType: "bytes32", - type: "bytes32", + name: "coordinatorAddress", + internalType: "address", + type: "address", indexed: false, }, ], - name: "CommitCast", + name: "CoordinatorRegistered", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", + name: "requestId", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + indexed: false, }, + ], + name: "FallbackWeiPerUnitLinkUsed", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "to", internalType: "address", type: "address", indexed: false }, { - name: "_choice", + name: "amount", internalType: "uint256", type: "uint256", indexed: false, }, + ], + name: "FundsRecovered", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "_contributor", + name: "newCoordinator", internalType: "address", type: "address", - indexed: true, + indexed: false, }, { - name: "_amount", + name: "subId", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "Contribution", + name: "MigrationCompleted", }, { type: "event", anonymous: false, inputs: [ + { name: "to", internalType: "address", type: "address", indexed: false }, { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", + name: "amount", internalType: "uint256", type: "uint256", indexed: false, }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, ], - name: "DisputeCreation", + name: "NativeFundsRecovered", }, { type: "event", anonymous: false, inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, ], - name: "Initialized", + name: "OwnershipTransferRequested", }, { type: "event", anonymous: false, inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, ], - name: "Upgraded", + name: "OwnershipTransferred", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, }, { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", + name: "maxGas", + internalType: "uint64", + type: "uint64", indexed: false, }, + ], + name: "ProvingKeyDeregistered", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, }, { - name: "_justification", - internalType: "string", - type: "string", + name: "maxGas", + internalType: "uint64", + type: "uint64", indexed: false, }, ], - name: "VoteCast", + name: "ProvingKeyRegistered", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", + name: "requestId", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_coreRoundID", + name: "outputSeed", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_choice", + name: "subId", internalType: "uint256", type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", indexed: true, }, { - name: "_amount", + name: "payment", + internalType: "uint96", + type: "uint96", + indexed: false, + }, + { + name: "nativePayment", + internalType: "bool", + type: "bool", + indexed: false, + }, + { name: "success", internalType: "bool", type: "bool", indexed: false }, + { + name: "onlyPremium", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "RandomWordsFulfilled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: true, + }, + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "preSeed", internalType: "uint256", type: "uint256", indexed: false, }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + indexed: false, + }, + { + name: "callbackGasLimit", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "numWords", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "extraArgs", + internalType: "bytes", + type: "bytes", + indexed: false, + }, + { + name: "sender", + internalType: "address", + type: "address", + indexed: true, + }, ], - name: "Withdrawal", + name: "RandomWordsRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amountLink", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "amountNative", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionCanceled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "consumer", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionConsumerAdded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "consumer", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionConsumerRemoved", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "owner", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "oldBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "newBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionFunded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "oldNativeBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "newNativeBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionFundedWithNative", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "from", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + ], + name: "SubscriptionOwnerTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "from", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + ], + name: "SubscriptionOwnerTransferred", }, { type: "function", inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "BLOCKHASH_STORE", + outputs: [ + { + name: "", + internalType: "contract BlockhashStoreInterface", + type: "address", + }, + ], stateMutability: "view", }, { type: "function", inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "LINK", + outputs: [ + { + name: "", + internalType: "contract LinkTokenInterface", + type: "address", + }, + ], stateMutability: "view", }, { type: "function", inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "LINK_NATIVE_FEED", + outputs: [ + { + name: "", + internalType: "contract AggregatorV3Interface", + type: "address", + }, + ], stateMutability: "view", }, { type: "function", inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "MAX_CONSUMERS", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "MAX_NUM_WORDS", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "MAX_REQUEST_CONFIRMATIONS", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", + inputs: [], + name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "acceptSubscriptionOwnerTransfer", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "addConsumer", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "to", internalType: "address", type: "address" }, + ], + name: "cancelSubscription", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", + name: "createSubscription", + outputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "deregisterMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + { + name: "publicProvingKey", + internalType: "uint256[2]", + type: "uint256[2]", + }, ], - name: "createDispute", + name: "deregisterProvingKey", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, + inputs: [ + { + name: "proof", + internalType: "struct VRF.Proof", + type: "tuple", + components: [ + { name: "pk", internalType: "uint256[2]", type: "uint256[2]" }, + { name: "gamma", internalType: "uint256[2]", type: "uint256[2]" }, + { name: "c", internalType: "uint256", type: "uint256" }, + { name: "s", internalType: "uint256", type: "uint256" }, + { name: "seed", internalType: "uint256", type: "uint256" }, + { name: "uWitness", internalType: "address", type: "address" }, + { + name: "cGammaWitness", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { + name: "sHashWitness", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { name: "zInv", internalType: "uint256", type: "uint256" }, + ], + }, + { + name: "rc", + internalType: "struct VRFTypes.RequestCommitmentV2Plus", + type: "tuple", + components: [ + { name: "blockNum", internalType: "uint64", type: "uint64" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, + { name: "numWords", internalType: "uint32", type: "uint32" }, + { name: "sender", internalType: "address", type: "address" }, + { name: "extraArgs", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "onlyPremium", internalType: "bool", type: "bool" }, + ], + name: "fulfillRandomWords", + outputs: [{ name: "payment", internalType: "uint96", type: "uint96" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "fundSubscriptionWithNative", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "startIndex", internalType: "uint256", type: "uint256" }, + { name: "maxCount", internalType: "uint256", type: "uint256" }, ], + name: "getActiveSubscriptionIds", + outputs: [{ name: "ids", internalType: "uint256[]", type: "uint256[]" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "getSubscription", outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, + { name: "balance", internalType: "uint96", type: "uint96" }, + { name: "nativeBalance", internalType: "uint96", type: "uint96" }, + { name: "reqCount", internalType: "uint64", type: "uint64" }, + { name: "subOwner", internalType: "address", type: "address" }, + { name: "consumers", internalType: "address[]", type: "address[]" }, ], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "publicKey", internalType: "uint256[2]", type: "uint256[2]" }], + name: "hashOfKey", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "pure", + }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "newCoordinator", internalType: "address", type: "address" }, ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + name: "migrate", + outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], - name: "executeGovernorProposal", + name: "onTokenTransfer", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "ownerCancelSubscription", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "pendingRequestExists", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address payable", type: "address" }], + name: "recoverNativeFunds", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "registerMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, + { + name: "publicProvingKey", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { name: "maxGas", internalType: "uint64", type: "uint64" }, ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "registerProvingKey", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "removeConsumer", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, + { + name: "req", + internalType: "struct VRFV2PlusClient.RandomWordsRequest", + type: "tuple", + components: [ + { name: "keyHash", internalType: "bytes32", type: "bytes32" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { + name: "requestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, + { name: "numWords", internalType: "uint32", type: "uint32" }, + { name: "extraArgs", internalType: "bytes", type: "bytes" }, + ], + }, ], - stateMutability: "view", + name: "requestRandomWords", + outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "newOwner", internalType: "address", type: "address" }, ], - name: "getVoteInfo", + name: "requestSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "s_config", outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, + { name: "reentrancyLock", internalType: "bool", type: "bool" }, + { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, ], stateMutability: "view", }, { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "s_currentSubNonce", + outputs: [{ name: "", internalType: "uint64", type: "uint64" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "s_fallbackWeiPerUnitLink", + outputs: [{ name: "", internalType: "int256", type: "int256" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "s_provingKeyHashes", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "s_provingKeys", + outputs: [ + { name: "exists", internalType: "bool", type: "bool" }, + { name: "maxGas", internalType: "uint64", type: "uint64" }, ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "proxiableUUID", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "s_requestCommitments", outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + inputs: [], + name: "s_totalBalance", + outputs: [{ name: "", internalType: "uint96", type: "uint96" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_totalNativeBalance", + outputs: [{ name: "", internalType: "uint96", type: "uint96" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { - name: "_beneficiary", - internalType: "address payable", - type: "address", + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, + { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], + name: "setConfig", + outputs: [], stateMutability: "nonpayable", }, { - type: "constructor", + type: "function", inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "link", internalType: "address", type: "address" }, + { name: "linkNativeFeed", internalType: "address", type: "address" }, ], + name: "setLINKAndLINKNativeFeed", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "recipient", internalType: "address", type: "address" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "recipient", internalType: "address payable", type: "address" }], + name: "withdrawNative", + outputs: [], stateMutability: "nonpayable", }, ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e) */ -export const disputeKitClassicNeoAddress = { - 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", +export const chainlinkVrfCoordinatorAddress = { + 42161: "0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3C0Ca683b403E37668AE3DC4FB62F4B29B6f7a3e) */ -export const disputeKitClassicNeoConfig = { - address: disputeKitClassicNeoAddress, - abi: disputeKitClassicNeoAbi, +export const chainlinkVrfCoordinatorConfig = { + address: chainlinkVrfCoordinatorAddress, + abi: chainlinkVrfCoordinatorAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicNeo_Implementation +// DAI ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) */ -export const disputeKitClassicNeoImplementationAbi = [ +export const daiAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", + name: "owner", internalType: "address", type: "address", indexed: true, }, { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", + name: "spender", internalType: "address", type: "address", indexed: true, }, { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_numberOfChoices", + name: "value", internalType: "uint256", type: "uint256", indexed: false, }, - { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, ], - name: "Initialized", + name: "Approval", }, { type: "event", anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", + inputs: [{ name: "usr", internalType: "address", type: "address", indexed: true }], + name: "Deny", }, { type: "event", anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", + inputs: [{ name: "usr", internalType: "address", type: "address", indexed: true }], + name: "Rely", }, { type: "event", anonymous: false, inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", + name: "value", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "Transfer", }, { type: "function", inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "DOMAIN_SEPARATOR", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "PERMIT_TYPEHASH", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", + inputs: [ + { name: "", internalType: "address", type: "address" }, + { name: "", internalType: "address", type: "address" }, + ], + name: "allowance", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", + inputs: [ + { name: "spender", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, + ], + name: "approve", outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [{ name: "", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, - ], - name: "castCommit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, + { name: "from", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", + name: "burn", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "subtractedValue", internalType: "uint256", type: "uint256" }, ], - name: "createDispute", - outputs: [], + name: "decreaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", + inputs: [{ name: "usr", internalType: "address", type: "address" }], + name: "deny", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], + inputs: [], + name: "deploymentChainId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "addedValue", internalType: "uint256", type: "uint256" }, ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + name: "increaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "to", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, ], - name: "executeGovernorProposal", + name: "mint", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", + inputs: [{ name: "", internalType: "address", type: "address" }], + name: "nonces", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, + { name: "deadline", internalType: "uint256", type: "uint256" }, + { name: "v", internalType: "uint8", type: "uint8" }, + { name: "r", internalType: "bytes32", type: "bytes32" }, + { name: "s", internalType: "bytes32", type: "bytes32" }, ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", + name: "permit", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", + inputs: [{ name: "usr", internalType: "address", type: "address" }], + name: "rely", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, - ], + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "totalSupply", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, ], - name: "initialize", - outputs: [], + name: "transfer", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, ], - name: "isVoteActive", + name: "transferFrom", outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", + inputs: [{ name: "", internalType: "address", type: "address" }], + name: "wards", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) */ -export const disputeKitClassicNeoImplementationAddress = { - 42161: "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", +export const daiAddress = { + 42161: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1) */ -export const disputeKitClassicNeoImplementationConfig = { - address: disputeKitClassicNeoImplementationAddress, - abi: disputeKitClassicNeoImplementationAbi, -} as const; +export const daiConfig = { address: daiAddress, abi: daiAbi } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicNeo_Proxy +// DisputeKitClassicNeo ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ -export const disputeKitClassicNeoProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, +export const disputeKitClassicNeoAbi = [ { type: "fallback", stateMutability: "payable" }, { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicNeoProxyAddress = { - 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) - */ -export const disputeKitClassicNeoProxyConfig = { - address: disputeKitClassicNeoProxyAddress, - abi: disputeKitClassicNeoProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverNeo -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) - */ -export const disputeResolverNeoAbi = [ + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "constructor", + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, }, { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", + name: "_coreRoundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_choice", + internalType: "uint256", + type: "uint256", + indexed: true, }, ], - stateMutability: "nonpayable", + name: "ChoiceFunded", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_juror", + internalType: "address", type: "address", indexed: true, }, { - name: "_arbitratorDisputeID", + name: "_voteIDs", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + { + name: "_commit", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + ], + name: "CommitCast", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_coreDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_externalDisputeID", + name: "_coreRoundID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { - name: "_templateId", + name: "_choice", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateUri", - internalType: "string", - type: "string", + name: "_contributor", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", indexed: false, }, ], - name: "DisputeRequest", + name: "Contribution", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", + name: "_coreDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_ruling", + name: "_numberOfChoices", internalType: "uint256", type: "uint256", indexed: false, }, + { + name: "_extraData", + internalType: "bytes", + type: "bytes", + indexed: false, + }, ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "DisputeCreation", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, }, ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + name: "Initialized", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", + name: "newImplementation", + internalType: "address", type: "address", + indexed: true, }, ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", + name: "Upgraded", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, }, { - name: "_numberOfRulingOptions", + name: "_juror", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_voteIDs", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + { + name: "_choice", internalType: "uint256", type: "uint256", + indexed: true, + }, + { + name: "_justification", + internalType: "string", + type: "string", + indexed: false, }, ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", + name: "VoteCast", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, { - name: "_numberOfRulingOptions", + name: "_coreDisputeID", internalType: "uint256", type: "uint256", + indexed: true, }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, { - name: "numberOfRulingOptions", + name: "_coreRoundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_choice", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_contributor", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", internalType: "uint256", type: "uint256", + indexed: false, }, ], - stateMutability: "view", + name: "Withdrawal", }, { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "LOSER_STAKE_MULTIPLIER", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], + name: "ONE_BASIS_POINT", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) - */ -export const disputeResolverNeoAddress = { - 42161: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) - */ -export const disputeResolverNeoConfig = { - address: disputeResolverNeoAddress, - abi: disputeResolverNeoAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", + type: "function", + inputs: [], + name: "WINNER_STAKE_MULTIPLIER", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "areCommitsAllCast", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "areVotesAllCast", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_commit", internalType: "bytes32", type: "bytes32" }, ], - name: "Initialized", + name: "castCommit", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "_salt", internalType: "uint256", type: "uint256" }, + { name: "_justification", internalType: "string", type: "string" }, ], - name: "Upgraded", + name: "castVote", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], + inputs: [{ name: "_core", internalType: "address", type: "address" }], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], name: "changeGovernor", outputs: [], stateMutability: "nonpayable", @@ -1714,163 +2049,145 @@ export const disputeTemplateRegistryAbi = [ { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "core", + outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "coreDisputeIDToLocal", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + ], + name: "createDispute", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "currentRuling", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "jumped", internalType: "bool", type: "bool" }, + { name: "extraData", internalType: "bytes", type: "bytes" }, + ], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_nonce", internalType: "uint256", type: "uint256" }, ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], + name: "draw", + outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, ], - name: "upgradeToAndCall", + name: "fundAppeal", outputs: [], stateMutability: "payable", }, { - type: "constructor", + type: "function", inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, ], - stateMutability: "nonpayable", + name: "getCoherentCount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryAddress = { - 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryConfig = { - address: disputeTemplateRegistryAddress, - abi: disputeTemplateRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - */ -export const disputeTemplateRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], - name: "DisputeTemplate", + name: "getDegreeOfCoherence", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "getFundedChoices", + outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, ], - name: "Upgraded", + name: "getRoundInfo", + outputs: [ + { name: "winningChoice", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "totalVoted", internalType: "uint256", type: "uint256" }, + { name: "totalCommited", internalType: "uint256", type: "uint256" }, + { name: "nbVoters", internalType: "uint256", type: "uint256" }, + { name: "choiceCount", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + ], + name: "getVoteInfo", + outputs: [ + { name: "account", internalType: "address", type: "address" }, + { name: "commit", internalType: "bytes32", type: "bytes32" }, + { name: "choice", internalType: "uint256", type: "uint256" }, + { name: "voted", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", }, { type: "function", @@ -1881,34 +2198,30 @@ export const disputeTemplateRegistryImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_core", internalType: "contract KlerosCore", type: "address" }, + ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, { type: "function", inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", + name: "isVoteActive", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { @@ -1921,31 +2234,22 @@ export const disputeTemplateRegistryImplementationAbi = [ outputs: [], stateMutability: "payable", }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - */ -export const disputeTemplateRegistryImplementationAddress = { - 42161: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - */ -export const disputeTemplateRegistryImplementationConfig = { - address: disputeTemplateRegistryImplementationAddress, - abi: disputeTemplateRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) - */ -export const disputeTemplateRegistryProxyAbi = [ + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { + name: "_beneficiary", + internalType: "address payable", + type: "address", + }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, + ], + name: "withdrawFeesAndRewards", + outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, { type: "constructor", inputs: [ @@ -1954,35 +2258,32 @@ export const disputeTemplateRegistryProxyAbi = [ ], stateMutability: "nonpayable", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ -export const disputeTemplateRegistryProxyAddress = { - 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", +export const disputeKitClassicNeoAddress = { + 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ -export const disputeTemplateRegistryProxyConfig = { - address: disputeTemplateRegistryProxyAddress, - abi: disputeTemplateRegistryProxyAbi, +export const disputeKitClassicNeoConfig = { + address: disputeKitClassicNeoAddress, + abi: disputeKitClassicNeoAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule +// DisputeKitClassicNeo_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) */ -export const evidenceModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, +export const disputeKitClassicNeoImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { @@ -2002,258 +2303,528 @@ export const evidenceModuleAbi = [ anonymous: false, inputs: [ { - name: "_externalDisputeID", + name: "_coreDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_party", - internalType: "address", - type: "address", + name: "_coreRoundID", + internalType: "uint256", + type: "uint256", indexed: true, }, { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, + name: "_choice", + internalType: "uint256", + type: "uint256", + indexed: true, }, ], - name: "Evidence", + name: "ChoiceFunded", }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_juror", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_voteIDs", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + { + name: "_commit", + internalType: "bytes32", + type: "bytes32", indexed: false, }, ], - name: "Initialized", + name: "CommitCast", }, { type: "event", anonymous: false, inputs: [ { - name: "newImplementation", - internalType: "address", - type: "address", + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", indexed: true, }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", + { + name: "_coreRoundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_choice", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_contributor", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Contribution", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, + { + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_numberOfChoices", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_extraData", + internalType: "bytes", + type: "bytes", + indexed: false, + }, ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", + name: "DisputeCreation", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + name: "Initialized", }, { - type: "constructor", + type: "event", + anonymous: false, inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleAddress = { - 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) - */ -export const evidenceModuleConfig = { - address: evidenceModuleAddress, - abi: evidenceModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) - */ -export const evidenceModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + name: "Upgraded", }, { type: "event", anonymous: false, inputs: [ { - name: "_externalDisputeID", + name: "_coreDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_party", + name: "_juror", internalType: "address", type: "address", indexed: true, }, { - name: "_evidence", + name: "_voteIDs", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + { + name: "_choice", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_justification", internalType: "string", type: "string", indexed: false, }, ], - name: "Evidence", + name: "VoteCast", }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", + name: "_coreDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_coreRoundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_choice", + internalType: "uint256", + type: "uint256", indexed: false, }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "newImplementation", + name: "_contributor", internalType: "address", type: "address", indexed: true, }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], - name: "Upgraded", + name: "Withdrawal", }, { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "LOSER_STAKE_MULTIPLIER", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "ONE_BASIS_POINT", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "WINNER_STAKE_MULTIPLIER", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "areCommitsAllCast", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "areVotesAllCast", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_commit", internalType: "bytes32", type: "bytes32" }, ], - name: "submitEvidence", + name: "castCommit", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "_salt", internalType: "uint256", type: "uint256" }, + { name: "_justification", internalType: "string", type: "string" }, ], - name: "upgradeToAndCall", + name: "castVote", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, -] as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) - */ -export const evidenceModuleImplementationAddress = { - 42161: "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", -} as const; - -/** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) - */ -export const evidenceModuleImplementationConfig = { - address: evidenceModuleImplementationAddress, - abi: evidenceModuleImplementationAbi, + { + type: "function", + inputs: [{ name: "_core", internalType: "address", type: "address" }], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "core", + outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "coreDisputeIDToLocal", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + ], + name: "createDispute", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "currentRuling", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "jumped", internalType: "bool", type: "bool" }, + { name: "extraData", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_nonce", internalType: "uint256", type: "uint256" }, + ], + name: "draw", + outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, + ], + name: "fundAppeal", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + ], + name: "getCoherentCount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + ], + name: "getDegreeOfCoherence", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "getFundedChoices", + outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, + ], + name: "getRoundInfo", + outputs: [ + { name: "winningChoice", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "totalVoted", internalType: "uint256", type: "uint256" }, + { name: "totalCommited", internalType: "uint256", type: "uint256" }, + { name: "nbVoters", internalType: "uint256", type: "uint256" }, + { name: "choiceCount", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + ], + name: "getVoteInfo", + outputs: [ + { name: "account", internalType: "address", type: "address" }, + { name: "commit", internalType: "bytes32", type: "bytes32" }, + { name: "choice", internalType: "uint256", type: "uint256" }, + { name: "voted", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_core", internalType: "contract KlerosCore", type: "address" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + ], + name: "isVoteActive", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { + name: "_beneficiary", + internalType: "address payable", + type: "address", + }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_choice", internalType: "uint256", type: "uint256" }, + ], + name: "withdrawFeesAndRewards", + outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) + */ +export const disputeKitClassicNeoImplementationAddress = { + 42161: "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) + */ +export const disputeKitClassicNeoImplementationConfig = { + address: disputeKitClassicNeoImplementationAddress, + abi: disputeKitClassicNeoImplementationAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Proxy +// DisputeKitClassicNeo_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ -export const evidenceModuleProxyAbi = [ +export const disputeKitClassicNeoProxyAbi = [ { type: "constructor", inputs: [ @@ -2267,25 +2838,44 @@ export const evidenceModuleProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ -export const evidenceModuleProxyAddress = { - 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", +export const disputeKitClassicNeoProxyAddress = { + 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ -export const evidenceModuleProxyConfig = { - address: evidenceModuleProxyAddress, - abi: evidenceModuleProxyAbi, +export const disputeKitClassicNeoProxyConfig = { + address: disputeKitClassicNeoProxyAddress, + abi: disputeKitClassicNeoProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IHomeGateway +// DisputeResolverNeo ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const iHomeGatewayAbi = [ +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) + */ +export const disputeResolverNeoAbi = [ + { + type: "constructor", + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + stateMutability: "nonpayable", + }, { type: "event", anonymous: false, @@ -2294,52 +2884,232 @@ export const iHomeGatewayAbi = [ name: "_arbitrator", internalType: "contract IArbitratorV2", type: "address", + indexed: true, + }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", indexed: false, }, { - name: "_arbitrableChainId", + name: "_templateId", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_arbitrable", - internalType: "address", + name: "_templateUri", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "DisputeRequest", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", type: "address", indexed: true, }, { - name: "_arbitrableDisputeID", + name: "_disputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_arbitratorDisputeID", + name: "_ruling", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, + }, + ], + name: "Ruling", + }, + { + type: "function", + inputs: [], + name: "arbitrator", + outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "arbitratorDisputeIDToLocalID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, + ], + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplate", internalType: "string", type: "string" }, + { + name: "_disputeTemplateDataMappings", + internalType: "string", + type: "string", }, { - name: "_externalDisputeID", + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + name: "createDisputeForTemplate", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplateUri", internalType: "string", type: "string" }, + { + name: "_numberOfRulingOptions", internalType: "uint256", type: "uint256", - indexed: false, }, + ], + name: "createDisputeForTemplateUri", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "isRuled", internalType: "bool", type: "bool" }, + { name: "ruling", internalType: "uint256", type: "uint256" }, { - name: "_templateId", + name: "numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "_arbitratorDisputeID", internalType: "uint256", type: "uint256", - indexed: false, }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + ], + name: "rule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "templateRegistry", + outputs: [ { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, + name: "", + internalType: "contract IDisputeTemplateRegistry", + type: "address", }, ], - name: "CrossChainDisputeIncoming", + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) + */ +export const disputeResolverNeoAddress = { + 42161: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) + */ +export const disputeResolverNeoConfig = { + address: disputeResolverNeoAddress, + abi: disputeResolverNeoAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeResolverRulerNeo +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) + */ +export const disputeResolverRulerNeoAbi = [ + { + type: "constructor", + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + stateMutability: "nonpayable", }, { type: "event", @@ -2379,214 +3149,3496 @@ export const iHomeGatewayAbi = [ name: "DisputeRequest", }, { - type: "event", - anonymous: false, - inputs: [ + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Ruling", + }, + { + type: "function", + inputs: [], + name: "arbitrator", + outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "arbitratorDisputeIDToLocalID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, + ], + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplate", internalType: "string", type: "string" }, + { + name: "_disputeTemplateDataMappings", + internalType: "string", + type: "string", + }, + { + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + name: "createDisputeForTemplate", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplateUri", internalType: "string", type: "string" }, + { + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + name: "createDisputeForTemplateUri", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "isRuled", internalType: "bool", type: "bool" }, + { name: "ruling", internalType: "uint256", type: "uint256" }, + { + name: "numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + ], + name: "rule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "templateRegistry", + outputs: [ + { + name: "", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) + */ +export const disputeResolverRulerNeoAddress = { + 42161: "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) + */ +export const disputeResolverRulerNeoConfig = { + address: disputeResolverRulerNeoAddress, + abi: disputeResolverRulerNeoAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistry +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + */ +export const disputeTemplateRegistryAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_templateTag", + internalType: "string", + type: "string", + indexed: true, + }, + { + name: "_templateData", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_templateDataMappings", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "DisputeTemplate", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_templateTag", internalType: "string", type: "string" }, + { name: "_templateData", internalType: "string", type: "string" }, + { name: "_templateDataMappings", internalType: "string", type: "string" }, + ], + name: "setDisputeTemplate", + outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "templates", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + */ +export const disputeTemplateRegistryAddress = { + 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + */ +export const disputeTemplateRegistryConfig = { + address: disputeTemplateRegistryAddress, + abi: disputeTemplateRegistryAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistry_Implementation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) + */ +export const disputeTemplateRegistryImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_templateTag", + internalType: "string", + type: "string", + indexed: true, + }, + { + name: "_templateData", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_templateDataMappings", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "DisputeTemplate", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_templateTag", internalType: "string", type: "string" }, + { name: "_templateData", internalType: "string", type: "string" }, + { name: "_templateDataMappings", internalType: "string", type: "string" }, + ], + name: "setDisputeTemplate", + outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "templates", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) + */ +export const disputeTemplateRegistryImplementationAddress = { + 42161: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) + */ +export const disputeTemplateRegistryImplementationConfig = { + address: disputeTemplateRegistryImplementationAddress, + abi: disputeTemplateRegistryImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistry_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + */ +export const disputeTemplateRegistryProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + */ +export const disputeTemplateRegistryProxyAddress = { + 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) + */ +export const disputeTemplateRegistryProxyConfig = { + address: disputeTemplateRegistryProxyAddress, + abi: disputeTemplateRegistryProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// EvidenceModule +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + */ +export const evidenceModuleAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_party", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_evidence", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "Evidence", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_evidence", internalType: "string", type: "string" }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + */ +export const evidenceModuleAddress = { + 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + */ +export const evidenceModuleConfig = { + address: evidenceModuleAddress, + abi: evidenceModuleAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// EvidenceModule_Implementation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) + */ +export const evidenceModuleImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_party", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_evidence", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "Evidence", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_evidence", internalType: "string", type: "string" }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) + */ +export const evidenceModuleImplementationAddress = { + 42161: "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) + */ +export const evidenceModuleImplementationConfig = { + address: evidenceModuleImplementationAddress, + abi: evidenceModuleImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// EvidenceModule_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + */ +export const evidenceModuleProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + */ +export const evidenceModuleProxyAddress = { + 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) + */ +export const evidenceModuleProxyConfig = { + address: evidenceModuleProxyAddress, + abi: evidenceModuleProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// IHomeGateway +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const iHomeGatewayAbi = [ + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: false, + }, + { + name: "_arbitrableChainId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_arbitrable", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_arbitrableDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateUri", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "CrossChainDisputeIncoming", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateUri", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "DisputeRequest", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Ruling", + }, + { + type: "function", + inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], + name: "disputeHashToHomeID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "feeToken", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "foreignChainID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "foreignGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "receiverGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "_params", + internalType: "struct IHomeGateway.RelayCreateDisputeParams", + type: "tuple", + components: [ + { + name: "foreignBlockHash", + internalType: "bytes32", + type: "bytes32", + }, + { name: "foreignChainID", internalType: "uint256", type: "uint256" }, + { + name: "foreignArbitrable", + internalType: "address", + type: "address", + }, + { + name: "foreignDisputeID", + internalType: "uint256", + type: "uint256", + }, + { + name: "externalDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "templateId", internalType: "uint256", type: "uint256" }, + { name: "templateUri", internalType: "string", type: "string" }, + { name: "choices", internalType: "uint256", type: "uint256" }, + { name: "extraData", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, + ], + name: "relayCreateDispute", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_params", + internalType: "struct IHomeGateway.RelayCreateDisputeParams", + type: "tuple", + components: [ + { + name: "foreignBlockHash", + internalType: "bytes32", + type: "bytes32", + }, + { name: "foreignChainID", internalType: "uint256", type: "uint256" }, + { + name: "foreignArbitrable", + internalType: "address", + type: "address", + }, + { + name: "foreignDisputeID", + internalType: "uint256", + type: "uint256", + }, + { + name: "externalDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "templateId", internalType: "uint256", type: "uint256" }, + { name: "templateUri", internalType: "string", type: "string" }, + { name: "choices", internalType: "uint256", type: "uint256" }, + { name: "extraData", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "relayCreateDispute", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + ], + name: "rule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "veaInbox", + outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], + stateMutability: "view", + }, +] as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreNeo +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + */ +export const klerosCoreNeoAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", 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: [{ name: "implementation", internalType: "address", 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: [{ name: "slot", internalType: "bytes32", 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: "event", + anonymous: false, + inputs: [ + { + name: "_token", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, + ], + name: "AcceptedFeeToken", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "AppealDecision", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "AppealPossible", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_parent", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_alpha", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + ], + name: "CourtCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromCourtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_toCourtID", + internalType: "uint96", + type: "uint96", + indexed: false, + }, + ], + name: "CourtJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_alpha", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, + ], + name: "CourtModified", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "DisputeCreation", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + indexed: true, + }, + ], + name: "DisputeKitCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "_enable", internalType: "bool", type: "bool", indexed: true }, + ], + name: "DisputeKitEnabled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_toDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "DisputeKitJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_address", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_voteID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Draw", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_pnkAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "LeftoverRewardSent", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { + name: "_rateInEth", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + { + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + ], + name: "NewCurrencyRate", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + indexed: false, + }, + ], + name: "NewPeriod", + }, + { type: "event", anonymous: false, inputs: [], name: "Paused" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Ruling", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_degreeOfCoherency", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_pnkAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "TokenAndETHShift", + }, + { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [ + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + ], + name: "appeal", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealPeriod", + outputs: [ + { name: "start", internalType: "uint256", type: "uint256" }, + { name: "end", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "address", type: "address" }], + name: "arbitrableWhitelist", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + ], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_accepted", internalType: "bool", type: "bool" }, + ], + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_arbitrable", internalType: "address", type: "address" }, + { name: "_allowed", internalType: "bool", type: "bool" }, + ], + name: "changeArbitrableWhitelist", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + ], + name: "changeCourtParameters", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_rateInEth", internalType: "uint64", type: "uint64" }, + { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, + ], + name: "changeCurrencyRates", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_guardian", internalType: "address", type: "address" }], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], + name: "changeJurorNft", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, + ], + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_sortitionModule", + internalType: "contract ISortitionModule", + type: "address", + }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_toToken", internalType: "contract IERC20", type: "address" }, + { name: "_amountInEth", internalType: "uint256", type: "uint256" }, + ], + name: "convertEthToTokenAmount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "courts", + outputs: [ + { name: "parent", internalType: "uint96", type: "uint96" }, + { name: "hiddenVotes", internalType: "bool", type: "bool" }, + { name: "minStake", internalType: "uint256", type: "uint256" }, + { name: "alpha", internalType: "uint256", type: "uint256" }, + { name: "feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { name: "disabled", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_parent", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + }, + ], + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + ], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, + ], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + name: "currencyRates", + outputs: [ + { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, + { name: "rateInEth", internalType: "uint64", type: "uint64" }, + { name: "rateDecimals", internalType: "uint8", type: "uint8" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "currentRuling", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputeKits", + outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "courtID", internalType: "uint96", type: "uint96" }, + { + name: "arbitrated", + internalType: "contract IArbitrableV2", + type: "address", + }, + { + name: "period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + }, + { name: "ruled", internalType: "bool", type: "bool" }, + { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "draw", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_enable", internalType: "bool", type: "bool" }, + ], + name: "enableDisputeKits", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "execute", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "getDisputeKitsLength", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfRounds", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfVotes", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + ], + name: "getRoundInfo", + outputs: [ + { + name: "", + internalType: "struct KlerosCoreBase.Round", + type: "tuple", + components: [ + { name: "disputeKitID", internalType: "uint256", type: "uint256" }, + { + name: "pnkAtStakePerJuror", + internalType: "uint256", + type: "uint256", + }, + { + name: "totalFeesForJurors", + internalType: "uint256", + type: "uint256", + }, + { name: "nbVotes", internalType: "uint256", type: "uint256" }, + { name: "repartitions", internalType: "uint256", type: "uint256" }, + { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, + { name: "drawnJurors", internalType: "address[]", type: "address[]" }, + { + name: "sumFeeRewardPaid", + internalType: "uint256", + type: "uint256", + }, + { + name: "sumPnkRewardPaid", + internalType: "uint256", + type: "uint256", + }, + { + name: "feeToken", + internalType: "contract IERC20", + type: "address", + }, + { name: "drawIterations", internalType: "uint256", type: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], + name: "getTimesPerPeriod", + outputs: [ + { + name: "timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "guardian", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_guardian", internalType: "address", type: "address" }, + { name: "_pinakion", internalType: "contract IERC20", type: "address" }, + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, + { + name: "_disputeKit", + internalType: "contract IDisputeKit", + type: "address", + }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { + name: "_courtParameters", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_sortitionModuleAddress", + internalType: "contract ISortitionModule", + type: "address", + }, + { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "isDisputeKitJumping", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, + ], + name: "isSupported", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "jurorNft", + outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "jurorProsecutionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "paused", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "pinakion", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + ], + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + ], + name: "setStakeBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "sortitionModule", + outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + */ +export const klerosCoreNeoAddress = { + 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + */ +export const klerosCoreNeoConfig = { + address: klerosCoreNeoAddress, + abi: klerosCoreNeoAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreNeo_Implementation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) + */ +export const klerosCoreNeoImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", 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: [{ name: "implementation", internalType: "address", 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: [{ name: "slot", internalType: "bytes32", 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: "event", + anonymous: false, + inputs: [ + { + name: "_token", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, + ], + name: "AcceptedFeeToken", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "AppealDecision", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "AppealPossible", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_parent", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_alpha", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + ], + name: "CourtCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromCourtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_toCourtID", + internalType: "uint96", + type: "uint96", + indexed: false, + }, + ], + name: "CourtJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_alpha", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, + ], + name: "CourtModified", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "DisputeCreation", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + indexed: true, + }, + ], + name: "DisputeKitCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "_enable", internalType: "bool", type: "bool", indexed: true }, + ], + name: "DisputeKitEnabled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_toDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "DisputeKitJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_address", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_voteID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Draw", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_pnkAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "LeftoverRewardSent", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { + name: "_rateInEth", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + { + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + ], + name: "NewCurrencyRate", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + indexed: false, + }, + ], + name: "NewPeriod", + }, + { type: "event", anonymous: false, inputs: [], name: "Paused" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Ruling", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_degreeOfCoherency", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_pnkAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "TokenAndETHShift", + }, + { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [ + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + ], + name: "appeal", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealPeriod", + outputs: [ + { name: "start", internalType: "uint256", type: "uint256" }, + { name: "end", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "address", type: "address" }], + name: "arbitrableWhitelist", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + ], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_accepted", internalType: "bool", type: "bool" }, + ], + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_arbitrable", internalType: "address", type: "address" }, + { name: "_allowed", internalType: "bool", type: "bool" }, + ], + name: "changeArbitrableWhitelist", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + ], + name: "changeCourtParameters", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_rateInEth", internalType: "uint64", type: "uint64" }, + { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, + ], + name: "changeCurrencyRates", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_guardian", internalType: "address", type: "address" }], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], + name: "changeJurorNft", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, + ], + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_sortitionModule", + internalType: "contract ISortitionModule", + type: "address", + }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_toToken", internalType: "contract IERC20", type: "address" }, + { name: "_amountInEth", internalType: "uint256", type: "uint256" }, + ], + name: "convertEthToTokenAmount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "courts", + outputs: [ + { name: "parent", internalType: "uint96", type: "uint96" }, + { name: "hiddenVotes", internalType: "bool", type: "bool" }, + { name: "minStake", internalType: "uint256", type: "uint256" }, + { name: "alpha", internalType: "uint256", type: "uint256" }, + { name: "feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { name: "disabled", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_parent", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + }, + ], + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + ], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, + ], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + name: "currencyRates", + outputs: [ + { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, + { name: "rateInEth", internalType: "uint64", type: "uint64" }, + { name: "rateDecimals", internalType: "uint8", type: "uint8" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "currentRuling", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputeKits", + outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "courtID", internalType: "uint96", type: "uint96" }, { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "arbitrated", + internalType: "contract IArbitrableV2", type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, }, { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", }, + { name: "ruled", internalType: "bool", type: "bool" }, + { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], - name: "Ruling", + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToHomeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "draw", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "feeToken", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_enable", internalType: "bool", type: "bool" }, + ], + name: "enableDisputeKits", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "execute", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "foreignChainID", + name: "getDisputeKitsLength", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "foreignGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfRounds", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "receiverGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfVotes", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + ], + name: "getRoundInfo", + outputs: [ { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", + name: "", + internalType: "struct KlerosCoreBase.Round", type: "tuple", components: [ + { name: "disputeKitID", internalType: "uint256", type: "uint256" }, { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", + name: "pnkAtStakePerJuror", + internalType: "uint256", + type: "uint256", }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, { - name: "foreignArbitrable", - internalType: "address", - type: "address", + name: "totalFeesForJurors", + internalType: "uint256", + type: "uint256", }, + { name: "nbVotes", internalType: "uint256", type: "uint256" }, + { name: "repartitions", internalType: "uint256", type: "uint256" }, + { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, + { name: "drawnJurors", internalType: "address[]", type: "address[]" }, { - name: "foreignDisputeID", + name: "sumFeeRewardPaid", internalType: "uint256", type: "uint256", }, { - name: "externalDisputeID", + name: "sumPnkRewardPaid", internalType: "uint256", type: "uint256", }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, + { + name: "feeToken", + internalType: "contract IERC20", + type: "address", + }, + { name: "drawIterations", internalType: "uint256", type: "uint256" }, ], }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, ], - name: "relayCreateDispute", + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], + name: "getTimesPerPeriod", + outputs: [ + { + name: "timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "guardian", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_guardian", internalType: "address", type: "address" }, + { name: "_pinakion", internalType: "contract IERC20", type: "address" }, + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, + { + name: "_disputeKit", + internalType: "contract IDisputeKit", + type: "address", + }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { + name: "_courtParameters", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_sortitionModuleAddress", + internalType: "contract ISortitionModule", + type: "address", + }, + { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "isDisputeKitJumping", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, + ], + name: "isSupported", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "jurorNft", + outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "jurorProsecutionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "pause", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "paused", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "pinakion", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, { type: "function", inputs: [ - { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], - }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, ], - name: "relayCreateDispute", + name: "setStake", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, ], - name: "rule", + name: "setStakeBySortitionModule", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "veaInbox", - outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], + name: "sortitionModule", + outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, ] as const; +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) + */ +export const klerosCoreNeoImplementationAddress = { + 42161: "0x17c39AB53A7072b167A74a85D47b30385c98ae89", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) + */ +export const klerosCoreNeoImplementationConfig = { + address: klerosCoreNeoImplementationAddress, + abi: klerosCoreNeoImplementationAbi, +} as const; + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreNeo +// KlerosCoreNeo_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ -export const klerosCoreNeoAbi = [ +export const klerosCoreNeoProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + */ +export const klerosCoreNeoProxyAddress = { + 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + */ +export const klerosCoreNeoProxyConfig = { + address: klerosCoreNeoProxyAddress, + abi: klerosCoreNeoProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreRulerNeo +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) + */ +export const klerosCoreRulerNeoAbi = [ { type: "fallback", stateMutability: "payable" }, { type: "receive", stateMutability: "payable" }, { type: "error", 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: "GovernorOrInstructorOnly" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", 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: "NoRulerSet" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "RulerOnly" }, { 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: "RulingModeNotSet" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -2595,13 +6647,7 @@ export const klerosCoreNeoAbi = [ inputs: [{ name: "slot", internalType: "bytes32", 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: "event", anonymous: false, @@ -2659,99 +6705,51 @@ export const klerosCoreNeoAbi = [ anonymous: false, inputs: [ { - name: "_courtID", - internalType: "uint256", - type: "uint256", + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", indexed: true, }, { - name: "_parent", - internalType: "uint96", - type: "uint96", + name: "mode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", indexed: true, }, { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", + name: "_disputeID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { - name: "_jurorsForCourtJump", + name: "_ruling", internalType: "uint256", type: "uint256", indexed: false, }, + { name: "tied", internalType: "bool", type: "bool", indexed: false }, { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", + name: "overridden", + internalType: "bool", + type: "bool", indexed: false, }, ], - name: "CourtCreated", + name: "AutoRuled", }, { type: "event", anonymous: false, inputs: [ { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", + name: "_courtID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", + name: "_parent", internalType: "uint96", type: "uint96", indexed: true, @@ -2793,7 +6791,7 @@ export const klerosCoreNeoAbi = [ indexed: false, }, ], - name: "CourtModified", + name: "CourtCreated", }, { type: "event", @@ -2804,34 +6802,27 @@ export const klerosCoreNeoAbi = [ internalType: "uint256", type: "uint256", indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ + }, { - name: "_disputeKitID", + name: "_roundID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", + name: "_fromCourtID", + internalType: "uint96", + type: "uint96", indexed: true, }, + { + name: "_toCourtID", + internalType: "uint96", + type: "uint96", + indexed: false, + }, ], - name: "DisputeKitCreated", + name: "CourtJump", }, { type: "event", @@ -2844,56 +6835,48 @@ export const klerosCoreNeoAbi = [ indexed: true, }, { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "_disputeID", + name: "_minStake", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_roundID", + name: "_alpha", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_fromDisputeKitID", + name: "_feeForJuror", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_toDisputeKitID", + name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256", indexed: false, }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, ], - name: "DisputeKitJump", + name: "CourtModified", }, { type: "event", anonymous: false, inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, { name: "_disputeID", internalType: "uint256", @@ -2901,19 +6884,13 @@ export const klerosCoreNeoAbi = [ indexed: true, }, { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, }, ], - name: "Draw", + name: "DisputeCreation", }, { type: "event", @@ -3002,14 +6979,67 @@ export const klerosCoreNeoAbi = [ }, { name: "_period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", type: "uint8", indexed: false, }, ], name: "NewPeriod", }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_oldRuler", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_newRuler", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "RulerChanged", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_settings", + internalType: "struct KlerosCoreRuler.RulerSettings", + type: "tuple", + components: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], + indexed: false, + }, + ], + name: "RulerSettingsChanged", + }, { type: "event", anonymous: false, @@ -3084,7 +7114,6 @@ export const klerosCoreNeoAbi = [ ], name: "TokenAndETHShift", }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -3098,25 +7127,13 @@ export const klerosCoreNeoAbi = [ ], name: "Upgraded", }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "bytes", type: "bytes" }, + { name: "_jump", internalType: "bool", type: "bool" }, ], name: "appeal", outputs: [], @@ -3124,28 +7141,14 @@ export const klerosCoreNeoAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_jump", internalType: "bool", type: "bool" }, + ], name: "appealCost", outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "arbitrableWhitelist", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -3173,16 +7176,6 @@ export const klerosCoreNeoAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "_arbitrable", internalType: "address", type: "address" }, - { name: "_allowed", internalType: "bool", type: "bool" }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ @@ -3222,15 +7215,22 @@ export const klerosCoreNeoAbi = [ }, { type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], - name: "changeJurorNft", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + { name: "_newRuler", internalType: "address", type: "address" }, + ], + name: "changeRuler", outputs: [], stateMutability: "nonpayable", }, @@ -3238,19 +7238,28 @@ export const klerosCoreNeoAbi = [ type: "function", inputs: [ { - name: "_jurorProsecutionModule", - internalType: "address", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, + { name: "_presetRuling", internalType: "uint256", type: "uint256" }, + { name: "_presetTied", internalType: "bool", type: "bool" }, + { name: "_presetOverridden", internalType: "bool", type: "bool" }, ], - name: "changeJurorProsecutionModule", + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "changeRulingModeToAutomaticRandom", outputs: [], stateMutability: "nonpayable", }, @@ -3258,12 +7267,12 @@ export const klerosCoreNeoAbi = [ type: "function", inputs: [ { - name: "_sortitionModule", - internalType: "contract ISortitionModule", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", }, @@ -3306,12 +7315,6 @@ export const klerosCoreNeoAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -3361,13 +7364,6 @@ export const klerosCoreNeoAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -3381,41 +7377,18 @@ export const klerosCoreNeoAbi = [ }, { name: "period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", type: "uint8", }, { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], stateMutability: "view", }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, ], name: "execute", outputs: [], @@ -3434,7 +7407,12 @@ export const klerosCoreNeoAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], name: "executeRuling", outputs: [], stateMutability: "nonpayable", @@ -3442,7 +7420,7 @@ export const klerosCoreNeoAbi = [ { type: "function", inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, @@ -3467,43 +7445,27 @@ export const klerosCoreNeoAbi = [ { name: "_round", internalType: "uint256", type: "uint256" }, ], name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, + outputs: [ + { + name: "", + internalType: "struct KlerosCoreRuler.Round", + type: "tuple", + components: [ { name: "totalFeesForJurors", internalType: "uint256", type: "uint256", }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, { name: "sumFeeRewardPaid", internalType: "uint256", type: "uint256", }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, { name: "feeToken", internalType: "contract IERC20", type: "address", }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, ], }, ], @@ -3529,104 +7491,21 @@ export const klerosCoreNeoAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, { name: "_courtParameters", internalType: "uint256[4]", type: "uint256[4]", }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorNft", - outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -3644,38 +7523,48 @@ export const klerosCoreNeoAbi = [ { type: "function", inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + name: "rulers", + outputs: [{ name: "ruler", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + name: "rulingResults", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "settings", + outputs: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", }, { type: "function", @@ -3698,68 +7587,47 @@ export const klerosCoreNeoAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) */ -export const klerosCoreNeoAddress = { - 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", +export const klerosCoreRulerNeoAddress = { + 42161: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) */ -export const klerosCoreNeoConfig = { - address: klerosCoreNeoAddress, - abi: klerosCoreNeoAbi, +export const klerosCoreRulerNeoConfig = { + address: klerosCoreRulerNeoAddress, + abi: klerosCoreRulerNeoAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreNeo_Implementation +// KlerosCoreRulerNeo_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) */ -export const klerosCoreNeoImplementationAbi = [ +export const klerosCoreRulerNeoImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", 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: "GovernorOrInstructorOnly" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", 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: "NoRulerSet" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "RulerOnly" }, { 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: "RulingModeNotSet" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -3768,13 +7636,7 @@ export const klerosCoreNeoImplementationAbi = [ inputs: [{ name: "slot", internalType: "bytes32", 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: "event", anonymous: false, @@ -3832,99 +7694,51 @@ export const klerosCoreNeoImplementationAbi = [ anonymous: false, inputs: [ { - name: "_courtID", - internalType: "uint256", - type: "uint256", + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", indexed: true, }, { - name: "_parent", - internalType: "uint96", - type: "uint96", + name: "mode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", indexed: true, }, { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", + name: "_disputeID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { - name: "_jurorsForCourtJump", + name: "_ruling", internalType: "uint256", type: "uint256", indexed: false, }, + { name: "tied", internalType: "bool", type: "bool", indexed: false }, { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", + name: "overridden", + internalType: "bool", + type: "bool", indexed: false, }, ], - name: "CourtCreated", + name: "AutoRuled", }, { type: "event", anonymous: false, inputs: [ { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", + name: "_courtID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", + name: "_parent", internalType: "uint96", type: "uint96", indexed: true, @@ -3966,7 +7780,7 @@ export const klerosCoreNeoImplementationAbi = [ indexed: false, }, ], - name: "CourtModified", + name: "CourtCreated", }, { type: "event", @@ -3979,32 +7793,25 @@ export const klerosCoreNeoImplementationAbi = [ indexed: true, }, { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", + name: "_roundID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", + name: "_fromCourtID", + internalType: "uint96", + type: "uint96", indexed: true, }, + { + name: "_toCourtID", + internalType: "uint96", + type: "uint96", + indexed: false, + }, ], - name: "DisputeKitCreated", + name: "CourtJump", }, { type: "event", @@ -4017,56 +7824,48 @@ export const klerosCoreNeoImplementationAbi = [ indexed: true, }, { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "_disputeID", + name: "_minStake", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_roundID", + name: "_alpha", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_fromDisputeKitID", + name: "_feeForJuror", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_toDisputeKitID", + name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256", indexed: false, }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, ], - name: "DisputeKitJump", + name: "CourtModified", }, { type: "event", anonymous: false, inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, { name: "_disputeID", internalType: "uint256", @@ -4074,19 +7873,13 @@ export const klerosCoreNeoImplementationAbi = [ indexed: true, }, { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, }, ], - name: "Draw", + name: "DisputeCreation", }, { type: "event", @@ -4175,14 +7968,67 @@ export const klerosCoreNeoImplementationAbi = [ }, { name: "_period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", type: "uint8", indexed: false, }, ], name: "NewPeriod", }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_oldRuler", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_newRuler", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "RulerChanged", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_settings", + internalType: "struct KlerosCoreRuler.RulerSettings", + type: "tuple", + components: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], + indexed: false, + }, + ], + name: "RulerSettingsChanged", + }, { type: "event", anonymous: false, @@ -4257,7 +8103,6 @@ export const klerosCoreNeoImplementationAbi = [ ], name: "TokenAndETHShift", }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -4271,25 +8116,13 @@ export const klerosCoreNeoImplementationAbi = [ ], name: "Upgraded", }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "bytes", type: "bytes" }, + { name: "_jump", internalType: "bool", type: "bool" }, ], name: "appeal", outputs: [], @@ -4297,28 +8130,14 @@ export const klerosCoreNeoImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_jump", internalType: "bool", type: "bool" }, + ], name: "appealCost", outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "arbitrableWhitelist", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -4346,16 +8165,6 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "_arbitrable", internalType: "address", type: "address" }, - { name: "_allowed", internalType: "bool", type: "bool" }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ @@ -4395,15 +8204,22 @@ export const klerosCoreNeoImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], - name: "changeJurorNft", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + { name: "_newRuler", internalType: "address", type: "address" }, + ], + name: "changeRuler", outputs: [], stateMutability: "nonpayable", }, @@ -4411,19 +8227,28 @@ export const klerosCoreNeoImplementationAbi = [ type: "function", inputs: [ { - name: "_jurorProsecutionModule", - internalType: "address", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, + { name: "_presetRuling", internalType: "uint256", type: "uint256" }, + { name: "_presetTied", internalType: "bool", type: "bool" }, + { name: "_presetOverridden", internalType: "bool", type: "bool" }, ], - name: "changeJurorProsecutionModule", + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "changeRulingModeToAutomaticRandom", outputs: [], stateMutability: "nonpayable", }, @@ -4431,12 +8256,12 @@ export const klerosCoreNeoImplementationAbi = [ type: "function", inputs: [ { - name: "_sortitionModule", - internalType: "contract ISortitionModule", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", }, @@ -4479,12 +8304,6 @@ export const klerosCoreNeoImplementationAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -4534,13 +8353,6 @@ export const klerosCoreNeoImplementationAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -4550,45 +8362,22 @@ export const klerosCoreNeoImplementationAbi = [ { name: "arbitrated", internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, + type: "address", + }, + { + name: "period", + internalType: "enum KlerosCoreRuler.Period", + type: "uint8", + }, + { name: "ruled", internalType: "bool", type: "bool" }, ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, ], name: "execute", outputs: [], @@ -4607,7 +8396,12 @@ export const klerosCoreNeoImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], name: "executeRuling", outputs: [], stateMutability: "nonpayable", @@ -4615,7 +8409,7 @@ export const klerosCoreNeoImplementationAbi = [ { type: "function", inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, @@ -4643,40 +8437,24 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCoreBase.Round", + internalType: "struct KlerosCoreRuler.Round", type: "tuple", components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, { name: "totalFeesForJurors", internalType: "uint256", type: "uint256", }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, { name: "sumFeeRewardPaid", internalType: "uint256", type: "uint256", }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, { name: "feeToken", internalType: "contract IERC20", type: "address", }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, ], }, ], @@ -4702,104 +8480,21 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, { name: "_courtParameters", internalType: "uint256[4]", type: "uint256[4]", }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorNft", - outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -4817,38 +8512,48 @@ export const klerosCoreNeoImplementationAbi = [ { type: "function", inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + name: "rulers", + outputs: [{ name: "ruler", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + name: "rulingResults", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "settings", + outputs: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", }, { type: "function", @@ -4863,28 +8568,28 @@ export const klerosCoreNeoImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) */ -export const klerosCoreNeoImplementationAddress = { - 42161: "0x17c39AB53A7072b167A74a85D47b30385c98ae89", +export const klerosCoreRulerNeoImplementationAddress = { + 42161: "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) */ -export const klerosCoreNeoImplementationConfig = { - address: klerosCoreNeoImplementationAddress, - abi: klerosCoreNeoImplementationAbi, +export const klerosCoreRulerNeoImplementationConfig = { + address: klerosCoreRulerNeoImplementationAddress, + abi: klerosCoreRulerNeoImplementationAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreNeo_Proxy +// KlerosCoreRulerNeo_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) */ -export const klerosCoreNeoProxyAbi = [ +export const klerosCoreRulerNeoProxyAbi = [ { type: "constructor", inputs: [ @@ -4898,18 +8603,107 @@ export const klerosCoreNeoProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) */ -export const klerosCoreNeoProxyAddress = { - 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", +export const klerosCoreRulerNeoProxyAddress = { + 42161: "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13) */ -export const klerosCoreNeoProxyConfig = { - address: klerosCoreNeoProxyAddress, - abi: klerosCoreNeoProxyAbi, +export const klerosCoreRulerNeoProxyConfig = { + address: klerosCoreRulerNeoProxyAddress, + abi: klerosCoreRulerNeoProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreSnapshotProxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) + */ +export const klerosCoreSnapshotProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_core", internalType: "contract IKlerosCore", type: "address" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "core", + outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) + */ +export const klerosCoreSnapshotProxyAddress = { + 42161: "0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95", +} as const; + +/** + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xEF719a5B3352F607e6C4E17b7e0cDAd8322fEC95) + */ +export const klerosCoreSnapshotProxyConfig = { + address: klerosCoreSnapshotProxyAddress, + abi: klerosCoreSnapshotProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/contracts/deployments/testnet.viem.ts b/contracts/deployments/testnet.viem.ts index 684eb26ba..346c43eb9 100644 --- a/contracts/deployments/testnet.viem.ts +++ b/contracts/deployments/testnet.viem.ts @@ -304,6 +304,1424 @@ export const blockHashRngConfig = { abi: blockHashRngAbi, } as const; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ChainlinkRNG +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) + */ +export const chainlinkRngAbi = [ + { + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_sortitionModule", internalType: "address", type: "address" }, + { name: "_vrfCoordinator", internalType: "address", type: "address" }, + { name: "_keyHash", internalType: "bytes32", type: "bytes32" }, + { name: "_subscriptionId", internalType: "uint256", type: "uint256" }, + { name: "_requestConfirmations", internalType: "uint16", type: "uint16" }, + { name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }, + ], + stateMutability: "nonpayable", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "address", type: "address" }, + { name: "want", internalType: "address", type: "address" }, + ], + name: "OnlyCoordinatorCanFulfill", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "address", type: "address" }, + { name: "owner", internalType: "address", type: "address" }, + { name: "coordinator", internalType: "address", type: "address" }, + ], + name: "OnlyOwnerOrCoordinator", + }, + { type: "error", inputs: [], name: "ZeroAddress" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "vrfCoordinator", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "CoordinatorSet", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferred", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "randomWord", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "RequestFulfilled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + ], + name: "RequestSent", + }, + { + type: "function", + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "callbackGasLimit", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_callbackGasLimit", internalType: "uint32", type: "uint32" }], + name: "changeCallbackGasLimit", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_keyHash", internalType: "bytes32", type: "bytes32" }], + name: "changeKeyHash", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_requestConfirmations", internalType: "uint16", type: "uint16" }], + name: "changeRequestConfirmations", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_sortitionModule", internalType: "address", type: "address" }], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_subscriptionId", internalType: "uint256", type: "uint256" }], + name: "changeSubscriptionId", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], + name: "changeVrfCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "keyHash", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "lastRequestId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], + name: "randomNumbers", + outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "requestId", internalType: "uint256", type: "uint256" }, + { name: "randomWords", internalType: "uint256[]", type: "uint256[]" }, + ], + name: "rawFulfillRandomWords", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "receiveRandomness", + outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "requestConfirmations", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "requestRandomness", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "s_vrfCoordinator", + outputs: [ + { + name: "", + internalType: "contract IVRFCoordinatorV2Plus", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_vrfCoordinator", internalType: "address", type: "address" }], + name: "setCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "sortitionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "subscriptionId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) + */ +export const chainlinkRngAddress = { + 421614: "0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAd5cCc93429e3A977c273cEeD106Ef16A69EAf79) + */ +export const chainlinkRngConfig = { + address: chainlinkRngAddress, + abi: chainlinkRngAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ChainlinkVRFCoordinator +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) + */ +export const chainlinkVrfCoordinatorAbi = [ + { + type: "constructor", + inputs: [{ name: "blockhashStore", internalType: "address", type: "address" }], + stateMutability: "nonpayable", + }, + { + type: "error", + inputs: [ + { name: "internalBalance", internalType: "uint256", type: "uint256" }, + { name: "externalBalance", internalType: "uint256", type: "uint256" }, + ], + name: "BalanceInvariantViolated", + }, + { + type: "error", + inputs: [{ name: "blockNum", internalType: "uint256", type: "uint256" }], + name: "BlockhashNotInStore", + }, + { + type: "error", + inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], + name: "CoordinatorAlreadyRegistered", + }, + { + type: "error", + inputs: [{ name: "coordinatorAddress", internalType: "address", type: "address" }], + name: "CoordinatorNotRegistered", + }, + { type: "error", inputs: [], name: "FailedToSendNative" }, + { type: "error", inputs: [], name: "FailedToTransferLink" }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint32", type: "uint32" }, + { name: "want", internalType: "uint32", type: "uint32" }, + ], + name: "GasLimitTooBig", + }, + { + type: "error", + inputs: [ + { name: "gasPrice", internalType: "uint256", type: "uint256" }, + { name: "maxGas", internalType: "uint256", type: "uint256" }, + ], + name: "GasPriceExceeded", + }, + { type: "error", inputs: [], name: "IncorrectCommitment" }, + { type: "error", inputs: [], name: "IndexOutOfRange" }, + { type: "error", inputs: [], name: "InsufficientBalance" }, + { type: "error", inputs: [], name: "InvalidCalldata" }, + { + type: "error", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "InvalidConsumer", + }, + { type: "error", inputs: [], name: "InvalidExtraArgsTag" }, + { + type: "error", + inputs: [{ name: "linkWei", internalType: "int256", type: "int256" }], + name: "InvalidLinkWeiPrice", + }, + { + type: "error", + inputs: [ + { name: "premiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "max", internalType: "uint8", type: "uint8" }, + ], + name: "InvalidPremiumPercentage", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint16", type: "uint16" }, + { name: "min", internalType: "uint16", type: "uint16" }, + { name: "max", internalType: "uint16", type: "uint16" }, + ], + name: "InvalidRequestConfirmations", + }, + { type: "error", inputs: [], name: "InvalidSubscription" }, + { type: "error", inputs: [], name: "LinkAlreadySet" }, + { + type: "error", + inputs: [ + { + name: "flatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "flatFeeNativePPM", internalType: "uint32", type: "uint32" }, + ], + name: "LinkDiscountTooHigh", + }, + { type: "error", inputs: [], name: "LinkNotSet" }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint256", type: "uint256" }, + { name: "max", internalType: "uint32", type: "uint32" }, + ], + name: "MsgDataTooBig", + }, + { + type: "error", + inputs: [{ name: "proposedOwner", internalType: "address", type: "address" }], + name: "MustBeRequestedOwner", + }, + { + type: "error", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "MustBeSubOwner", + }, + { type: "error", inputs: [], name: "NoCorrespondingRequest" }, + { + type: "error", + inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], + name: "NoSuchProvingKey", + }, + { + type: "error", + inputs: [ + { name: "have", internalType: "uint32", type: "uint32" }, + { name: "want", internalType: "uint32", type: "uint32" }, + ], + name: "NumWordsTooBig", + }, + { type: "error", inputs: [], name: "OnlyCallableFromLink" }, + { type: "error", inputs: [], name: "PaymentTooLarge" }, + { type: "error", inputs: [], name: "PendingRequestExists" }, + { + type: "error", + inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }], + name: "ProvingKeyAlreadyRegistered", + }, + { type: "error", inputs: [], name: "Reentrant" }, + { type: "error", inputs: [], name: "TooManyConsumers" }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + indexed: false, + }, + { + name: "maxGasLimit", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "stalenessSeconds", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "nativePremiumPercentage", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + { + name: "linkPremiumPercentage", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + ], + name: "ConfigSet", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "coordinatorAddress", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "CoordinatorDeregistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "coordinatorAddress", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "CoordinatorRegistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + indexed: false, + }, + ], + name: "FallbackWeiPerUnitLinkUsed", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "FundsRecovered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newCoordinator", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "MigrationCompleted", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "NativeFundsRecovered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + ], + name: "OwnershipTransferred", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + { + name: "maxGas", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "ProvingKeyDeregistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + { + name: "maxGas", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "ProvingKeyRegistered", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "outputSeed", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "payment", + internalType: "uint96", + type: "uint96", + indexed: false, + }, + { + name: "nativePayment", + internalType: "bool", + type: "bool", + indexed: false, + }, + { name: "success", internalType: "bool", type: "bool", indexed: false }, + { + name: "onlyPremium", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "RandomWordsFulfilled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "keyHash", + internalType: "bytes32", + type: "bytes32", + indexed: true, + }, + { + name: "requestId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "preSeed", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + indexed: false, + }, + { + name: "callbackGasLimit", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "numWords", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "extraArgs", + internalType: "bytes", + type: "bytes", + indexed: false, + }, + { + name: "sender", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "RandomWordsRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + { + name: "amountLink", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "amountNative", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionCanceled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "consumer", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionConsumerAdded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "consumer", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionConsumerRemoved", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "owner", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "SubscriptionCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "oldBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "newBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionFunded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "oldNativeBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "newNativeBalance", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "SubscriptionFundedWithNative", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "from", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + ], + name: "SubscriptionOwnerTransferRequested", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "subId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "from", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "to", internalType: "address", type: "address", indexed: false }, + ], + name: "SubscriptionOwnerTransferred", + }, + { + type: "function", + inputs: [], + name: "BLOCKHASH_STORE", + outputs: [ + { + name: "", + internalType: "contract BlockhashStoreInterface", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "LINK", + outputs: [ + { + name: "", + internalType: "contract LinkTokenInterface", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "LINK_NATIVE_FEED", + outputs: [ + { + name: "", + internalType: "contract AggregatorV3Interface", + type: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "MAX_CONSUMERS", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "MAX_NUM_WORDS", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "MAX_REQUEST_CONFIRMATIONS", + outputs: [{ name: "", internalType: "uint16", type: "uint16" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "acceptSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "addConsumer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "to", internalType: "address", type: "address" }, + ], + name: "cancelSubscription", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "createSubscription", + outputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "deregisterMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "publicProvingKey", + internalType: "uint256[2]", + type: "uint256[2]", + }, + ], + name: "deregisterProvingKey", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "proof", + internalType: "struct VRF.Proof", + type: "tuple", + components: [ + { name: "pk", internalType: "uint256[2]", type: "uint256[2]" }, + { name: "gamma", internalType: "uint256[2]", type: "uint256[2]" }, + { name: "c", internalType: "uint256", type: "uint256" }, + { name: "s", internalType: "uint256", type: "uint256" }, + { name: "seed", internalType: "uint256", type: "uint256" }, + { name: "uWitness", internalType: "address", type: "address" }, + { + name: "cGammaWitness", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { + name: "sHashWitness", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { name: "zInv", internalType: "uint256", type: "uint256" }, + ], + }, + { + name: "rc", + internalType: "struct VRFTypes.RequestCommitmentV2Plus", + type: "tuple", + components: [ + { name: "blockNum", internalType: "uint64", type: "uint64" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, + { name: "numWords", internalType: "uint32", type: "uint32" }, + { name: "sender", internalType: "address", type: "address" }, + { name: "extraArgs", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "onlyPremium", internalType: "bool", type: "bool" }, + ], + name: "fulfillRandomWords", + outputs: [{ name: "payment", internalType: "uint96", type: "uint96" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "fundSubscriptionWithNative", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "startIndex", internalType: "uint256", type: "uint256" }, + { name: "maxCount", internalType: "uint256", type: "uint256" }, + ], + name: "getActiveSubscriptionIds", + outputs: [{ name: "ids", internalType: "uint256[]", type: "uint256[]" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "getSubscription", + outputs: [ + { name: "balance", internalType: "uint96", type: "uint96" }, + { name: "nativeBalance", internalType: "uint96", type: "uint96" }, + { name: "reqCount", internalType: "uint64", type: "uint64" }, + { name: "subOwner", internalType: "address", type: "address" }, + { name: "consumers", internalType: "address[]", type: "address[]" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "publicKey", internalType: "uint256[2]", type: "uint256[2]" }], + name: "hashOfKey", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "newCoordinator", internalType: "address", type: "address" }, + ], + name: "migrate", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "onTokenTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "ownerCancelSubscription", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "subId", internalType: "uint256", type: "uint256" }], + name: "pendingRequestExists", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address payable", type: "address" }], + name: "recoverNativeFunds", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "registerMigratableCoordinator", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "publicProvingKey", + internalType: "uint256[2]", + type: "uint256[2]", + }, + { name: "maxGas", internalType: "uint64", type: "uint64" }, + ], + name: "registerProvingKey", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "consumer", internalType: "address", type: "address" }, + ], + name: "removeConsumer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "req", + internalType: "struct VRFV2PlusClient.RandomWordsRequest", + type: "tuple", + components: [ + { name: "keyHash", internalType: "bytes32", type: "bytes32" }, + { name: "subId", internalType: "uint256", type: "uint256" }, + { + name: "requestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "callbackGasLimit", internalType: "uint32", type: "uint32" }, + { name: "numWords", internalType: "uint32", type: "uint32" }, + { name: "extraArgs", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "requestRandomWords", + outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "subId", internalType: "uint256", type: "uint256" }, + { name: "newOwner", internalType: "address", type: "address" }, + ], + name: "requestSubscriptionOwnerTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "s_config", + outputs: [ + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, + { name: "reentrancyLock", internalType: "bool", type: "bool" }, + { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_currentSubNonce", + outputs: [{ name: "", internalType: "uint64", type: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_fallbackWeiPerUnitLink", + outputs: [{ name: "", internalType: "int256", type: "int256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "s_provingKeyHashes", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "s_provingKeys", + outputs: [ + { name: "exists", internalType: "bool", type: "bool" }, + { name: "maxGas", internalType: "uint64", type: "uint64" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "s_requestCommitments", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_totalBalance", + outputs: [{ name: "", internalType: "uint96", type: "uint96" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "s_totalNativeBalance", + outputs: [{ name: "", internalType: "uint96", type: "uint96" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "minimumRequestConfirmations", + internalType: "uint16", + type: "uint16", + }, + { name: "maxGasLimit", internalType: "uint32", type: "uint32" }, + { name: "stalenessSeconds", internalType: "uint32", type: "uint32" }, + { + name: "gasAfterPaymentCalculation", + internalType: "uint32", + type: "uint32", + }, + { + name: "fallbackWeiPerUnitLink", + internalType: "int256", + type: "int256", + }, + { + name: "fulfillmentFlatFeeNativePPM", + internalType: "uint32", + type: "uint32", + }, + { + name: "fulfillmentFlatFeeLinkDiscountPPM", + internalType: "uint32", + type: "uint32", + }, + { name: "nativePremiumPercentage", internalType: "uint8", type: "uint8" }, + { name: "linkPremiumPercentage", internalType: "uint8", type: "uint8" }, + ], + name: "setConfig", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "link", internalType: "address", type: "address" }, + { name: "linkNativeFeed", internalType: "address", type: "address" }, + ], + name: "setLINKAndLINKNativeFeed", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "recipient", internalType: "address", type: "address" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "recipient", internalType: "address payable", type: "address" }], + name: "withdrawNative", + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) + */ +export const chainlinkVrfCoordinatorAddress = { + 421614: "0x5CE8D5A2BC84beb22a398CCA51996F7930313D61", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CE8D5A2BC84beb22a398CCA51996F7930313D61) + */ +export const chainlinkVrfCoordinatorConfig = { + address: chainlinkVrfCoordinatorAddress, + abi: chainlinkVrfCoordinatorAbi, +} as const; + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DAI ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1045,6 +2463,13 @@ export const disputeKitClassicAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -1059,8 +2484,15 @@ export const disputeKitClassicAbi = [ { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { @@ -1073,6 +2505,13 @@ export const disputeKitClassicAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -1119,7 +2558,7 @@ export const disputeKitClassicConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCd4B2aD853027DbF7629003242CD609BDdaA89E1) */ export const disputeKitClassicImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -1595,6 +3034,13 @@ export const disputeKitClassicImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -1613,6 +3059,13 @@ export const disputeKitClassicImplementationAbi = [ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -1623,6 +3076,13 @@ export const disputeKitClassicImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -1642,14 +3102,14 @@ export const disputeKitClassicImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCd4B2aD853027DbF7629003242CD609BDdaA89E1) */ export const disputeKitClassicImplementationAddress = { - 421614: "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1", + 421614: "0xCd4B2aD853027DbF7629003242CD609BDdaA89E1", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCd4B2aD853027DbF7629003242CD609BDdaA89E1) */ export const disputeKitClassicImplementationConfig = { address: disputeKitClassicImplementationAddress, @@ -2033,6 +3493,13 @@ export const disputeTemplateRegistryAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -2068,6 +3535,13 @@ export const disputeTemplateRegistryAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -2101,7 +3575,7 @@ export const disputeTemplateRegistryConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) */ export const disputeTemplateRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -2197,6 +3671,13 @@ export const disputeTemplateRegistryImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -2232,17 +3713,24 @@ export const disputeTemplateRegistryImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) */ export const disputeTemplateRegistryImplementationAddress = { - 421614: "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34", + 421614: "0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf97791DA66e0A8Ff8Ee4908872CfCAcc641829Ec) */ export const disputeTemplateRegistryImplementationConfig = { address: disputeTemplateRegistryImplementationAddress, @@ -2373,6 +3861,13 @@ export const evidenceModuleAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -2400,6 +3895,13 @@ export const evidenceModuleAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -2430,7 +3932,7 @@ export const evidenceModuleConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) */ export const evidenceModuleImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -2513,6 +4015,13 @@ export const evidenceModuleImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -2540,17 +4049,24 @@ export const evidenceModuleImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) */ export const evidenceModuleImplementationAddress = { - 421614: "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8", + 421614: "0xC4e64e6E949936a18269937FC1e18cb11E3db14D", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC4e64e6E949936a18269937FC1e18cb11E3db14D) */ export const evidenceModuleImplementationConfig = { address: evidenceModuleImplementationAddress, @@ -3223,10 +4739,8 @@ export const klerosCoreAbi = [ { type: "error", inputs: [], name: "AppealFeesNotEnough" }, { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, { type: "error", inputs: [], name: "CannotDisableClassicDK" }, { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, @@ -3254,6 +4768,7 @@ export const klerosCoreAbi = [ { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -3327,8 +4842,8 @@ export const klerosCoreAbi = [ inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -4217,6 +5732,13 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -4322,6 +5844,13 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -4347,12 +5876,101 @@ export const klerosCoreConfig = { abi: klerosCoreAbi, } as const; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreSnapshotProxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) + */ +export const klerosCoreSnapshotProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_core", internalType: "contract IKlerosCore", type: "address" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "core", + outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) + */ +export const klerosCoreSnapshotProxyAddress = { + 421614: "0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd74e61A4dB9C6c3F2C97b62a319aE194f616858C) + */ +export const klerosCoreSnapshotProxyConfig = { + address: klerosCoreSnapshotProxyAddress, + abi: klerosCoreSnapshotProxyAbi, +} as const; + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // KlerosCore_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7) */ export const klerosCoreImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -4360,10 +5978,8 @@ export const klerosCoreImplementationAbi = [ { type: "error", inputs: [], name: "AppealFeesNotEnough" }, { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, { type: "error", inputs: [], name: "CannotDisableClassicDK" }, { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, @@ -4391,6 +6007,7 @@ export const klerosCoreImplementationAbi = [ { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -4464,8 +6081,8 @@ export const klerosCoreImplementationAbi = [ inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -5354,6 +6971,13 @@ export const klerosCoreImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -5459,17 +7083,24 @@ export const klerosCoreImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7) */ export const klerosCoreImplementationAddress = { - 421614: "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55", + 421614: "0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3Dc15eb9673b7228c69aBcF056d4c4044325fdf7) */ export const klerosCoreImplementationConfig = { address: klerosCoreImplementationAddress, @@ -6025,6 +7656,13 @@ export const policyRegistryAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -6060,6 +7698,13 @@ export const policyRegistryAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -6090,7 +7735,7 @@ export const policyRegistryConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB958113f96950C7806d584eFBed964288d46a0B8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) */ export const policyRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -6180,6 +7825,13 @@ export const policyRegistryImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -6215,17 +7867,24 @@ export const policyRegistryImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB958113f96950C7806d584eFBed964288d46a0B8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) */ export const policyRegistryImplementationAddress = { - 421614: "0xB958113f96950C7806d584eFBed964288d46a0B8", + 421614: "0x7CC8E0787e381aE159C4d3e137f20f9203313D41", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB958113f96950C7806d584eFBed964288d46a0B8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7CC8E0787e381aE159C4d3e137f20f9203313D41) */ export const policyRegistryImplementationConfig = { address: policyRegistryImplementationAddress, @@ -6776,7 +8435,7 @@ export const sortitionModuleAbi = [ indexed: false, }, ], - name: "StakeDelayedAlreadyTransferred", + name: "StakeDelayedAlreadyTransferredDeposited", }, { type: "event", @@ -6870,6 +8529,12 @@ export const sortitionModuleAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -6886,6 +8551,13 @@ export const sortitionModuleAbi = [ ], name: "Upgraded", }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], @@ -7031,6 +8703,13 @@ export const sortitionModuleAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_juror", internalType: "address", type: "address" }], @@ -7232,6 +8911,13 @@ export const sortitionModuleAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -7262,7 +8948,7 @@ export const sortitionModuleConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b) */ export const sortitionModuleImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -7329,7 +9015,7 @@ export const sortitionModuleImplementationAbi = [ indexed: false, }, ], - name: "StakeDelayedAlreadyTransferred", + name: "StakeDelayedAlreadyTransferredDeposited", }, { type: "event", @@ -7423,6 +9109,12 @@ export const sortitionModuleImplementationAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -7439,6 +9131,13 @@ export const sortitionModuleImplementationAbi = [ ], name: "Upgraded", }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], @@ -7584,6 +9283,13 @@ export const sortitionModuleImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_juror", internalType: "address", type: "address" }], @@ -7785,17 +9491,24 @@ export const sortitionModuleImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b) */ export const sortitionModuleImplementationAddress = { - 421614: "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9", + 421614: "0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xAe750D6Fa39b1044d4081CB0bfecF886d176Be5b) */ export const sortitionModuleImplementationConfig = { address: sortitionModuleImplementationAddress, diff --git a/contracts/package.json b/contracts/package.json index 724e9fe37..acdb71dc6 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/kleros-v2-contracts", - "version": "0.7.0", + "version": "0.8.0", "description": "Smart contracts for Kleros version 2", "main": "typechain-types/index.ts", "repository": "git@github.com:kleros/kleros-v2.git", From 93b029bc533c8d654f8065c14817e30ed29cae7c Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Sat, 5 Apr 2025 15:55:17 +0200 Subject: [PATCH 06/17] fix: check if no courts exist first, tweak --- web/src/components/CasesDisplay/Search.tsx | 4 ++-- web/src/pages/Courts/CourtDetails/StakePanel/index.tsx | 2 +- web/src/pages/Courts/CourtDetails/TopSearch.tsx | 2 +- web/src/pages/Resolver/Parameters/Court.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/components/CasesDisplay/Search.tsx b/web/src/components/CasesDisplay/Search.tsx index 6a4e9f69d..d24f5c822 100644 --- a/web/src/components/CasesDisplay/Search.tsx +++ b/web/src/components/CasesDisplay/Search.tsx @@ -74,8 +74,8 @@ const Search: React.FC = () => { const { data: courtTreeData } = useCourtTree(); const items = useMemo(() => { - if (!isUndefined(courtTreeData)) { - const courts = [rootCourtToItems(courtTreeData.court!, "id")]; + if (!isUndefined(courtTreeData?.court)) { + const courts = [rootCourtToItems(courtTreeData.court, "id")]; courts.push({ label: "All Courts", value: "all" }); return courts; } diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx index 4d676c362..c62a89570 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx @@ -44,7 +44,7 @@ const InputArea = styled(TagArea)` flex-direction: column; `; -const StakePanel: React.FC<{ courtName: string }> = ({ courtName = "General Court" }) => { +const StakePanel: React.FC<{ courtName: string }> = ({ courtName = "Unknown Court" }) => { const [amount, setAmount] = useState(""); const [isActive, setIsActive] = useState(true); const [action, setAction] = useState(ActionType.stake); diff --git a/web/src/pages/Courts/CourtDetails/TopSearch.tsx b/web/src/pages/Courts/CourtDetails/TopSearch.tsx index 8c4657496..5ac47aa43 100644 --- a/web/src/pages/Courts/CourtDetails/TopSearch.tsx +++ b/web/src/pages/Courts/CourtDetails/TopSearch.tsx @@ -109,7 +109,7 @@ const TopSearch: React.FC = () => { const { data } = useCourtTree(); const navigate = useNavigate(); const { id: currentCourtId } = useParams(); - const items = useMemo(() => !isUndefined(data) && [rootCourtToItems(data.court)], [data]); + const items = useMemo(() => !isUndefined(data?.court) && [rootCourtToItems(data.court)], [data]); const isUniversity = isKlerosUniversity(); const [search, setSearch] = useState(""); diff --git a/web/src/pages/Resolver/Parameters/Court.tsx b/web/src/pages/Resolver/Parameters/Court.tsx index d941cfc33..c9b3b568d 100644 --- a/web/src/pages/Resolver/Parameters/Court.tsx +++ b/web/src/pages/Resolver/Parameters/Court.tsx @@ -52,7 +52,7 @@ const AlertMessageContainer = styled.div` const Court: React.FC = () => { const { disputeData, setDisputeData } = useNewDisputeContext(); const { data } = useCourtTree(); - const items = useMemo(() => !isUndefined(data) && [rootCourtToItems(data.court)], [data]); + const items = useMemo(() => !isUndefined(data?.court) && [rootCourtToItems(data.court)], [data]); const handleWrite = (courtId: string) => { setDisputeData({ ...disputeData, courtId: courtId }); From e0c823feba3982dcb456986f981856639b894646 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Wed, 9 Apr 2025 22:45:00 +0530 Subject: [PATCH 07/17] fix(subgraph): subgraph-event-fix --- subgraph/core/abis/KlerosCore.json | 2048 +++++++++++++++++++++++ subgraph/core/abis/SortitionModule.json | 1097 ++++++++++++ subgraph/core/subgraph.yaml | 48 +- subgraph/temp-events-addition.txt | 120 ++ 4 files changed, 3295 insertions(+), 18 deletions(-) create mode 100644 subgraph/core/abis/KlerosCore.json create mode 100644 subgraph/core/abis/SortitionModule.json create mode 100644 subgraph/temp-events-addition.txt diff --git a/subgraph/core/abis/KlerosCore.json b/subgraph/core/abis/KlerosCore.json new file mode 100644 index 000000000..85e40ac2f --- /dev/null +++ b/subgraph/core/abis/KlerosCore.json @@ -0,0 +1,2048 @@ +{ + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AppealFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "AppealPeriodNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "ArbitrationFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "CannotDisableClassicDK", + "type": "error" + }, + { + "inputs": [], + "name": "CommitPeriodNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeKitNotSupportedByCourt", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeKitOnly", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotAppealable", + "type": "error" + }, + { + "inputs": [], + "name": "DisputePeriodIsFinal", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeStillDrawing", + "type": "error" + }, + { + "inputs": [], + "name": "EvidenceNotPassedAndNotAppeal", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "GuardianOrGovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDisputKitParent", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidForkingCourtAsParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "MinStakeLowerThanParentCourt", + "type": "error" + }, + { + "inputs": [], + "name": "MustSupportDisputeKitClassic", + "type": "error" + }, + { + "inputs": [], + "name": "NotEvidencePeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotExecutionPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "RulingAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SortitionModuleOnly", + "type": "error" + }, + { + "inputs": [], + "name": "StakingInTooManyCourts", + "type": "error" + }, + { + "inputs": [], + "name": "StakingLessThanCourtMinStake", + "type": "error" + }, + { + "inputs": [], + "name": "StakingNotPossibeInThisCourt", + "type": "error" + }, + { + "inputs": [], + "name": "StakingTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotAccepted", + "type": "error" + }, + { + "inputs": [], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "inputs": [], + "name": "UnstakingTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UnsuccessfulCall", + "type": "error" + }, + { + "inputs": [], + "name": "UnsupportedDisputeKit", + "type": "error" + }, + { + "inputs": [], + "name": "VotePeriodNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "WhenNotPausedOnly", + "type": "error" + }, + { + "inputs": [], + "name": "WhenPausedOnly", + "type": "error" + }, + { + "inputs": [], + "name": "WrongDisputeKitIndex", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "AcceptedFeeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealDecision", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealPossible", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_fromCourtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "_toCourtID", + "type": "uint96" + } + ], + "name": "CourtJump", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "CourtModified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "DisputeCreation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeKitID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IDisputeKit", + "name": "_disputeKitAddress", + "type": "address" + } + ], + "name": "DisputeKitCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeKitID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "DisputeKitEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_fromDisputeKitID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toDisputeKitID", + "type": "uint256" + } + ], + "name": "DisputeKitJump", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_voteID", + "type": "uint256" + } + ], + "name": "Draw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_pnkAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "LeftoverRewardSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "NewCurrencyRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum KlerosCoreBase.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_degreeOfCoherency", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_pnkAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_feeAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract IDisputeKit", + "name": "_disputeKitAddress", + "type": "address" + } + ], + "name": "addNewDisputeKit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appealPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "changeAcceptedFeeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeCourtParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "changeCurrencyRates", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guardian", + "type": "address" + } + ], + "name": "changeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jurorProsecutionModule", + "type": "address" + } + ], + "name": "changeJurorProsecutionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISortitionModule", + "name": "_sortitionModule", + "type": "address" + } + ], + "name": "changeSortitionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amountInEth", + "type": "uint256" + } + ], + "name": "convertEthToTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "courts", + "outputs": [ + { + "internalType": "uint96", + "name": "parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "disabled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "internalType": "bytes", + "name": "_sortitionExtraData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "createCourt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "currencyRates", + "outputs": [ + { + "internalType": "bool", + "name": "feePaymentAccepted", + "type": "bool" + }, + { + "internalType": "uint64", + "name": "rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "rateDecimals", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "currentRuling", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputeKits", + "outputs": [ + { + "internalType": "contract IDisputeKit", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrableV2", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "enum KlerosCoreBase.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lastPeriodChange", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "draw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256[]", + "name": "_disputeKitIDs", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "enableDisputeKits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeGovernorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getDisputeKitsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getRoundInfo", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "disputeKitID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkAtStakePerJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nbVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "repartitions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkPenalties", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "drawnJurors", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "sumFeeRewardPaid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumPnkRewardPaid", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "drawIterations", + "type": "uint256" + } + ], + "internalType": "struct KlerosCoreBase.Round", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "address", + "name": "_jurorProsecutionModule", + "type": "address" + }, + { + "internalType": "contract IDisputeKit", + "name": "_disputeKit", + "type": "address" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256[4]", + "name": "_courtParameters", + "type": "uint256[4]" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "internalType": "bytes", + "name": "_sortitionExtraData", + "type": "bytes" + }, + { + "internalType": "contract ISortitionModule", + "name": "_sortitionModuleAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "isDisputeKitJumping", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_disputeKitID", + "type": "uint256" + } + ], + "name": "isSupported", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "jurorProsecutionModule", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "passPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + } + ], + "name": "setStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_alreadyTransferred", + "type": "bool" + } + ], + "name": "setStakeBySortitionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sortitionModule", + "outputs": [ + { + "internalType": "contract ISortitionModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 1, + "gasUsed": "5235914", + "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000004000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040008000000000000000000000000020000000000000010000800402000000000000008000000080000000000000000000000000800000000000000000000000080000000000000000000000000000000004008000000000000000000000000000000000100000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb", + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + }, + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 1, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + }, + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000001" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + }, + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 3, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + } + ], + "blockNumber": 3638878, + "cumulativeGasUsed": "5235914", + "status": 1, + "byzantium": true + }, + "args": [ + "0x91a373BBdE0532F86410682F362e2Cf685e95085", + "0x994b27af000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000019cb28bab40c3585955798f5eeabd71eec14471c00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "execute": { + "methodName": "initialize3", + "args": [] + }, + "implementation": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/subgraph/core/abis/SortitionModule.json b/subgraph/core/abis/SortitionModule.json new file mode 100644 index 000000000..8f59c5480 --- /dev/null +++ b/subgraph/core/abis/SortitionModule.json @@ -0,0 +1,1097 @@ +{ + "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "enum ISortitionModule.Phase", + "name": "_phase", + "type": "uint8" + } + ], + "name": "NewPhase", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferredDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferredWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedNotTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_unlock", + "type": "bool" + } + ], + "name": "StakeLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDrawingTime", + "type": "uint256" + } + ], + "name": "changeMaxDrawingTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minStakingTime", + "type": "uint256" + } + ], + "name": "changeMinStakingTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RNG", + "name": "_rng", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rngLookahead", + "type": "uint256" + } + ], + "name": "changeRandomNumberGenerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "core", + "outputs": [ + { + "internalType": "contract KlerosCore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "createDisputeHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createTree", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delayedStakeReadIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delayedStakeWriteIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "delayedStakes", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "stake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "alreadyTransferred", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disputesWithoutJurors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } + ], + "name": "draw", + "outputs": [ + { + "internalType": "address", + "name": "drawnAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "executeDelayedStakes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getJurorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "totalStaked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalLocked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "stakedInCourt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nbCourts", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + } + ], + "name": "getJurorCourtIDs", + "outputs": [ + { + "internalType": "uint96[]", + "name": "", + "type": "uint96[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract KlerosCore", + "name": "_core", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minStakingTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxDrawingTime", + "type": "uint256" + }, + { + "internalType": "contract RNG", + "name": "_rng", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rngLookahead", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + } + ], + "name": "isJurorStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "jurors", + "outputs": [ + { + "internalType": "uint256", + "name": "stakedPnk", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockedPnk", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastPhaseChange", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "jurorAccount", + "type": "address" + }, + { + "internalType": "uint96", + "name": "courtId", + "type": "uint96" + } + ], + "name": "latestDelayedStakeIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + } + ], + "name": "lockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxDrawingTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStakingTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_randomNumber", + "type": "uint256" + } + ], + "name": "notifyRandomNumber", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "passPhase", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + } + ], + "name": "penalizeStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "phase", + "outputs": [ + { + "internalType": "enum ISortitionModule.Phase", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "postDrawHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "randomNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "randomNumberRequestBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rng", + "outputs": [ + { + "internalType": "contract RNG", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rngLookahead", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "setJurorInactive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_alreadyTransferred", + "type": "bool" + } + ], + "name": "setStake", + "outputs": [ + { + "internalType": "uint256", + "name": "pnkDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkWithdrawal", + "type": "uint256" + }, + { + "internalType": "enum StakingResult", + "name": "stakingResult", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_ID", + "type": "bytes32" + } + ], + "name": "stakeOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "stakeOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + } + ], + "name": "unlockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "transactionIndex": 2, + "gasUsed": "4675242", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000800000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae", + "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 3638850, + "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 0, + "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae" + } + ], + "blockNumber": 3638850, + "cumulativeGasUsed": "5561170", + "status": 1, + "byzantium": true + }, + "args": [ + "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a54e7a16d7460e38a8f324ef46782fb520d58ce800000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf48360000000000000000000000000000000000000000000000000000000000000014" + ], + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "execute": { + "methodName": "initialize3", + "args": [] + }, + "implementation": "0x45129beB9B84BFb07bA885085C1D60437494a93f", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index ed0a0ba18..078093f9c 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -8,9 +8,9 @@ dataSources: name: KlerosCore network: arbitrum-sepolia source: - address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479" + address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8" abi: KlerosCore - startBlock: 95250346 + startBlock: 3638878 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -28,11 +28,12 @@ dataSources: - Counter abis: - name: SortitionModule - file: ../../contracts/deployments/arbitrumSepolia/SortitionModule.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json - name: DisputeKitClassic - file: ../../contracts/deployments/arbitrumSepolia/DisputeKitClassic.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore - file: ../../contracts/deployments/arbitrumSepolia/KlerosCore.json + # FIX: temporarily point to the abi with event addition. + file: ./abis/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -45,6 +46,9 @@ dataSources: handler: handleNewPeriod - event: CourtCreated(indexed uint96,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[]) handler: handleCourtCreated + # FIX: This is support for old signature + - event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[]) + handler: handleCourtCreated - event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4]) handler: handleCourtModified - event: DisputeKitCreated(indexed uint256,indexed address) @@ -64,9 +68,9 @@ dataSources: name: PolicyRegistry network: arbitrum-sepolia source: - address: "0x2668c46A14af8997417138B064ca1bEB70769585" + address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da" abi: PolicyRegistry - startBlock: 95247698 + startBlock: 3084568 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -75,7 +79,7 @@ dataSources: - Court abis: - name: PolicyRegistry - file: ../../contracts/deployments/arbitrumSepolia/PolicyRegistry.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json eventHandlers: - event: PolicyUpdate(indexed uint256,string,string) handler: handlePolicyUpdate @@ -84,9 +88,9 @@ dataSources: name: DisputeKitClassic network: arbitrum-sepolia source: - address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94" + address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b" abi: DisputeKitClassic - startBlock: 95247789 + startBlock: 3638835 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -98,9 +102,10 @@ dataSources: - ClassicContribution abis: - name: DisputeKitClassic - file: ../../contracts/deployments/arbitrumSepolia/DisputeKitClassic.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore - file: ../../contracts/deployments/arbitrumSepolia/KlerosCore.json + # FIX: temporarily point to abi with event addition + file: ./abis/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation @@ -119,9 +124,9 @@ dataSources: name: EvidenceModule network: arbitrum-sepolia source: - address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397" + address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09" abi: EvidenceModule - startBlock: 95247733 + startBlock: 3638735 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -131,7 +136,7 @@ dataSources: - ClassicEvidence abis: - name: EvidenceModule - file: ../../contracts/deployments/arbitrumSepolia/EvidenceModule.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json eventHandlers: - event: Evidence(indexed uint256,indexed address,string) handler: handleEvidenceEvent @@ -140,9 +145,9 @@ dataSources: name: SortitionModule network: arbitrum-sepolia source: - address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD" + address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C" abi: SortitionModule - startBlock: 95250316 + startBlock: 3638850 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -151,10 +156,14 @@ dataSources: - JurorTokensPerCourt abis: - name: SortitionModule - file: ../../contracts/deployments/arbitrumSepolia/SortitionModule.json + # FIX: temporarily point to abi with event addition + file: ./abis/SortitionModule.json eventHandlers: - event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256) handler: handleStakeDelayedAlreadyTransferredDeposited + # FIX: temporarily indexing old event name + - event: StakeDelayedAlreadyTransferred(indexed address,uint256,uint256) + handler: handleStakeDelayedAlreadyTransferredDeposited - event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256) handler: handleStakeDelayedAlreadyTransferredWithdrawn - event: StakeDelayedNotTransferred(indexed address,uint256,uint256) @@ -163,4 +172,7 @@ dataSources: handler: handleStakeLocked - event: StakeSet(indexed address,uint256,uint256,uint256) handler: handleStakeSet + # FIX: old stake set signature + - event: StakeSet(indexed address,uint256,uint256) + handler: handleStakeSet file: ./src/SortitionModule.ts diff --git a/subgraph/temp-events-addition.txt b/subgraph/temp-events-addition.txt new file mode 100644 index 000000000..abf0ca62f --- /dev/null +++ b/subgraph/temp-events-addition.txt @@ -0,0 +1,120 @@ +// KlerosCore.json : for _courtID type change in CourtCreated + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + + + +// Goes in SortitionModule.json : new param in StakeSet + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + + + +// Goes in SortitionModule.json: rename of StakeDelayedAlreadyTransferred => StakeDelayedAlreadyTransferredDeposited + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferred", + "type": "event" + }, \ No newline at end of file From 95d67f375d320939c3c62b8ae597dd20f7d4f4c9 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Thu, 10 Apr 2025 03:05:19 +0200 Subject: [PATCH 08/17] chore: file renamings --- subgraph/core/subgraph.yaml | 6 +++--- subgraph/core/{abis => temp-abis}/KlerosCore.json | 0 subgraph/core/{abis => temp-abis}/SortitionModule.json | 0 ...p-events-addition.txt => temp-older-events-addition.txt} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename subgraph/core/{abis => temp-abis}/KlerosCore.json (100%) rename subgraph/core/{abis => temp-abis}/SortitionModule.json (100%) rename subgraph/{temp-events-addition.txt => temp-older-events-addition.txt} (100%) diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index 078093f9c..d08e8eb7a 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -33,7 +33,7 @@ dataSources: file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore # FIX: temporarily point to the abi with event addition. - file: ./abis/KlerosCore.json + file: ./temp-abis/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -105,7 +105,7 @@ dataSources: file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore # FIX: temporarily point to abi with event addition - file: ./abis/KlerosCore.json + file: ./temp-abis/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation @@ -157,7 +157,7 @@ dataSources: abis: - name: SortitionModule # FIX: temporarily point to abi with event addition - file: ./abis/SortitionModule.json + file: ./temp-abis/SortitionModule.json eventHandlers: - event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256) handler: handleStakeDelayedAlreadyTransferredDeposited diff --git a/subgraph/core/abis/KlerosCore.json b/subgraph/core/temp-abis/KlerosCore.json similarity index 100% rename from subgraph/core/abis/KlerosCore.json rename to subgraph/core/temp-abis/KlerosCore.json diff --git a/subgraph/core/abis/SortitionModule.json b/subgraph/core/temp-abis/SortitionModule.json similarity index 100% rename from subgraph/core/abis/SortitionModule.json rename to subgraph/core/temp-abis/SortitionModule.json diff --git a/subgraph/temp-events-addition.txt b/subgraph/temp-older-events-addition.txt similarity index 100% rename from subgraph/temp-events-addition.txt rename to subgraph/temp-older-events-addition.txt From bd4758a9f17e306dac0e7d74ac62e8f251e8ddb5 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Thu, 10 Apr 2025 03:27:54 +0200 Subject: [PATCH 09/17] fix: support for old stake delayed already transferred event --- subgraph/core/src/SortitionModule.ts | 6 ++++++ subgraph/core/subgraph.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/subgraph/core/src/SortitionModule.ts b/subgraph/core/src/SortitionModule.ts index cd57881a5..4d4f8c895 100644 --- a/subgraph/core/src/SortitionModule.ts +++ b/subgraph/core/src/SortitionModule.ts @@ -1,5 +1,6 @@ import { SortitionModule, + StakeDelayedAlreadyTransferred, StakeDelayedAlreadyTransferredDeposited, StakeDelayedAlreadyTransferredWithdrawn, StakeDelayedNotTransferred, @@ -11,6 +12,11 @@ import { updateJurorDelayedStake, updateJurorStake } from "./entities/JurorToken import { ensureUser } from "./entities/User"; import { ZERO } from "./utils"; +// FIX: temporarily adding this handler for old event name "StakeDelayedAlreadyTransferred", delete when deploying new fresh-address contract. +export function handleStakeDelayedAlreadyTransferred(event: StakeDelayedAlreadyTransferred): void { + updateJurorDelayedStake(event.params._address.toHexString(), event.params._courtID.toString(), event.params._amount); +} + export function handleStakeDelayedAlreadyTransferredDeposited(event: StakeDelayedAlreadyTransferredDeposited): void { updateJurorDelayedStake(event.params._address.toHexString(), event.params._courtID.toString(), event.params._amount); } diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index d08e8eb7a..2c58f9fbd 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -163,7 +163,7 @@ dataSources: handler: handleStakeDelayedAlreadyTransferredDeposited # FIX: temporarily indexing old event name - event: StakeDelayedAlreadyTransferred(indexed address,uint256,uint256) - handler: handleStakeDelayedAlreadyTransferredDeposited + handler: handleStakeDelayedAlreadyTransferred - event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256) handler: handleStakeDelayedAlreadyTransferredWithdrawn - event: StakeDelayedNotTransferred(indexed address,uint256,uint256) From a433d2f2cfe06f60dcfab8e9b90f314a45c3ab0c Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 15:26:51 +0100 Subject: [PATCH 10/17] feat: script to compare the storage layout against an already deployed contract --- contracts/hardhat.config.ts | 7 +++ contracts/scripts/compareStorageLayout.ts | 74 +++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 contracts/scripts/compareStorageLayout.ts diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 06ea08325..c3ff7247d 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -17,6 +17,7 @@ require("./scripts/populatePolicyRegistry"); require("./scripts/populateCourts"); require("./scripts/changeGovernor"); require("./scripts/getDisputeTemplate"); +require("./scripts/compareStorageLayout"); dotenv.config(); @@ -24,10 +25,16 @@ const config: HardhatUserConfig = { solidity: { version: "0.8.24", settings: { + // viaIR: true, optimizer: { enabled: true, runs: 100, }, + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, }, }, paths: { diff --git a/contracts/scripts/compareStorageLayout.ts b/contracts/scripts/compareStorageLayout.ts new file mode 100644 index 000000000..dc8afe37f --- /dev/null +++ b/contracts/scripts/compareStorageLayout.ts @@ -0,0 +1,74 @@ +import { task } from "hardhat/config"; +import { readFileSync } from "fs"; +import path from "path"; +import { print } from "gluegun"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { getStorageUpgradeReport, ValidationOptions } from "@openzeppelin/upgrades-core"; + +const { bold } = print.colors; + +task("compare-storage", "Compare storage layout between deployed and modified contracts") + .addParam("contract", "The name of the contract to compare against") + .addOptionalParam("deployedArtifact", "The name of the deployed contract artifact in deployments") + .setAction(async ({ deployedArtifact, contract }, hre: HardhatRuntimeEnvironment) => { + try { + // Get storage layout of the deployed contract implementation + const artifactName = deployedArtifact || `${contract}_Implementation`; + const deployedArtifactPath = path.resolve(`deployments/${hre.network.name}/${artifactName}.json`); + const deployedJson = JSON.parse(readFileSync(deployedArtifactPath, "utf8")); + const originalLayout = deployedJson.storageLayout; + + // Get storage layout of the modified contract + const buildInfos = await hre.artifacts.getBuildInfoPaths(); + const buildInfo = buildInfos.find((buildInfo) => { + const content = JSON.parse(readFileSync(buildInfo, "utf8")); + return Object.keys(content.output.contracts).some((file) => + Object.keys(content.output.contracts[file]).includes(contract) + ); + }); + + if (!buildInfo) { + throw new Error(`Could not find build info for contract ${contract}`); + } + + const buildInfoContent = JSON.parse(readFileSync(buildInfo, "utf8")); + const contractFile = Object.keys(buildInfoContent.output.contracts).find((file) => + Object.keys(buildInfoContent.output.contracts[file]).includes(contract) + ); + + if (!contractFile) { + throw new Error(`Could not find contract ${contract} in build info`); + } + + const contractData = buildInfoContent.output.contracts[contractFile][contract]; + const updatedLayout = contractData.storageLayout; + + // Compare layouts using OpenZeppelin's report + const validationOptions: Required = { + unsafeAllowCustomTypes: true, + unsafeAllowRenames: false, + unsafeAllow: [], + unsafeSkipStorageCheck: false, + unsafeAllowLinkedLibraries: false, + kind: "uups", + }; + + const report = getStorageUpgradeReport(originalLayout, updatedLayout, validationOptions); + + print.info(`\n${bold("Storage Layout Analysis:")}`); + print.info("=".repeat(100)); + + if (report.ok) { + print.success("✓ No storage layout incompatibilities found"); + return; + } + + const explanation = report.explain(); + print.error(`✗ ${explanation}`); + print.info("-".repeat(100)); + } catch (error) { + print.error("\nError comparing storage layouts:"); + print.error(error); + process.exit(1); + } + }); From 530d2d6b5c36a3c5bb98f2c2bd61c602725f09fa Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 15:47:15 +0100 Subject: [PATCH 11/17] feat: always run the upgrade validation script before upgrading --- contracts/deploy/upgrade-all.ts | 5 ++- .../deploy/upgrade-dispute-kit-v0.8.0.ts | 18 +++++++++- .../deploy/upgrade-kleros-core-v0.8.0.ts | 18 +++++++++- .../deploy/upgrade-sortition-module-v0.8.0.ts | 18 +++++++++- contracts/package.json | 3 +- contracts/scripts/compareStorageLayout.ts | 3 -- yarn.lock | 35 +++++++++++++++++-- 7 files changed, 89 insertions(+), 11 deletions(-) diff --git a/contracts/deploy/upgrade-all.ts b/contracts/deploy/upgrade-all.ts index 78962aa69..f47464920 100644 --- a/contracts/deploy/upgrade-all.ts +++ b/contracts/deploy/upgrade-all.ts @@ -20,6 +20,9 @@ const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment) const upgrade = async (contractName: string, initializer: string, args: any[]) => { try { + print.highlight(`🔍 Validating upgrade of ${bold(contractName)}`); + await hre.run("compare-storage", { contract: contractName }); + print.newline(); print.highlight(`💣 Upgrading ${bold(contractName)}`); const { confirm } = await prompt.ask({ type: "confirm", @@ -27,7 +30,7 @@ const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment) message: "Are you sure you want to proceed?", }); if (!confirm) { - console.log("Operation cancelled by user."); + print.info("Operation cancelled by user."); return; } print.info(`Upgrading ${contractName}...`); diff --git a/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts b/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts index e71c1aab7..fcfc1035e 100644 --- a/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts +++ b/contracts/deploy/upgrade-dispute-kit-v0.8.0.ts @@ -3,6 +3,9 @@ import { DeployFunction } from "hardhat-deploy/types"; import { deployUpgradable } from "./utils/deployUpgradable"; import { HomeChains, isSkipped } from "./utils"; import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; +import { print, prompt } from "gluegun"; + +const { bold } = print.colors; const deployUpgradeDisputeKit: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; @@ -14,7 +17,20 @@ const deployUpgradeDisputeKit: DeployFunction = async (hre: HardhatRuntimeEnviro try { const { disputeKitClassic: contractName } = await getContractNamesFromNetwork(hre); - console.log(`upgrading ${contractName}...`); + print.highlight(`🔍 Validating upgrade of ${bold(contractName)}`); + await hre.run("compare-storage", { contract: contractName }); + print.newline(); + print.highlight(`💣 Upgrading ${bold(contractName)}`); + const { confirm } = await prompt.ask({ + type: "confirm", + name: "confirm", + message: "Are you sure you want to proceed?", + }); + if (!confirm) { + print.info("Operation cancelled by user."); + return; + } + print.info(`Upgrading ${contractName}...`); await deployUpgradable(deployments, contractName, { contract: contractName, initializer: "initialize2", diff --git a/contracts/deploy/upgrade-kleros-core-v0.8.0.ts b/contracts/deploy/upgrade-kleros-core-v0.8.0.ts index dd14806ce..ae9e2d050 100644 --- a/contracts/deploy/upgrade-kleros-core-v0.8.0.ts +++ b/contracts/deploy/upgrade-kleros-core-v0.8.0.ts @@ -3,6 +3,9 @@ import { DeployFunction } from "hardhat-deploy/types"; import { deployUpgradable } from "./utils/deployUpgradable"; import { HomeChains, isSkipped } from "./utils"; import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; +import { print, prompt } from "gluegun"; + +const { bold } = print.colors; const deployUpgradeKlerosCore: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; @@ -14,7 +17,20 @@ const deployUpgradeKlerosCore: DeployFunction = async (hre: HardhatRuntimeEnviro try { const { core: contractName } = await getContractNamesFromNetwork(hre); - console.log(`upgrading ${contractName}...`); + print.highlight(`🔍 Validating upgrade of ${bold(contractName)}`); + await hre.run("compare-storage", { contract: contractName }); + print.newline(); + print.highlight(`💣 Upgrading ${bold(contractName)}`); + const { confirm } = await prompt.ask({ + type: "confirm", + name: "confirm", + message: "Are you sure you want to proceed?", + }); + if (!confirm) { + print.info("Operation cancelled by user."); + return; + } + print.info(`Upgrading ${contractName}...`); await deployUpgradable(deployments, contractName, { contract: contractName, initializer: "initialize3", diff --git a/contracts/deploy/upgrade-sortition-module-v0.8.0.ts b/contracts/deploy/upgrade-sortition-module-v0.8.0.ts index d6e98ba7f..192b7b292 100644 --- a/contracts/deploy/upgrade-sortition-module-v0.8.0.ts +++ b/contracts/deploy/upgrade-sortition-module-v0.8.0.ts @@ -3,6 +3,9 @@ import { DeployFunction } from "hardhat-deploy/types"; import { deployUpgradable } from "./utils/deployUpgradable"; import { HomeChains, isSkipped } from "./utils"; import { getContractNamesFromNetwork } from "../scripts/utils/contracts"; +import { print, prompt } from "gluegun"; + +const { bold } = print.colors; const deployUpgradeSortitionModule: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; @@ -14,7 +17,20 @@ const deployUpgradeSortitionModule: DeployFunction = async (hre: HardhatRuntimeE try { const { sortition: contractName } = await getContractNamesFromNetwork(hre); - console.log(`upgrading ${contractName}...`); + print.highlight(`🔍 Validating upgrade of ${bold(contractName)}`); + await hre.run("compare-storage", { contract: contractName }); + print.newline(); + print.highlight(`💣 Upgrading ${bold(contractName)}`); + const { confirm } = await prompt.ask({ + type: "confirm", + name: "confirm", + message: "Are you sure you want to proceed?", + }); + if (!confirm) { + print.info("Operation cancelled by user."); + return; + } + print.info(`Upgrading ${contractName}...`); await deployUpgradable(deployments, contractName, { contract: contractName, initializer: "initialize3", diff --git a/contracts/package.json b/contracts/package.json index d6b591a7d..481fa0d3c 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -28,6 +28,7 @@ "deploy": "hardhat deploy", "deploy-local": "hardhat deploy --tags Arbitration,HomeArbitrable --network localhost", "validate-upgrades": "openzeppelin-upgrades-core validate --exclude 'src/proxy/mock/**/*.sol' --exclude 'src/test/**/*.sol' artifacts/build-info", + "validate-upgrades-against-deployed": "hardhat compare-storage", "simulate": "hardhat simulate:all", "simulate-local": "hardhat simulate:all --network localhost", "viem:generate-devnet": "NODE_NO_WARNINGS=1 wagmi generate -c wagmi.config.devnet.ts", @@ -77,7 +78,7 @@ "@nomicfoundation/hardhat-chai-matchers": "^2.0.8", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomiclabs/hardhat-solhint": "^4.0.1", - "@openzeppelin/upgrades-core": "^1.41.0", + "@openzeppelin/upgrades-core": "^1.42.2", "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.20", diff --git a/contracts/scripts/compareStorageLayout.ts b/contracts/scripts/compareStorageLayout.ts index dc8afe37f..c774c000a 100644 --- a/contracts/scripts/compareStorageLayout.ts +++ b/contracts/scripts/compareStorageLayout.ts @@ -55,9 +55,6 @@ task("compare-storage", "Compare storage layout between deployed and modified co const report = getStorageUpgradeReport(originalLayout, updatedLayout, validationOptions); - print.info(`\n${bold("Storage Layout Analysis:")}`); - print.info("=".repeat(100)); - if (report.ok) { print.success("✓ No storage layout incompatibilities found"); return; diff --git a/yarn.lock b/yarn.lock index cc14450a1..c3d3163dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5559,7 +5559,7 @@ __metadata: "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomiclabs/hardhat-solhint": "npm:^4.0.1" "@openzeppelin/contracts": "npm:^5.2.0" - "@openzeppelin/upgrades-core": "npm:^1.41.0" + "@openzeppelin/upgrades-core": "npm:^1.42.2" "@typechain/ethers-v6": "npm:^0.5.1" "@typechain/hardhat": "npm:^9.1.0" "@types/chai": "npm:^4.3.20" @@ -7402,7 +7402,7 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/upgrades-core@npm:^1.24.1, @openzeppelin/upgrades-core@npm:^1.41.0": +"@openzeppelin/upgrades-core@npm:^1.24.1": version: 1.41.0 resolution: "@openzeppelin/upgrades-core@npm:1.41.0" dependencies: @@ -7422,6 +7422,26 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/upgrades-core@npm:^1.42.2": + version: 1.42.2 + resolution: "@openzeppelin/upgrades-core@npm:1.42.2" + dependencies: + "@nomicfoundation/slang": "npm:^0.18.3" + cbor: "npm:^10.0.0" + chalk: "npm:^4.1.0" + compare-versions: "npm:^6.0.0" + debug: "npm:^4.1.1" + ethereumjs-util: "npm:^7.0.3" + minimatch: "npm:^9.0.5" + minimist: "npm:^1.2.7" + proper-lockfile: "npm:^4.1.1" + solidity-ast: "npm:^0.4.51" + bin: + openzeppelin-upgrades-core: dist/cli/cli.js + checksum: 10/7000c7cf6822eab2b8a927acc1f09b769004667644e389ae582cd4f87f74433cdd3bc80477f95990d40bb60c15b85e61e5ad4cd47e0e7e70c4e5cbef6cbad10c + languageName: node + linkType: hard + "@parcel/watcher-android-arm64@npm:2.3.0": version: 2.3.0 resolution: "@parcel/watcher-android-arm64@npm:2.3.0" @@ -13376,6 +13396,15 @@ __metadata: languageName: node linkType: hard +"cbor@npm:^10.0.0": + version: 10.0.3 + resolution: "cbor@npm:10.0.3" + dependencies: + nofilter: "npm:^3.0.2" + checksum: 10/ff33c3404c3acc8afc448163a7b32eea39f4f99d641ac496352a6830256617a0b1d49b2862746b6b150e8931b6f6da10572d78c28af3a64b6836881c33c5d942 + languageName: node + linkType: hard + "cbor@npm:^9.0.0": version: 9.0.2 resolution: "cbor@npm:9.0.2" @@ -25091,7 +25120,7 @@ __metadata: languageName: node linkType: hard -"nofilter@npm:^3.1.0": +"nofilter@npm:^3.0.2, nofilter@npm:^3.1.0": version: 3.1.0 resolution: "nofilter@npm:3.1.0" checksum: 10/f63d87231dfda4b783db17d75b15aac948f78e65f4f1043096ef441147f6667ff74cd4b3f57ada5dbe240be282d3e9838558ac863a66cb04ef25fff7b2b4be4e From e05d52fcae98fbcbfeb1a959c35047386f310351 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 16:08:38 +0100 Subject: [PATCH 12/17] chore: devnet redeployment --- contracts/README.md | 23 +- .../DisputeKitClassic.json | 45 +- .../DisputeKitClassicNeo.json | 1021 ------ .../DisputeKitClassicNeo_Implementation.json | 1540 --------- .../DisputeKitClassicNeo_Proxy.json | 93 - .../DisputeKitClassic_Implementation.json | 112 +- .../DisputeKitClassic_Proxy.json | 54 +- .../DisputeResolver.json | 64 +- .../DisputeResolverNeo.json | 522 --- .../DisputeResolverRuler.json | 522 --- .../DisputeTemplateRegistry.json | 46 +- ...isputeTemplateRegistry_Implementation.json | 32 +- .../DisputeTemplateRegistry_Proxy.json | 56 +- .../arbitrumSepoliaDevnet/EvidenceModule.json | 40 +- .../EvidenceModule_Implementation.json | 36 +- .../EvidenceModule_Proxy.json | 50 +- .../arbitrumSepoliaDevnet/KlerosCore.json | 109 +- .../arbitrumSepoliaDevnet/KlerosCoreNeo.json | 2100 ------------ .../KlerosCoreNeo_Implementation.json | 2835 ----------------- .../KlerosCoreNeo_Proxy.json | 136 - .../KlerosCoreRuler.json | 1617 ---------- .../KlerosCoreRuler_Implementation.json | 2221 ------------- .../KlerosCoreRuler_Proxy.json | 107 - .../KlerosCoreSnapshotProxy.json | 36 +- .../KlerosCore_Implementation.json | 50 +- .../KlerosCore_Proxy.json | 100 +- .../arbitrumSepoliaDevnet/PolicyRegistry.json | 46 +- .../PolicyRegistry_Implementation.json | 34 +- .../PolicyRegistry_Proxy.json | 56 +- .../arbitrumSepoliaDevnet/RandomizerRNG.json | 397 --- .../RandomizerRNG_Implementation.json | 533 ---- .../RandomizerRNG_Proxy.json | 93 - .../SortitionModule.json | 51 +- .../SortitionModuleNeo.json | 1110 ------- .../SortitionModuleNeo_Implementation.json | 1609 ---------- .../SortitionModuleNeo_Proxy.json | 93 - .../SortitionModule_Implementation.json | 42 +- .../SortitionModule_Proxy.json | 56 +- 38 files changed, 548 insertions(+), 17139 deletions(-) delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Implementation.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Proxy.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverNeo.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Implementation.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Proxy.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Implementation.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Proxy.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Implementation.json delete mode 100644 contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Proxy.json diff --git a/contracts/README.md b/contracts/README.md index 842db8a0f..15f722c08 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -77,27 +77,20 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [ChainlinkRNG](https://sepolia.arbiscan.io/address/0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8) - [DAI](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) -- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b), [implementation](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) -- [DisputeKitClassicNeo: proxy](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1), [implementation](https://sepolia.arbiscan.io/address/0xE636AB278fBfc8712E807c589A362dc2396d2d2F) +- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457), [implementation](https://sepolia.arbiscan.io/address/0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24) - [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5), [implementation](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) -- [DisputeResolver](https://sepolia.arbiscan.io/address/0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61) -- [DisputeResolverNeo](https://sepolia.arbiscan.io/address/0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C) -- [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) +- [DisputeResolver](https://sepolia.arbiscan.io/address/0x524C5541f440204E0B4577334c439277018F971f) - [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) -- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391), [implementation](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) -- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09), [implementation](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) -- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8), [implementation](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) -- [KlerosCoreNeo: proxy](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A), [implementation](https://sepolia.arbiscan.io/address/0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB) -- [KlerosCoreRuler: proxy](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5), [implementation](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) -- [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) +- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a), [implementation](https://sepolia.arbiscan.io/address/0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592) +- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C), [implementation](https://sepolia.arbiscan.io/address/0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8) +- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6), [implementation](https://sepolia.arbiscan.io/address/0xb6839061C3aD03c208EFd697409453bf9900cAb2) +- [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0xa2425b724B32D40cbB85ea6e181cfb023CE9c014) - [KlerosCoreUniversity: proxy](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6), [implementation](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - [KlerosV2NeoEarlyUser](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - [PNKFaucet](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) -- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da), [implementation](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) -- [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836), [implementation](https://sepolia.arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) -- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C), [implementation](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) -- [SortitionModuleNeo: proxy](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64), [implementation](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0) +- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b), [implementation](https://sepolia.arbiscan.io/address/0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0) +- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD), [implementation](https://sepolia.arbiscan.io/address/0xB37919A50d3BddA9982e3c84aA47e501c454364B) - [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79), [implementation](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) - [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - [WETH](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138) diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json index 6b1b5d45c..3f5f41e1a 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json @@ -1,5 +1,5 @@ { - "address": "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + "address": "0x2246821E1313A93e2F8CdF7a3422d078f560b457", "abi": [ { "stateMutability": "payable", @@ -979,49 +979,52 @@ "type": "constructor" } ], - "transactionHash": "0x43b208edcf6fd040290b8ef44cd6da0f54b13515af861fb68acd7ea4255f9464", + "transactionHash": "0xf5b19a72c51e016b4baa80e54c9e35ad9ff413f2a2f3a0d3460807ac2e1fef71", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x9426F127116C3652A262AE1eA48391AC8F44D35b", - "transactionIndex": 1, - "gasUsed": "4175167", - "logsBloom": "0x00000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000002000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x242d1c89de54e1756d61bf0ed70cd5a495cc526ad94987ee7085e719c60d3562", - "transactionHash": "0x43b208edcf6fd040290b8ef44cd6da0f54b13515af861fb68acd7ea4255f9464", + "contractAddress": "0x2246821E1313A93e2F8CdF7a3422d078f560b457", + "transactionIndex": 3, + "gasUsed": "178371", + "logsBloom": "0x00000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000400000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000400000000000000000000000", + "blockHash": "0xc968ac57b13fa2e75922520f1cda70a21893354795661b2dacd28169113238ef", + "transactionHash": "0xf5b19a72c51e016b4baa80e54c9e35ad9ff413f2a2f3a0d3460807ac2e1fef71", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3638835, - "transactionHash": "0x43b208edcf6fd040290b8ef44cd6da0f54b13515af861fb68acd7ea4255f9464", - "address": "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + "transactionIndex": 3, + "blockNumber": 141215195, + "transactionHash": "0xf5b19a72c51e016b4baa80e54c9e35ad9ff413f2a2f3a0d3460807ac2e1fef71", + "address": "0x2246821E1313A93e2F8CdF7a3422d078f560b457", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0x242d1c89de54e1756d61bf0ed70cd5a495cc526ad94987ee7085e719c60d3562" + "blockHash": "0xc968ac57b13fa2e75922520f1cda70a21893354795661b2dacd28169113238ef" } ], - "blockNumber": 3638835, - "cumulativeGasUsed": "4175167", + "blockNumber": 141215195, + "cumulativeGasUsed": "271619", "status": 1, "byzantium": true }, "args": [ - "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", "execute": { - "methodName": "initialize2", - "args": [] + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "0x0000000000000000000000000000000000000000" + ] }, - "implementation": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", + "implementation": "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo.json deleted file mode 100644 index b3b457079..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo.json +++ /dev/null @@ -1,1021 +0,0 @@ -{ - "address": "0xd40aA608801a639E292e10C235B90488D04070b1", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_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" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x514a6dd50b1d60ca2a1176c54e682112aad04ccbf90af7b407896754232d74cb", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd40aA608801a639E292e10C235B90488D04070b1", - "transactionIndex": 2, - "gasUsed": "235697", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000020000000000000000000000000000000000000000080000000000000000000000000000000000200000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x76e6d259eaff2af5e2fc46119bbdc64dc8d00ec8eb45607c57539777b890adff", - "transactionHash": "0x514a6dd50b1d60ca2a1176c54e682112aad04ccbf90af7b407896754232d74cb", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 21125120, - "transactionHash": "0x514a6dd50b1d60ca2a1176c54e682112aad04ccbf90af7b407896754232d74cb", - "address": "0xd40aA608801a639E292e10C235B90488D04070b1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x76e6d259eaff2af5e2fc46119bbdc64dc8d00ec8eb45607c57539777b890adff" - } - ], - "blockNumber": 21125120, - "cumulativeGasUsed": "397284", - "status": 1, - "byzantium": true - }, - "args": [ - "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "db363a789eea4155c2105a5d4adf4ddb", - "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", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x0000000000000000000000000000000000000000" - ] - }, - "implementation": "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Implementation.json deleted file mode 100644 index 3bec21096..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Implementation.json +++ /dev/null @@ -1,1540 +0,0 @@ -{ - "address": "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", - "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" - } - ], - "transactionHash": "0x8b7648fa0a0889d9fc7b0b4dae53ae7e30fb24cafbf21289acb7629199961820", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", - "transactionIndex": 2, - "gasUsed": "4132371", - "logsBloom": "0x00000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000010000000000000000000000000040000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfb5869c62fcca3c4839f3f1f823d17337d025ba9981fb7d107b4914f40318a11", - "transactionHash": "0x8b7648fa0a0889d9fc7b0b4dae53ae7e30fb24cafbf21289acb7629199961820", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 21125112, - "transactionHash": "0x8b7648fa0a0889d9fc7b0b4dae53ae7e30fb24cafbf21289acb7629199961820", - "address": "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 1, - "blockHash": "0xfb5869c62fcca3c4839f3f1f823d17337d025ba9981fb7d107b4914f40318a11" - } - ], - "blockNumber": 21125112, - "cumulativeGasUsed": "4293970", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "db363a789eea4155c2105a5d4adf4ddb", - "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 Pause();\\n event Unpause();\\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 Pause();\\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 Unpause();\\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\":\"0xcc0e0ecc6a01f8c2adf8d271e8e928db2f1bcbdbcf3943b08ddf22f087d6ac92\",\"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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613eeb6200010360003960008181611588015281816115b101526117a90152613eeb6000f3fe6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613186565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613186565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613186565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131b4565b610785565b34801561029857600080fd5b506102ac6102a73660046131f1565b610c10565b005b6102ac6102bc36600461322a565b610d0d565b6102ac6102cf366004613339565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613186565b6117fa565b6040516101b3939291906133d8565b34801561032457600080fd5b506102ac610333366004613444565b6118c0565b34801561034457600080fd5b50610358610353366004613186565b611bcd565b6040516101b39190613496565b34801561037157600080fd5b506102216103803660046134da565b611c91565b34801561039157600080fd5b506103a56103a0366004613515565b611dd6565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613186565b611e8e565b3480156103fe57600080fd5b506102ac61040d366004613541565b611f05565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613599565b611fd1565b34801561045457600080fd5b506102ac610463366004613631565b6126ac565b34801561047457600080fd5b50610488610483366004613515565b6126f8565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461364e565b6127be565b3480156104f657600080fd5b506101a7610505366004613515565b612993565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b36600461322a565b612a2e565b34801561054c57600080fd5b5061022161055b36600461322a565b612d37565b34801561056c57600080fd5b506102ac61057b366004613631565b612e8a565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136d5565b600091825260208220600590910201805490925082906105e690600190613701565b815481106105f6576105f66136d5565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136d5565b6000918252602082206005909102018054909250829061066590600190613701565b81548110610675576106756136d5565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107169190613740565b5090935060049250610726915050565b816004811115610738576107386137a7565b0361077b57600061074888611bcd565b905080516001036107795780600081518110610766576107666136d5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190613740565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137bd565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136d5565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137d8565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613814565b610a93919061382b565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136d5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136d5565b9060005260206000200154815260200190815260200160002054610b28919061384d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613814565b610b67919061382b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136d5565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b815260040161084690613860565b600083815260036020526040812054600280549091908110610d8957610d896136d5565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613897565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137d8565b50509050868103610f30576127109150610fb1565b612710611388610f408686613701565b610f4a9190613814565b610f54919061382b565b610f5e8542613701565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc490600190613701565b81548110610fd457610fd46136d5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138bb565b6110619190613701565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138bb565b905060006127106111448784613814565b61114e919061382b565b611158908361384d565b60008c8152600686016020526040812054919250908211156112095760008c815260068601602052604090205434906111919084613701565b116111b65760008c81526006860160205260409020546111b19083613701565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061384d565b909155505060008c81526006860160205260408120805483929061125a90849061384d565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061384d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a85015460011015611537578285600901546113499190613701565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137bd565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161384d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138bb565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016115049392919061390e565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d8334613701565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ed6565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e968339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138bb565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e9683398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e968339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b03168360405161173391906139a8565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e9683398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138d4565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138d4565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136d5565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119869190613740565b5090935060019250611996915050565b8160048111156119a8576119a86137a7565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136d5565b60009182526020822060059091020180549092508290611a8890600190613701565b81548110611a9857611a986136d5565b90600052602060002090600c0201905060005b86811015611b66573382898984818110611ac757611ac76136d5565b9050602002013581548110611ade57611ade6136d5565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139c4565b8582898984818110611b2957611b296136d5565b9050602002013581548110611b4057611b406136d5565b600091825260209091206001600490920201015580611b5e816139fb565b915050611aab565b5086869050816005016000828254611b7e919061384d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bbb908b908b908b90613a46565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611bf357611bf36136d5565b60009182526020822060059091020180549092508290611c1590600190613701565b81548110611c2557611c256136d5565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c8357602002820191906000526020600020905b815481526020019060010190808311611c6f575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cb557611cb56136d5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce957611ce96136d5565b90600052602060002090600c02016000018681548110611d0b57611d0b6136d5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d91906137d8565b506003850154919350915060ff168015611db157508183600201541480611db15750805b15611dc457612710945050505050611dcd565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611e0757611e076136d5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3b57611e3b6136d5565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eb257611eb26136d5565b60009182526020822060059091020180549092508290611ed490600190613701565b81548110611ee457611ee46136d5565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f2f5760405162461bcd60e51b815260040161084690613a6a565b6000836001600160a01b03168383604051611f4a91906139a8565b60006040518083038185875af1925050503d8060008114611f87576040519150601f19603f3d011682016040523d82523d6000602084013e611f8c565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611ff557611ff56136d5565b600091825260209091206002600590920201015460ff16156120295760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120979190613740565b50909350600292506120a7915050565b8160048111156120b9576120b96137a7565b146121145760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b856121565760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b60008881526003602052604081205460028054909190811061217a5761217a6136d5565b9060005260206000209060050201905080600101548611156121d55760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e890600190613701565b815481106121f8576121f86136d5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122779190613740565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f69190613aac565b505050505091505060005b8a8110156125725733848d8d8481811061231d5761231d6136d5565b9050602002013581548110612334576123346136d5565b60009182526020909120600490910201546001600160a01b03161461236b5760405162461bcd60e51b8152600401610846906139c4565b8115806123de575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123b3576123b36136d5565b90506020020135815481106123ca576123ca6136d5565b906000526020600020906004020160010154145b6124505760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c83818110612463576124636136d5565b905060200201358154811061247a5761247a6136d5565b600091825260209091206003600490920201015460ff16156124d35760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124e7576124e76136d5565b90506020020135815481106124fe576124fe6136d5565b60009182526020909120600260049092020101556001848d8d84818110612527576125276136d5565b905060200201358154811061253e5761253e6136d5565b60009182526020909120600490910201600301805460ff19169115159190911790558061256a816139fb565b915050612301565b508a8a905083600401600082825461258a919061384d565b90915550506000898152600284016020526040812080548c92906125af90849061384d565b9091555050600183015489036125de57600383015460ff16156125d95760038301805460ff191690555b612657565b60018301546000908152600284016020526040808220548b83529120540361262057600383015460ff166125d95760038301805460ff19166001179055612657565b60018301546000908152600284016020526040808220548b83529120541115612657576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161269693929190613b16565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126d65760405162461bcd60e51b815260040161084690613a6a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612726576127266136d5565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061275a5761275a6136d5565b90600052602060002090600c0201600001878154811061277c5761277c6136d5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127e85760405162461bcd60e51b815260040161084690613b46565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612873858783613bd8565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128ee91906138bb565b6128f89190613701565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612981908a908a908a90613c98565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129b7576129b76136d5565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129eb576129eb6136d5565b90600052602060002090600c02016000018481548110612a0d57612a0d6136d5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a5b5760405162461bcd60e51b815260040161084690613b46565b600083815260036020526040902054600280548592908110612a7f57612a7f6136d5565b600091825260209091206002600590920201015460ff1615612ab35760405162461bcd60e51b815260040161084690613860565b600084815260036020526040812054600280549091908110612ad757612ad76136d5565b60009182526020822060059091020180549092508290612af990600190613701565b81548110612b0957612b096136d5565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b929190613cce565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c059190613740565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8d9190613cce565b9650612c998988612f03565b15612d2657604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d2b565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d5b57612d5b6136d5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d8f57612d8f6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1291906137d8565b5091509150826004015460001480612e41575080158015612e4157506000828152600284016020526040902054155b15612e53576000945050505050612e84565b8015612e68575050600401549150612e849050565b506000908152600290910160205260409020549150612e849050565b92915050565b6000546001600160a01b03163314612eb45760405162461bcd60e51b815260040161084690613a6a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612f005760405162461bcd60e51b815260040161084690613a6a565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f759190613740565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ff891906138bb565b6130029190613701565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613043573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261306b9190810190613d7e565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130eb9190613cce565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131669190613e5f565b5050915091508281613178919061384d565b909110159695505050505050565b60006020828403121561319857600080fd5b5035919050565b6001600160a01b0381168114612f0057600080fd5b600080600080608085870312156131ca57600080fd5b8435935060208501356131dc8161319f565b93969395505050506040820135916060013590565b6000806040838503121561320457600080fd5b823561320f8161319f565b9150602083013561321f8161319f565b809150509250929050565b6000806040838503121561323d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132855761328561324c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132b3576132b361324c565b604052919050565b60006001600160401b038311156132d4576132d461324c565b6132e7601f8401601f191660200161328b565b90508281528383830111156132fb57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261332357600080fd5b613332838335602085016132bb565b9392505050565b6000806040838503121561334c57600080fd5b82356133578161319f565b915060208301356001600160401b0381111561337257600080fd5b61337e85828601613312565b9150509250929050565b60005b838110156133a357818101518382015260200161338b565b50506000910152565b600081518084526133c4816020860160208601613388565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dcd60608301846133ac565b60008083601f84011261340b57600080fd5b5081356001600160401b0381111561342257600080fd5b6020830191508360208260051b850101111561343d57600080fd5b9250929050565b6000806000806060858703121561345a57600080fd5b8435935060208501356001600160401b0381111561347757600080fd5b613483878288016133f9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134ce578351835292840192918401916001016134b2565b50909695505050505050565b600080600080600060a086880312156134f257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561352a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561355657600080fd5b83356135618161319f565b92506020840135915060408401356001600160401b0381111561358357600080fd5b61358f86828701613312565b9150509250925092565b60008060008060008060a087890312156135b257600080fd5b8635955060208701356001600160401b03808211156135d057600080fd5b6135dc8a838b016133f9565b90975095506040890135945060608901359350608089013591508082111561360357600080fd5b508701601f8101891361361557600080fd5b613624898235602084016132bb565b9150509295509295509295565b60006020828403121561364357600080fd5b81356133328161319f565b60008060008060006080868803121561366657600080fd5b853594506020860135935060408601356001600160401b038082111561368b57600080fd5b818801915088601f83011261369f57600080fd5b8135818111156136ae57600080fd5b8960208285010111156136c057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e8457612e846136eb565b80516001600160601b038116811461372b57600080fd5b919050565b8051801515811461372b57600080fd5b600080600080600060a0868803121561375857600080fd5b61376186613714565b945060208601516137718161319f565b60408701519094506005811061378657600080fd5b925061379460608701613730565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137cf57600080fd5b61333282613730565b6000806000606084860312156137ed57600080fd5b835192506137fd60208501613730565b915061380b60408501613730565b90509250925092565b8082028115828204841417612e8457612e846136eb565b60008261384857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e8457612e846136eb565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600080604083850312156138aa57600080fd5b505080516020909101519092909150565b6000602082840312156138cd57600080fd5b5051919050565b600181811c908216806138e857607f821691505b60208210810361390857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845461392e816138d4565b8060608701526080600180841660008114613950576001811461396a57613998565b60ff1985168984015283151560051b890183019550613998565b896000528660002060005b858110156139905781548b8201860152908301908801613975565b8a0184019650505b50939a9950505050505050505050565b600082516139ba818460208701613388565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b600060018201613a0d57613a0d6136eb565b5060010190565b81835260006001600160fb1b03831115613a2d57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a5a604083018587613a14565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ac757600080fd5b613ad088613714565b9650613ade60208901613730565b955060408801519450606088015193506080880151925060a08801519150613b0860c08901613730565b905092959891949750929550565b604081526000613b2a604083018587613a14565b8281036020840152613b3c81856133ac565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f82111561179757600081815260208120601f850160051c81016020861015613bb15750805b601f850160051c820191505b81811015613bd057828155600101613bbd565b505050505050565b6001600160401b03831115613bef57613bef61324c565b613c0383613bfd83546138d4565b83613b8a565b6000601f841160018114613c375760008515613c1f5750838201355b600019600387901b1c1916600186901b178355613c91565b600083815260209020601f19861690835b82811015613c685786850135825560209485019460019092019101613c48565b5086821015613c855760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ce057600080fd5b81516133328161319f565b600082601f830112613cfc57600080fd5b815160206001600160401b03821115613d1757613d1761324c565b8160051b613d2682820161328b565b9283528481018201928281019087851115613d4057600080fd5b83870192505b84831015613d68578251613d598161319f565b82529183019190830190613d46565b979650505050505050565b805161372b8161319f565b600060208284031215613d9057600080fd5b81516001600160401b0380821115613da757600080fd5b908301906101608286031215613dbc57600080fd5b613dc4613262565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613e0c57600080fd5b613e1887828601613ceb565b60c08301525060e0838101519082015261010080840151908201526101209150613e43828401613d73565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e7557600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220c0a3954a9a165d1e4e7405b5d4e168cd44b7982e63ca7cd0a2c7346976035acd64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613186565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613186565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613186565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131b4565b610785565b34801561029857600080fd5b506102ac6102a73660046131f1565b610c10565b005b6102ac6102bc36600461322a565b610d0d565b6102ac6102cf366004613339565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613186565b6117fa565b6040516101b3939291906133d8565b34801561032457600080fd5b506102ac610333366004613444565b6118c0565b34801561034457600080fd5b50610358610353366004613186565b611bcd565b6040516101b39190613496565b34801561037157600080fd5b506102216103803660046134da565b611c91565b34801561039157600080fd5b506103a56103a0366004613515565b611dd6565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613186565b611e8e565b3480156103fe57600080fd5b506102ac61040d366004613541565b611f05565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613599565b611fd1565b34801561045457600080fd5b506102ac610463366004613631565b6126ac565b34801561047457600080fd5b50610488610483366004613515565b6126f8565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461364e565b6127be565b3480156104f657600080fd5b506101a7610505366004613515565b612993565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b36600461322a565b612a2e565b34801561054c57600080fd5b5061022161055b36600461322a565b612d37565b34801561056c57600080fd5b506102ac61057b366004613631565b612e8a565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136d5565b600091825260208220600590910201805490925082906105e690600190613701565b815481106105f6576105f66136d5565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136d5565b6000918252602082206005909102018054909250829061066590600190613701565b81548110610675576106756136d5565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107169190613740565b5090935060049250610726915050565b816004811115610738576107386137a7565b0361077b57600061074888611bcd565b905080516001036107795780600081518110610766576107666136d5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190613740565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137bd565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136d5565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137d8565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613814565b610a93919061382b565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136d5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136d5565b9060005260206000200154815260200190815260200160002054610b28919061384d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613814565b610b67919061382b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136d5565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b815260040161084690613860565b600083815260036020526040812054600280549091908110610d8957610d896136d5565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613897565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137d8565b50509050868103610f30576127109150610fb1565b612710611388610f408686613701565b610f4a9190613814565b610f54919061382b565b610f5e8542613701565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc490600190613701565b81548110610fd457610fd46136d5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138bb565b6110619190613701565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138bb565b905060006127106111448784613814565b61114e919061382b565b611158908361384d565b60008c8152600686016020526040812054919250908211156112095760008c815260068601602052604090205434906111919084613701565b116111b65760008c81526006860160205260409020546111b19083613701565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061384d565b909155505060008c81526006860160205260408120805483929061125a90849061384d565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061384d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a85015460011015611537578285600901546113499190613701565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137bd565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161384d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138bb565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016115049392919061390e565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d8334613701565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ed6565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e968339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138bb565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e9683398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e968339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b03168360405161173391906139a8565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e9683398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138d4565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138d4565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136d5565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119869190613740565b5090935060019250611996915050565b8160048111156119a8576119a86137a7565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136d5565b60009182526020822060059091020180549092508290611a8890600190613701565b81548110611a9857611a986136d5565b90600052602060002090600c0201905060005b86811015611b66573382898984818110611ac757611ac76136d5565b9050602002013581548110611ade57611ade6136d5565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139c4565b8582898984818110611b2957611b296136d5565b9050602002013581548110611b4057611b406136d5565b600091825260209091206001600490920201015580611b5e816139fb565b915050611aab565b5086869050816005016000828254611b7e919061384d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bbb908b908b908b90613a46565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611bf357611bf36136d5565b60009182526020822060059091020180549092508290611c1590600190613701565b81548110611c2557611c256136d5565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c8357602002820191906000526020600020905b815481526020019060010190808311611c6f575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cb557611cb56136d5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce957611ce96136d5565b90600052602060002090600c02016000018681548110611d0b57611d0b6136d5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d91906137d8565b506003850154919350915060ff168015611db157508183600201541480611db15750805b15611dc457612710945050505050611dcd565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611e0757611e076136d5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3b57611e3b6136d5565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eb257611eb26136d5565b60009182526020822060059091020180549092508290611ed490600190613701565b81548110611ee457611ee46136d5565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f2f5760405162461bcd60e51b815260040161084690613a6a565b6000836001600160a01b03168383604051611f4a91906139a8565b60006040518083038185875af1925050503d8060008114611f87576040519150601f19603f3d011682016040523d82523d6000602084013e611f8c565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611ff557611ff56136d5565b600091825260209091206002600590920201015460ff16156120295760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120979190613740565b50909350600292506120a7915050565b8160048111156120b9576120b96137a7565b146121145760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b856121565760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b60008881526003602052604081205460028054909190811061217a5761217a6136d5565b9060005260206000209060050201905080600101548611156121d55760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e890600190613701565b815481106121f8576121f86136d5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122779190613740565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f69190613aac565b505050505091505060005b8a8110156125725733848d8d8481811061231d5761231d6136d5565b9050602002013581548110612334576123346136d5565b60009182526020909120600490910201546001600160a01b03161461236b5760405162461bcd60e51b8152600401610846906139c4565b8115806123de575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123b3576123b36136d5565b90506020020135815481106123ca576123ca6136d5565b906000526020600020906004020160010154145b6124505760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c83818110612463576124636136d5565b905060200201358154811061247a5761247a6136d5565b600091825260209091206003600490920201015460ff16156124d35760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124e7576124e76136d5565b90506020020135815481106124fe576124fe6136d5565b60009182526020909120600260049092020101556001848d8d84818110612527576125276136d5565b905060200201358154811061253e5761253e6136d5565b60009182526020909120600490910201600301805460ff19169115159190911790558061256a816139fb565b915050612301565b508a8a905083600401600082825461258a919061384d565b90915550506000898152600284016020526040812080548c92906125af90849061384d565b9091555050600183015489036125de57600383015460ff16156125d95760038301805460ff191690555b612657565b60018301546000908152600284016020526040808220548b83529120540361262057600383015460ff166125d95760038301805460ff19166001179055612657565b60018301546000908152600284016020526040808220548b83529120541115612657576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161269693929190613b16565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126d65760405162461bcd60e51b815260040161084690613a6a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612726576127266136d5565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061275a5761275a6136d5565b90600052602060002090600c0201600001878154811061277c5761277c6136d5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127e85760405162461bcd60e51b815260040161084690613b46565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612873858783613bd8565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128ee91906138bb565b6128f89190613701565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612981908a908a908a90613c98565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129b7576129b76136d5565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129eb576129eb6136d5565b90600052602060002090600c02016000018481548110612a0d57612a0d6136d5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a5b5760405162461bcd60e51b815260040161084690613b46565b600083815260036020526040902054600280548592908110612a7f57612a7f6136d5565b600091825260209091206002600590920201015460ff1615612ab35760405162461bcd60e51b815260040161084690613860565b600084815260036020526040812054600280549091908110612ad757612ad76136d5565b60009182526020822060059091020180549092508290612af990600190613701565b81548110612b0957612b096136d5565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b929190613cce565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c059190613740565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8d9190613cce565b9650612c998988612f03565b15612d2657604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d2b565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d5b57612d5b6136d5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d8f57612d8f6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1291906137d8565b5091509150826004015460001480612e41575080158015612e4157506000828152600284016020526040902054155b15612e53576000945050505050612e84565b8015612e68575050600401549150612e849050565b506000908152600290910160205260409020549150612e849050565b92915050565b6000546001600160a01b03163314612eb45760405162461bcd60e51b815260040161084690613a6a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612f005760405162461bcd60e51b815260040161084690613a6a565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f759190613740565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ff891906138bb565b6130029190613701565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613043573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261306b9190810190613d7e565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130eb9190613cce565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131669190613e5f565b5050915091508281613178919061384d565b909110159695505050505050565b60006020828403121561319857600080fd5b5035919050565b6001600160a01b0381168114612f0057600080fd5b600080600080608085870312156131ca57600080fd5b8435935060208501356131dc8161319f565b93969395505050506040820135916060013590565b6000806040838503121561320457600080fd5b823561320f8161319f565b9150602083013561321f8161319f565b809150509250929050565b6000806040838503121561323d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132855761328561324c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132b3576132b361324c565b604052919050565b60006001600160401b038311156132d4576132d461324c565b6132e7601f8401601f191660200161328b565b90508281528383830111156132fb57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261332357600080fd5b613332838335602085016132bb565b9392505050565b6000806040838503121561334c57600080fd5b82356133578161319f565b915060208301356001600160401b0381111561337257600080fd5b61337e85828601613312565b9150509250929050565b60005b838110156133a357818101518382015260200161338b565b50506000910152565b600081518084526133c4816020860160208601613388565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dcd60608301846133ac565b60008083601f84011261340b57600080fd5b5081356001600160401b0381111561342257600080fd5b6020830191508360208260051b850101111561343d57600080fd5b9250929050565b6000806000806060858703121561345a57600080fd5b8435935060208501356001600160401b0381111561347757600080fd5b613483878288016133f9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134ce578351835292840192918401916001016134b2565b50909695505050505050565b600080600080600060a086880312156134f257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561352a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561355657600080fd5b83356135618161319f565b92506020840135915060408401356001600160401b0381111561358357600080fd5b61358f86828701613312565b9150509250925092565b60008060008060008060a087890312156135b257600080fd5b8635955060208701356001600160401b03808211156135d057600080fd5b6135dc8a838b016133f9565b90975095506040890135945060608901359350608089013591508082111561360357600080fd5b508701601f8101891361361557600080fd5b613624898235602084016132bb565b9150509295509295509295565b60006020828403121561364357600080fd5b81356133328161319f565b60008060008060006080868803121561366657600080fd5b853594506020860135935060408601356001600160401b038082111561368b57600080fd5b818801915088601f83011261369f57600080fd5b8135818111156136ae57600080fd5b8960208285010111156136c057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e8457612e846136eb565b80516001600160601b038116811461372b57600080fd5b919050565b8051801515811461372b57600080fd5b600080600080600060a0868803121561375857600080fd5b61376186613714565b945060208601516137718161319f565b60408701519094506005811061378657600080fd5b925061379460608701613730565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137cf57600080fd5b61333282613730565b6000806000606084860312156137ed57600080fd5b835192506137fd60208501613730565b915061380b60408501613730565b90509250925092565b8082028115828204841417612e8457612e846136eb565b60008261384857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e8457612e846136eb565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600080604083850312156138aa57600080fd5b505080516020909101519092909150565b6000602082840312156138cd57600080fd5b5051919050565b600181811c908216806138e857607f821691505b60208210810361390857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845461392e816138d4565b8060608701526080600180841660008114613950576001811461396a57613998565b60ff1985168984015283151560051b890183019550613998565b896000528660002060005b858110156139905781548b8201860152908301908801613975565b8a0184019650505b50939a9950505050505050505050565b600082516139ba818460208701613388565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b600060018201613a0d57613a0d6136eb565b5060010190565b81835260006001600160fb1b03831115613a2d57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a5a604083018587613a14565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ac757600080fd5b613ad088613714565b9650613ade60208901613730565b955060408801519450606088015193506080880151925060a08801519150613b0860c08901613730565b905092959891949750929550565b604081526000613b2a604083018587613a14565b8281036020840152613b3c81856133ac565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f82111561179757600081815260208120601f850160051c81016020861015613bb15750805b601f850160051c820191505b81811015613bd057828155600101613bbd565b505050505050565b6001600160401b03831115613bef57613bef61324c565b613c0383613bfd83546138d4565b83613b8a565b6000601f841160018114613c375760008515613c1f5750838201355b600019600387901b1c1916600186901b178355613c91565b600083815260209020601f19861690835b82811015613c685786850135825560209485019460019092019101613c48565b5086821015613c855760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ce057600080fd5b81516133328161319f565b600082601f830112613cfc57600080fd5b815160206001600160401b03821115613d1757613d1761324c565b8160051b613d2682820161328b565b9283528481018201928281019087851115613d4057600080fd5b83870192505b84831015613d68578251613d598161319f565b82529183019190830190613d46565b979650505050505050565b805161372b8161319f565b600060208284031215613d9057600080fd5b81516001600160401b0380821115613da757600080fd5b908301906101608286031215613dbc57600080fd5b613dc4613262565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613e0c57600080fd5b613e1887828601613ceb565b60c08301525060e0838101519082015261010080840151908201526101209150613e43828401613d73565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e7557600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220c0a3954a9a165d1e4e7405b5d4e168cd44b7982e63ca7cd0a2c7346976035acd64736f6c63430008120033", - "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 - }, - "storageLayout": { - "storage": [ - { - "astId": 13676, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 13679, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)5036" - }, - { - "astId": 13683, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "disputes", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Dispute)13615_storage)dyn_storage" - }, - { - "astId": 13687, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreDisputeIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Dispute)13615_storage)dyn_storage": { - "base": "t_struct(Dispute)13615_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)13653_storage)dyn_storage": { - "base": "t_struct(Round)13653_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Vote)13662_storage)dyn_storage": { - "base": "t_struct(Vote)13662_storage", - "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Vote[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)5036": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_uint256)" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(Dispute)13615_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassic.Dispute", - "members": [ - { - "astId": 13604, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "rounds", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Round)13653_storage)dyn_storage" - }, - { - "astId": 13606, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "numberOfChoices", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 13608, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "jumped", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 13612, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "coreRoundIDToLocal", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 13614, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "extraData", - "offset": 0, - "slot": "4", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "160" - }, - "t_struct(Round)13653_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassic.Round", - "members": [ - { - "astId": 13619, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "votes", - "offset": 0, - "slot": "0", - "type": "t_array(t_struct(Vote)13662_storage)dyn_storage" - }, - { - "astId": 13621, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "winningChoice", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 13625, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "counts", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 13627, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "tied", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 13629, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalVoted", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 13631, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "totalCommitted", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 13635, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "paidFees", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 13639, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "hasPaid", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 13645, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "contributions", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" - }, - { - "astId": 13647, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "feeRewards", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 13650, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "fundedChoices", - "offset": 0, - "slot": "10", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 13652, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "nbVotes", - "offset": 0, - "slot": "11", - "type": "t_uint256" - } - ], - "numberOfBytes": "384" - }, - "t_struct(Vote)13662_storage": { - "encoding": "inplace", - "label": "struct DisputeKitClassic.Vote", - "members": [ - { - "astId": 13655, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 13657, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "commit", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 13659, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "choice", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 13661, - "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "voted", - "offset": 0, - "slot": "3", - "type": "t_bool" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Proxy.json deleted file mode 100644 index 2fa486534..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicNeo_Proxy.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "address": "0xd40aA608801a639E292e10C235B90488D04070b1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x514a6dd50b1d60ca2a1176c54e682112aad04ccbf90af7b407896754232d74cb", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd40aA608801a639E292e10C235B90488D04070b1", - "transactionIndex": 2, - "gasUsed": "235697", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000020000000000000000000000000000000000000000080000000000000000000000000000000000200000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x76e6d259eaff2af5e2fc46119bbdc64dc8d00ec8eb45607c57539777b890adff", - "transactionHash": "0x514a6dd50b1d60ca2a1176c54e682112aad04ccbf90af7b407896754232d74cb", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 21125120, - "transactionHash": "0x514a6dd50b1d60ca2a1176c54e682112aad04ccbf90af7b407896754232d74cb", - "address": "0xd40aA608801a639E292e10C235B90488D04070b1", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x76e6d259eaff2af5e2fc46119bbdc64dc8d00ec8eb45607c57539777b890adff" - } - ], - "blockNumber": 21125120, - "cumulativeGasUsed": "397284", - "status": 1, - "byzantium": true - }, - "args": [ - "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "db363a789eea4155c2105a5d4adf4ddb", - "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", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json index 68fdf95ff..9c5cb24b1 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", + "address": "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", "abi": [ { "inputs": [], @@ -960,38 +960,38 @@ "type": "function" } ], - "transactionHash": "0x694b22a1b80c1dc5e8ff7de0a5770ffbc0ae17f5fd57481a08e8bdd6363b2d06", + "transactionHash": "0xe45fa05818d355ae6ad89738239de573ebf34a442c9873df404dc551ce604e90", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", - "transactionIndex": 2, + "contractAddress": "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", + "transactionIndex": 4, "gasUsed": "3660965", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000800000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x15baaf1da26c5f27fd94ad24668550a178ecabce4ba7ea3472083d7eaaf289dc", - "transactionHash": "0x694b22a1b80c1dc5e8ff7de0a5770ffbc0ae17f5fd57481a08e8bdd6363b2d06", + "logsBloom": "0x00000000000020000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7f693b63edf7f862dfb3edb3d02a7d358160f298fc28d41d55c34ae5b1376cf3", + "transactionHash": "0xe45fa05818d355ae6ad89738239de573ebf34a442c9873df404dc551ce604e90", "logs": [ { - "transactionIndex": 2, - "blockNumber": 139231012, - "transactionHash": "0x694b22a1b80c1dc5e8ff7de0a5770ffbc0ae17f5fd57481a08e8bdd6363b2d06", - "address": "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", + "transactionIndex": 4, + "blockNumber": 141215186, + "transactionHash": "0xe45fa05818d355ae6ad89738239de573ebf34a442c9873df404dc551ce604e90", + "address": "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x15baaf1da26c5f27fd94ad24668550a178ecabce4ba7ea3472083d7eaaf289dc" + "logIndex": 5, + "blockHash": "0x7f693b63edf7f862dfb3edb3d02a7d358160f298fc28d41d55c34ae5b1376cf3" } ], - "blockNumber": 139231012, - "cumulativeGasUsed": "3707601", + "blockNumber": 141215186, + "cumulativeGasUsed": "4325610", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":[],\"name\":\"initialize2\",\"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\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"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\"}]},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __DisputeKitClassicBase_initialize(_governor, _core);\\n }\\n\\n function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0xa3633f78ef652659c2ef88fd20a5565e4d0148e20a61c4ccca9e37204df7dadf\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {KlerosCore, KlerosCoreBase, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n // ************************************* //\\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 mapping(address drawnAddress => bool) alreadyDrawn; // Set to 'true' if the address has already been drawn, so it can't be drawn more than once.\\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 bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\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 Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n function __DisputeKitClassicBase_initialize(address _governor, KlerosCore _core) internal onlyInitializing {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************ //\\n // * Governance * //\\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 drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n round.alreadyDrawn[drawnAddress] = true;\\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 /// Note that we don't check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless since we check for insolvency anyway.\\n /// @param _round The round in which the juror is being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage _round,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n (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 result = totalStaked >= totalLocked + lockedAmountPerJuror;\\n\\n if (singleDrawPerJuror) {\\n result = result && !_round.alreadyDrawn[_juror];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x243af54007e2a208797bb56f6b576f68bdb5c0b932cd6df22375d646491318e1\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516140c96200010360003960008181611692015281816116bb01526118b301526140c96000f3fe6080604052600436106101a35760003560e01c806369f3f041116100e2578063b6ede54011610085578063b6ede54014610558578063ba66fde714610578578063be46760414610598578063d2b8035a146105ae578063da3beb8c146105ce578063e349ad30146104a0578063e4c0aaf4146105ee578063f2f4eb261461060e57600080fd5b806369f3f041146104135780636d4cd8ea14610460578063751accd014610480578063796490f9146104a05780637c04034e146104b65780638e426460146104d6578063a7cc08fe146104f6578063b34bfaa81461054257600080fd5b80634b2f0ea01161014a5780634b2f0ea0146102fe5780634f1ef2861461031157806352d1902d1461032457806354fd4d5014610339578063564a565d146103775780635c92e2f6146103a657806365540b96146103c6578063675926f6146103f357600080fd5b80630baa64d1146101a85780630c340a24146101dd5780631200aabc146102155780631c3db16d146102505780632621b9a21461028d578063362c3479146102a7578063472abf68146102c7578063485cc955146102de575b600080fd5b3480156101b457600080fd5b506101c86101c3366004613363565b61062e565b60405190151581526020015b60405180910390f35b3480156101e957600080fd5b506000546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b34801561022157600080fd5b50610242610230366004613363565b60036020526000908152604090205481565b6040519081526020016101d4565b34801561025c57600080fd5b5061027061026b366004613363565b6106a5565b6040805193845291151560208401521515908201526060016101d4565b34801561029957600080fd5b506004546101c89060ff1681565b3480156102b357600080fd5b506102426102c2366004613391565b610813565b3480156102d357600080fd5b506102dc610c9e565b005b3480156102ea57600080fd5b506102dc6102f93660046133ce565b610d4f565b6102dc61030c366004613407565b610e17565b6102dc61031f366004613516565b61167e565b34801561033057600080fd5b506102426118a6565b34801561034557600080fd5b5061036a604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516101d491906135b5565b34801561038357600080fd5b50610397610392366004613363565b611904565b6040516101d4939291906135c8565b3480156103b257600080fd5b506102dc6103c1366004613634565b6119ca565b3480156103d257600080fd5b506103e66103e1366004613363565b611ccf565b6040516101d49190613686565b3480156103ff57600080fd5b5061024261040e3660046136ca565b611d93565b34801561041f57600080fd5b5061043361042e366004613705565b611ed8565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101d4565b34801561046c57600080fd5b506101c861047b366004613363565b611f90565b34801561048c57600080fd5b506102dc61049b366004613731565b612007565b3480156104ac57600080fd5b5061024261271081565b3480156104c257600080fd5b506102dc6104d1366004613789565b6120d3565b3480156104e257600080fd5b506102dc6104f1366004613821565b6127a4565b34801561050257600080fd5b50610516610511366004613705565b6127f0565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101d4565b34801561054e57600080fd5b50610242614e2081565b34801561056457600080fd5b506102dc61057336600461383e565b6128b6565b34801561058457600080fd5b506101c8610593366004613705565b612a8b565b3480156105a457600080fd5b5061024261138881565b3480156105ba57600080fd5b506101fd6105c9366004613407565b612b26565b3480156105da57600080fd5b506102426105e9366004613407565b612e40565b3480156105fa57600080fd5b506102dc610609366004613821565b612f93565b34801561061a57600080fd5b506001546101fd906001600160a01b031681565b600081815260036020526040812054600280548392908110610652576106526138c5565b60009182526020822060059091020180549092508290610674906001906138f1565b81548110610684576106846138c5565b60009182526020909120600d90910201805460059091015414949350505050565b60008060008060026003600087815260200190815260200160002054815481106106d1576106d16138c5565b600091825260208220600590910201805490925082906106f3906001906138f1565b81548110610703576107036138c5565b60009182526020909120600d90910201600381015460ff16945090508361072e578060010154610731565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190613930565b50909350600492506107b4915050565b8160048111156107c6576107c6613997565b036108095760006107d688611ccf565b9050805160010361080757806000815181106107f4576107f46138c5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108859190613930565b509350505050806108dd5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095491906139ad565b156109925760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b60448201526064016108d4565b6000868152600360205260408120546002805490919081106109b6576109b66138c5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106109ea576109ea6138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600d9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906139c8565b5050600087815260078401602052604090205490915060ff16610ab3576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610bf8565b808603610b28576000868152600683016020526040902054610ad6576000610b21565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610b179190613a04565b610b219190613a1b565b9450610bf8565b600081815260078301602052604090205460ff16610bf85781600601600083600a01600181548110610b5c57610b5c6138c5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b9257610b926138c5565b9060005260206000200154815260200190815260200160002054610bb69190613a3d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610beb9190613a04565b610bf59190613a1b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c92576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b60026000610caa612fdf565b8054909150600160401b900460ff1680610cd1575080546001600160401b03808416911610155b15610cee5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60016000610d5b612fdf565b8054909150600160401b900460ff1680610d82575080546001600160401b03808416911610155b15610d9f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610dca8484613003565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610e3b57610e3b6138c5565b600091825260209091206002600590920201015460ff1615610e6f5760405162461bcd60e51b81526004016108d490613a50565b600083815260036020526040812054600280549091908110610e9357610e936138c5565b906000526020600020906005020190508060010154831115610ef75760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e60448201526064016108d4565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190613a87565b91509150814210158015610f7b57508042105b610fc05760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b60448201526064016108d4565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102591906139c8565b5050905086810361103a5761271091506110bb565b61271061138861104a86866138f1565b6110549190613a04565b61105e9190613a1b565b61106885426138f1565b106110b55760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f7365720060448201526064016108d4565b614e2091505b845460009086906110ce906001906138f1565b815481106110de576110de6138c5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600d949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561113d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111619190613aab565b61116b91906138f1565b60008a815260078401602052604090205490915060ff16156111cf5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e000000000060448201526064016108d4565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa158015611219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123d9190613aab565b9050600061271061124e8784613a04565b6112589190613a1b565b6112629083613a3d565b60008c8152600686016020526040812054919250908211156113135760008c8152600686016020526040902054349061129b90846138f1565b116112c05760008c81526006860160205260409020546112bb90836138f1565b6112c2565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161130a929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061133f908490613a3d565b909155505060008c815260068601602052604081208054839290611364908490613a3d565b909155505060008c815260068601602052604090205482116114365760008c8152600686016020526040812054600987018054919290916113a6908490613a3d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156116415782856009015461145391906138f1565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906139ad565b156114de5760028a01805460ff191660011790556115c1565b895460038b0160006114f1876001613a3d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600d02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161156c91815260200190565b602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190613aab565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161160e93929190613afe565b6000604051808303818588803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b50505050505b8034111561166f57336108fc61165783346138f1565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61168782613039565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061170557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116f96000805160206140748339815191525490565b6001600160a01b031614155b156117235760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561177d575060408051601f3d908101601f1916820190925261177a91810190613aab565b60015b6117a557604051630c76093760e01b81526001600160a01b03831660048201526024016108d4565b60008051602061407483398151915281146117d657604051632a87526960e21b8152600481018290526024016108d4565b6000805160206140748339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118a1576000836001600160a01b03168360405161183d9190613b9d565b600060405180830381855af49150503d8060008114611878576040519150601f19603f3d011682016040523d82523d6000602084013e61187d565b606091505b505090508061189f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118f15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061407483398151915290565b6002818154811061191457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161194790613ac4565b80601f016020809104026020016040519081016040528092919081815260200182805461197390613ac4565b80156119c05780601f10611995576101008083540402835291602001916119c0565b820191906000526020600020905b8154815290600101906020018083116119a357829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106119ee576119ee6138c5565b600091825260209091206002600590920201015460ff1615611a225760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a909190613930565b5090935060019250611aa0915050565b816004811115611ab257611ab2613997565b14611b0f5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b60648201526084016108d4565b82611b4c5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b60448201526064016108d4565b600086815260036020526040812054600280549091908110611b7057611b706138c5565b60009182526020822060059091020180549092508290611b92906001906138f1565b81548110611ba257611ba26138c5565b90600052602060002090600d0201905060005b86811015611c68573382898984818110611bd157611bd16138c5565b9050602002013581548110611be857611be86138c5565b60009182526020909120600490910201546001600160a01b031614611c1f5760405162461bcd60e51b81526004016108d490613bb9565b8582898984818110611c3357611c336138c5565b9050602002013581548110611c4a57611c4a6138c5565b60009182526020909120600160049092020181019190915501611bb5565b5086869050816005016000828254611c809190613a3d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611cbd908b908b908b90613c22565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611cf557611cf56138c5565b60009182526020822060059091020180549092508290611d17906001906138f1565b81548110611d2757611d276138c5565b90600052602060002090600d0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d8557602002820191906000526020600020905b815481526020019060010190808311611d71575b505050505092505050919050565b600085815260036020526040812054600280548392908110611db757611db76138c5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611deb57611deb6138c5565b90600052602060002090600d02016000018681548110611e0d57611e0d6138c5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f91906139c8565b506003850154919350915060ff168015611eb357508183600201541480611eb35750805b15611ec657612710945050505050611ecf565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611f0957611f096138c5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611f3d57611f3d6138c5565b600091825260208083206001600d909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611fb457611fb46138c5565b60009182526020822060059091020180549092508290611fd6906001906138f1565b81548110611fe657611fe66138c5565b60009182526020909120600d90910201805460049091015414949350505050565b6000546001600160a01b031633146120315760405162461bcd60e51b81526004016108d490613c46565b6000836001600160a01b0316838360405161204c9190613b9d565b60006040518083038185875af1925050503d8060008114612089576040519150601f19603f3d011682016040523d82523d6000602084013e61208e565b606091505b505090508061189f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b60448201526064016108d4565b6000868152600360205260409020546002805488929081106120f7576120f76138c5565b600091825260209091206002600590920201015460ff161561212b5760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190613930565b50909350600292506121a9915050565b8160048111156121bb576121bb613997565b146122165760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b60648201526084016108d4565b856122585760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b60448201526064016108d4565b60008881526003602052604081205460028054909190811061227c5761227c6138c5565b9060005260206000209060050201905080600101548611156122d75760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b60448201526064016108d4565b805460009082906122ea906001906138f1565b815481106122fa576122fa6138c5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600d9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123799190613930565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156123d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f89190613c88565b505050505091505060005b8a81101561266a5733848d8d8481811061241f5761241f6138c5565b9050602002013581548110612436576124366138c5565b60009182526020909120600490910201546001600160a01b03161461246d5760405162461bcd60e51b81526004016108d490613bb9565b8115806124e0575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106124b5576124b56138c5565b90506020020135815481106124cc576124cc6138c5565b906000526020600020906004020160010154145b6125525760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e00000060648201526084016108d4565b838c8c83818110612565576125656138c5565b905060200201358154811061257c5761257c6138c5565b600091825260209091206003600490920201015460ff16156125d55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b60448201526064016108d4565b89848d8d848181106125e9576125e96138c5565b9050602002013581548110612600576126006138c5565b60009182526020909120600260049092020101556001848d8d84818110612629576126296138c5565b9050602002013581548110612640576126406138c5565b60009182526020909120600490910201600301805460ff1916911515919091179055600101612403565b508a8a90508360040160008282546126829190613a3d565b90915550506000898152600284016020526040812080548c92906126a7908490613a3d565b9091555050600183015489036126d657600383015460ff16156126d15760038301805460ff191690555b61274f565b60018301546000908152600284016020526040808220548b83529120540361271857600383015460ff166126d15760038301805460ff1916600117905561274f565b60018301546000908152600284016020526040808220548b8352912054111561274f576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161278e93929190613cf2565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146127ce5760405162461bcd60e51b81526004016108d490613c46565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061281e5761281e6138c5565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612852576128526138c5565b90600052602060002090600d02016000018781548110612874576128746138c5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146128e05760405162461bcd60e51b81526004016108d490613d22565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161296b858783613db6565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190613aab565b6129f091906138f1565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600d909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612a79908a908a908a90613e76565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612aaf57612aaf6138c5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612ae357612ae36138c5565b90600052602060002090600d02016000018481548110612b0557612b056138c5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612b535760405162461bcd60e51b81526004016108d490613d22565b600083815260036020526040902054600280548592908110612b7757612b776138c5565b600091825260209091206002600590920201015460ff1615612bab5760405162461bcd60e51b81526004016108d490613a50565b600084815260036020526040812054600280549091908110612bcf57612bcf6138c5565b60009182526020822060059091020180549092508290612bf1906001906138f1565b81548110612c0157612c016138c5565b90600052602060002090600d020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8a9190613eac565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613930565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d859190613eac565b9650612d92848a89613066565b15612e2f57604080516080810182526001600160a01b03808a1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff19958616179055918152600c8901909152929092208054909216179055612e34565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612e6457612e646138c5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612e9857612e986138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600d93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1b91906139c8565b5091509150826004015460001480612f4a575080158015612f4a57506000828152600284016020526040902054155b15612f5c576000945050505050612f8d565b8015612f71575050600401549150612f8d9050565b506000908152600290910160205260409020549150612f8d9050565b92915050565b6000546001600160a01b03163314612fbd5760405162461bcd60e51b81526004016108d490613c46565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61300b613322565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b6000546001600160a01b031633146130635760405162461bcd60e51b81526004016108d490613c46565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d89190613930565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b9190613aab565b61316591906138f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa1580156131a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131ce9190810190613f5c565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561322a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324e9190613eac565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa1580156132a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c9919061403d565b50509150915082816132db9190613a3d565b60045490831015955060ff16156133175784801561331457506001600160a01b0386166000908152600c8901602052604090205460ff16155b94505b505050509392505050565b61332a613349565b61334757604051631afcd79f60e31b815260040160405180910390fd5b565b6000613353612fdf565b54600160401b900460ff16919050565b60006020828403121561337557600080fd5b5035919050565b6001600160a01b038116811461306357600080fd5b600080600080608085870312156133a757600080fd5b8435935060208501356133b98161337c565b93969395505050506040820135916060013590565b600080604083850312156133e157600080fd5b82356133ec8161337c565b915060208301356133fc8161337c565b809150509250929050565b6000806040838503121561341a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561346257613462613429565b60405290565b604051601f8201601f191681016001600160401b038111828210171561349057613490613429565b604052919050565b60006001600160401b038311156134b1576134b1613429565b6134c4601f8401601f1916602001613468565b90508281528383830111156134d857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261350057600080fd5b61350f83833560208501613498565b9392505050565b6000806040838503121561352957600080fd5b82356135348161337c565b915060208301356001600160401b0381111561354f57600080fd5b61355b858286016134ef565b9150509250929050565b60005b83811015613580578181015183820152602001613568565b50506000910152565b600081518084526135a1816020860160208601613565565b601f01601f19169290920160200192915050565b60208152600061350f6020830184613589565b8381528215156020820152606060408201526000611ecf6060830184613589565b60008083601f8401126135fb57600080fd5b5081356001600160401b0381111561361257600080fd5b6020830191508360208260051b850101111561362d57600080fd5b9250929050565b6000806000806060858703121561364a57600080fd5b8435935060208501356001600160401b0381111561366757600080fd5b613673878288016135e9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156136be578351835292840192918401916001016136a2565b50909695505050505050565b600080600080600060a086880312156136e257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561371a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561374657600080fd5b83356137518161337c565b92506020840135915060408401356001600160401b0381111561377357600080fd5b61377f868287016134ef565b9150509250925092565b60008060008060008060a087890312156137a257600080fd5b8635955060208701356001600160401b03808211156137c057600080fd5b6137cc8a838b016135e9565b9097509550604089013594506060890135935060808901359150808211156137f357600080fd5b508701601f8101891361380557600080fd5b61381489823560208401613498565b9150509295509295509295565b60006020828403121561383357600080fd5b813561350f8161337c565b60008060008060006080868803121561385657600080fd5b853594506020860135935060408601356001600160401b038082111561387b57600080fd5b818801915088601f83011261388f57600080fd5b81358181111561389e57600080fd5b8960208285010111156138b057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f8d57612f8d6138db565b80516001600160601b038116811461391b57600080fd5b919050565b8051801515811461391b57600080fd5b600080600080600060a0868803121561394857600080fd5b61395186613904565b945060208601516139618161337c565b60408701519094506005811061397657600080fd5b925061398460608701613920565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156139bf57600080fd5b61350f82613920565b6000806000606084860312156139dd57600080fd5b835192506139ed60208501613920565b91506139fb60408501613920565b90509250925092565b8082028115828204841417612f8d57612f8d6138db565b600082613a3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612f8d57612f8d6138db565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60008060408385031215613a9a57600080fd5b505080516020909101519092909150565b600060208284031215613abd57600080fd5b5051919050565b600181811c90821680613ad857607f821691505b602082108103613af857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208460208401526060604084015260008454613b1f81613ac4565b8060608701526080600180841660008114613b415760018114613b5d57613b8d565b60ff19851660808a0152608084151560051b8a01019550613b8d565b89600052602060002060005b85811015613b845781548b8201860152908301908801613b69565b8a016080019650505b50939a9950505050505050505050565b60008251613baf818460208701613565565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613c0957600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613c36604083018587613bf0565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ca357600080fd5b613cac88613904565b9650613cba60208901613920565b955060408801519450606088015193506080880151925060a08801519150613ce460c08901613920565b905092959891949750929550565b604081526000613d06604083018587613bf0565b8281036020840152613d188185613589565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156118a1576000816000526020600020601f850160051c81016020861015613d8f5750805b601f850160051c820191505b81811015613dae57828155600101613d9b565b505050505050565b6001600160401b03831115613dcd57613dcd613429565b613de183613ddb8354613ac4565b83613d66565b6000601f841160018114613e155760008515613dfd5750838201355b600019600387901b1c1916600186901b178355613e6f565b600083815260209020601f19861690835b82811015613e465786850135825560209485019460019092019101613e26565b5086821015613e635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ebe57600080fd5b815161350f8161337c565b600082601f830112613eda57600080fd5b815160206001600160401b03821115613ef557613ef5613429565b8160051b613f04828201613468565b9283528481018201928281019087851115613f1e57600080fd5b83870192505b84831015613f46578251613f378161337c565b82529183019190830190613f24565b979650505050505050565b805161391b8161337c565b600060208284031215613f6e57600080fd5b81516001600160401b0380821115613f8557600080fd5b908301906101608286031215613f9a57600080fd5b613fa261343f565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613fea57600080fd5b613ff687828601613ec9565b60c08301525060e0838101519082015261010080840151908201526101209150614021828401613f51565b9181019190915261014091820151918101919091529392505050565b6000806000806080858703121561405357600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dbc0f07975f24862ef29107d65fe042a587199d6ad1f6756f0fbf8ad88bad54664736f6c63430008180033", "deployedBytecode": "0x6080604052600436106101a35760003560e01c806369f3f041116100e2578063b6ede54011610085578063b6ede54014610558578063ba66fde714610578578063be46760414610598578063d2b8035a146105ae578063da3beb8c146105ce578063e349ad30146104a0578063e4c0aaf4146105ee578063f2f4eb261461060e57600080fd5b806369f3f041146104135780636d4cd8ea14610460578063751accd014610480578063796490f9146104a05780637c04034e146104b65780638e426460146104d6578063a7cc08fe146104f6578063b34bfaa81461054257600080fd5b80634b2f0ea01161014a5780634b2f0ea0146102fe5780634f1ef2861461031157806352d1902d1461032457806354fd4d5014610339578063564a565d146103775780635c92e2f6146103a657806365540b96146103c6578063675926f6146103f357600080fd5b80630baa64d1146101a85780630c340a24146101dd5780631200aabc146102155780631c3db16d146102505780632621b9a21461028d578063362c3479146102a7578063472abf68146102c7578063485cc955146102de575b600080fd5b3480156101b457600080fd5b506101c86101c3366004613363565b61062e565b60405190151581526020015b60405180910390f35b3480156101e957600080fd5b506000546101fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b34801561022157600080fd5b50610242610230366004613363565b60036020526000908152604090205481565b6040519081526020016101d4565b34801561025c57600080fd5b5061027061026b366004613363565b6106a5565b6040805193845291151560208401521515908201526060016101d4565b34801561029957600080fd5b506004546101c89060ff1681565b3480156102b357600080fd5b506102426102c2366004613391565b610813565b3480156102d357600080fd5b506102dc610c9e565b005b3480156102ea57600080fd5b506102dc6102f93660046133ce565b610d4f565b6102dc61030c366004613407565b610e17565b6102dc61031f366004613516565b61167e565b34801561033057600080fd5b506102426118a6565b34801561034557600080fd5b5061036a604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516101d491906135b5565b34801561038357600080fd5b50610397610392366004613363565b611904565b6040516101d4939291906135c8565b3480156103b257600080fd5b506102dc6103c1366004613634565b6119ca565b3480156103d257600080fd5b506103e66103e1366004613363565b611ccf565b6040516101d49190613686565b3480156103ff57600080fd5b5061024261040e3660046136ca565b611d93565b34801561041f57600080fd5b5061043361042e366004613705565b611ed8565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101d4565b34801561046c57600080fd5b506101c861047b366004613363565b611f90565b34801561048c57600080fd5b506102dc61049b366004613731565b612007565b3480156104ac57600080fd5b5061024261271081565b3480156104c257600080fd5b506102dc6104d1366004613789565b6120d3565b3480156104e257600080fd5b506102dc6104f1366004613821565b6127a4565b34801561050257600080fd5b50610516610511366004613705565b6127f0565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101d4565b34801561054e57600080fd5b50610242614e2081565b34801561056457600080fd5b506102dc61057336600461383e565b6128b6565b34801561058457600080fd5b506101c8610593366004613705565b612a8b565b3480156105a457600080fd5b5061024261138881565b3480156105ba57600080fd5b506101fd6105c9366004613407565b612b26565b3480156105da57600080fd5b506102426105e9366004613407565b612e40565b3480156105fa57600080fd5b506102dc610609366004613821565b612f93565b34801561061a57600080fd5b506001546101fd906001600160a01b031681565b600081815260036020526040812054600280548392908110610652576106526138c5565b60009182526020822060059091020180549092508290610674906001906138f1565b81548110610684576106846138c5565b60009182526020909120600d90910201805460059091015414949350505050565b60008060008060026003600087815260200190815260200160002054815481106106d1576106d16138c5565b600091825260208220600590910201805490925082906106f3906001906138f1565b81548110610703576107036138c5565b60009182526020909120600d90910201600381015460ff16945090508361072e578060010154610731565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190613930565b50909350600492506107b4915050565b8160048111156107c6576107c6613997565b036108095760006107d688611ccf565b9050805160010361080757806000815181106107f4576107f46138c5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015610861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108859190613930565b509350505050806108dd5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095491906139ad565b156109925760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b60448201526064016108d4565b6000868152600360205260408120546002805490919081106109b6576109b66138c5565b600091825260208083208884526003600590930201918201905260408220548154919350839181106109ea576109ea6138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600d9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906139c8565b5050600087815260078401602052604090205490915060ff16610ab3576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610bf8565b808603610b28576000868152600683016020526040902054610ad6576000610b21565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610b179190613a04565b610b219190613a1b565b9450610bf8565b600081815260078301602052604090205460ff16610bf85781600601600083600a01600181548110610b5c57610b5c6138c5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b9257610b926138c5565b9060005260206000200154815260200190815260200160002054610bb69190613a3d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610beb9190613a04565b610bf59190613a1b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c92576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b60026000610caa612fdf565b8054909150600160401b900460ff1680610cd1575080546001600160401b03808416911610155b15610cee5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60016000610d5b612fdf565b8054909150600160401b900460ff1680610d82575080546001600160401b03808416911610155b15610d9f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155610dca8484613003565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610e3b57610e3b6138c5565b600091825260209091206002600590920201015460ff1615610e6f5760405162461bcd60e51b81526004016108d490613a50565b600083815260036020526040812054600280549091908110610e9357610e936138c5565b906000526020600020906005020190508060010154831115610ef75760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e60448201526064016108d4565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190613a87565b91509150814210158015610f7b57508042105b610fc05760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b60448201526064016108d4565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102591906139c8565b5050905086810361103a5761271091506110bb565b61271061138861104a86866138f1565b6110549190613a04565b61105e9190613a1b565b61106885426138f1565b106110b55760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f7365720060448201526064016108d4565b614e2091505b845460009086906110ce906001906138f1565b815481106110de576110de6138c5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600d949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa15801561113d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111619190613aab565b61116b91906138f1565b60008a815260078401602052604090205490915060ff16156111cf5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e000000000060448201526064016108d4565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa158015611219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123d9190613aab565b9050600061271061124e8784613a04565b6112589190613a1b565b6112629083613a3d565b60008c8152600686016020526040812054919250908211156113135760008c8152600686016020526040902054349061129b90846138f1565b116112c05760008c81526006860160205260409020546112bb90836138f1565b6112c2565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f8560405161130a929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061133f908490613a3d565b909155505060008c815260068601602052604081208054839290611364908490613a3d565b909155505060008c815260068601602052604090205482116114365760008c8152600686016020526040812054600987018054919290916113a6908490613a3d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156116415782856009015461145391906138f1565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa1580156114a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c591906139ad565b156114de5760028a01805460ff191660011790556115c1565b895460038b0160006114f1876001613a3d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600d02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161156c91815260200190565b602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190613aab565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b815260040161160e93929190613afe565b6000604051808303818588803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b50505050505b8034111561166f57336108fc61165783346138f1565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61168782613039565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061170557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116f96000805160206140748339815191525490565b6001600160a01b031614155b156117235760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561177d575060408051601f3d908101601f1916820190925261177a91810190613aab565b60015b6117a557604051630c76093760e01b81526001600160a01b03831660048201526024016108d4565b60008051602061407483398151915281146117d657604051632a87526960e21b8152600481018290526024016108d4565b6000805160206140748339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156118a1576000836001600160a01b03168360405161183d9190613b9d565b600060405180830381855af49150503d8060008114611878576040519150601f19603f3d011682016040523d82523d6000602084013e61187d565b606091505b505090508061189f576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118f15760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061407483398151915290565b6002818154811061191457600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161194790613ac4565b80601f016020809104026020016040519081016040528092919081815260200182805461197390613ac4565b80156119c05780601f10611995576101008083540402835291602001916119c0565b820191906000526020600020905b8154815290600101906020018083116119a357829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106119ee576119ee6138c5565b600091825260209091206002600590920201015460ff1615611a225760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a909190613930565b5090935060019250611aa0915050565b816004811115611ab257611ab2613997565b14611b0f5760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b60648201526084016108d4565b82611b4c5760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b60448201526064016108d4565b600086815260036020526040812054600280549091908110611b7057611b706138c5565b60009182526020822060059091020180549092508290611b92906001906138f1565b81548110611ba257611ba26138c5565b90600052602060002090600d0201905060005b86811015611c68573382898984818110611bd157611bd16138c5565b9050602002013581548110611be857611be86138c5565b60009182526020909120600490910201546001600160a01b031614611c1f5760405162461bcd60e51b81526004016108d490613bb9565b8582898984818110611c3357611c336138c5565b9050602002013581548110611c4a57611c4a6138c5565b60009182526020909120600160049092020181019190915501611bb5565b5086869050816005016000828254611c809190613a3d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611cbd908b908b908b90613c22565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611cf557611cf56138c5565b60009182526020822060059091020180549092508290611d17906001906138f1565b81548110611d2757611d276138c5565b90600052602060002090600d0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611d8557602002820191906000526020600020905b815481526020019060010190808311611d71575b505050505092505050919050565b600085815260036020526040812054600280548392908110611db757611db76138c5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611deb57611deb6138c5565b90600052602060002090600d02016000018681548110611e0d57611e0d6138c5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f91906139c8565b506003850154919350915060ff168015611eb357508183600201541480611eb35750805b15611ec657612710945050505050611ecf565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611f0957611f096138c5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611f3d57611f3d6138c5565b600091825260208083206001600d909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611fb457611fb46138c5565b60009182526020822060059091020180549092508290611fd6906001906138f1565b81548110611fe657611fe66138c5565b60009182526020909120600d90910201805460049091015414949350505050565b6000546001600160a01b031633146120315760405162461bcd60e51b81526004016108d490613c46565b6000836001600160a01b0316838360405161204c9190613b9d565b60006040518083038185875af1925050503d8060008114612089576040519150601f19603f3d011682016040523d82523d6000602084013e61208e565b606091505b505090508061189f5760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b60448201526064016108d4565b6000868152600360205260409020546002805488929081106120f7576120f76138c5565b600091825260209091206002600590920201015460ff161561212b5760405162461bcd60e51b81526004016108d490613a50565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190613930565b50909350600292506121a9915050565b8160048111156121bb576121bb613997565b146122165760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b60648201526084016108d4565b856122585760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b60448201526064016108d4565b60008881526003602052604081205460028054909190811061227c5761227c6138c5565b9060005260206000209060050201905080600101548611156122d75760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b60448201526064016108d4565b805460009082906122ea906001906138f1565b815481106122fa576122fa6138c5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600d9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123799190613930565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156123d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f89190613c88565b505050505091505060005b8a81101561266a5733848d8d8481811061241f5761241f6138c5565b9050602002013581548110612436576124366138c5565b60009182526020909120600490910201546001600160a01b03161461246d5760405162461bcd60e51b81526004016108d490613bb9565b8115806124e0575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106124b5576124b56138c5565b90506020020135815481106124cc576124cc6138c5565b906000526020600020906004020160010154145b6125525760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e00000060648201526084016108d4565b838c8c83818110612565576125656138c5565b905060200201358154811061257c5761257c6138c5565b600091825260209091206003600490920201015460ff16156125d55760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b60448201526064016108d4565b89848d8d848181106125e9576125e96138c5565b9050602002013581548110612600576126006138c5565b60009182526020909120600260049092020101556001848d8d84818110612629576126296138c5565b9050602002013581548110612640576126406138c5565b60009182526020909120600490910201600301805460ff1916911515919091179055600101612403565b508a8a90508360040160008282546126829190613a3d565b90915550506000898152600284016020526040812080548c92906126a7908490613a3d565b9091555050600183015489036126d657600383015460ff16156126d15760038301805460ff191690555b61274f565b60018301546000908152600284016020526040808220548b83529120540361271857600383015460ff166126d15760038301805460ff1916600117905561274f565b60018301546000908152600284016020526040808220548b8352912054111561274f576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161278e93929190613cf2565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146127ce5760405162461bcd60e51b81526004016108d490613c46565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a8152602001908152602001600020548154811061281e5761281e6138c5565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612852576128526138c5565b90600052602060002090600d02016000018781548110612874576128746138c5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146128e05760405162461bcd60e51b81526004016108d490613d22565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad20161296b858783613db6565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190613aab565b6129f091906138f1565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600d909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612a79908a908a908a90613e76565b60405180910390a25050505050505050565b600083815260036020526040812054600280548392908110612aaf57612aaf6138c5565b60009182526020808320878452600360059093020191820190526040822054815491935083918110612ae357612ae36138c5565b90600052602060002090600d02016000018481548110612b0557612b056138c5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612b535760405162461bcd60e51b81526004016108d490613d22565b600083815260036020526040902054600280548592908110612b7757612b776138c5565b600091825260209091206002600590920201015460ff1615612bab5760405162461bcd60e51b81526004016108d490613a50565b600084815260036020526040812054600280549091908110612bcf57612bcf6138c5565b60009182526020822060059091020180549092508290612bf1906001906138f1565b81548110612c0157612c016138c5565b90600052602060002090600d020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8a9190613eac565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613930565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d859190613eac565b9650612d92848a89613066565b15612e2f57604080516080810182526001600160a01b03808a1680835260006020808501828152858701838152606087018481528c5460018181018f558e8752858720995160049092029099018054919098166001600160a01b0319909116178755915186880155516002860155516003909401805494151560ff19958616179055918152600c8901909152929092208054909216179055612e34565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612e6457612e646138c5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612e9857612e986138c5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600d93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1b91906139c8565b5091509150826004015460001480612f4a575080158015612f4a57506000828152600284016020526040902054155b15612f5c576000945050505050612f8d565b8015612f71575050600401549150612f8d9050565b506000908152600290910160205260409020549150612f8d9050565b92915050565b6000546001600160a01b03163314612fbd5760405162461bcd60e51b81526004016108d490613c46565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b61300b613322565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b6000546001600160a01b031633146130635760405162461bcd60e51b81526004016108d490613c46565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d89190613930565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015613137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315b9190613aab565b61316591906138f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa1580156131a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131ce9190810190613f5c565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561322a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324e9190613eac565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa1580156132a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c9919061403d565b50509150915082816132db9190613a3d565b60045490831015955060ff16156133175784801561331457506001600160a01b0386166000908152600c8901602052604090205460ff16155b94505b505050509392505050565b61332a613349565b61334757604051631afcd79f60e31b815260040160405180910390fd5b565b6000613353612fdf565b54600160401b900460ff16919050565b60006020828403121561337557600080fd5b5035919050565b6001600160a01b038116811461306357600080fd5b600080600080608085870312156133a757600080fd5b8435935060208501356133b98161337c565b93969395505050506040820135916060013590565b600080604083850312156133e157600080fd5b82356133ec8161337c565b915060208301356133fc8161337c565b809150509250929050565b6000806040838503121561341a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561346257613462613429565b60405290565b604051601f8201601f191681016001600160401b038111828210171561349057613490613429565b604052919050565b60006001600160401b038311156134b1576134b1613429565b6134c4601f8401601f1916602001613468565b90508281528383830111156134d857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261350057600080fd5b61350f83833560208501613498565b9392505050565b6000806040838503121561352957600080fd5b82356135348161337c565b915060208301356001600160401b0381111561354f57600080fd5b61355b858286016134ef565b9150509250929050565b60005b83811015613580578181015183820152602001613568565b50506000910152565b600081518084526135a1816020860160208601613565565b601f01601f19169290920160200192915050565b60208152600061350f6020830184613589565b8381528215156020820152606060408201526000611ecf6060830184613589565b60008083601f8401126135fb57600080fd5b5081356001600160401b0381111561361257600080fd5b6020830191508360208260051b850101111561362d57600080fd5b9250929050565b6000806000806060858703121561364a57600080fd5b8435935060208501356001600160401b0381111561366757600080fd5b613673878288016135e9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156136be578351835292840192918401916001016136a2565b50909695505050505050565b600080600080600060a086880312156136e257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561371a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561374657600080fd5b83356137518161337c565b92506020840135915060408401356001600160401b0381111561377357600080fd5b61377f868287016134ef565b9150509250925092565b60008060008060008060a087890312156137a257600080fd5b8635955060208701356001600160401b03808211156137c057600080fd5b6137cc8a838b016135e9565b9097509550604089013594506060890135935060808901359150808211156137f357600080fd5b508701601f8101891361380557600080fd5b61381489823560208401613498565b9150509295509295509295565b60006020828403121561383357600080fd5b813561350f8161337c565b60008060008060006080868803121561385657600080fd5b853594506020860135935060408601356001600160401b038082111561387b57600080fd5b818801915088601f83011261388f57600080fd5b81358181111561389e57600080fd5b8960208285010111156138b057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f8d57612f8d6138db565b80516001600160601b038116811461391b57600080fd5b919050565b8051801515811461391b57600080fd5b600080600080600060a0868803121561394857600080fd5b61395186613904565b945060208601516139618161337c565b60408701519094506005811061397657600080fd5b925061398460608701613920565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156139bf57600080fd5b61350f82613920565b6000806000606084860312156139dd57600080fd5b835192506139ed60208501613920565b91506139fb60408501613920565b90509250925092565b8082028115828204841417612f8d57612f8d6138db565b600082613a3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612f8d57612f8d6138db565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b60008060408385031215613a9a57600080fd5b505080516020909101519092909150565b600060208284031215613abd57600080fd5b5051919050565b600181811c90821680613ad857607f821691505b602082108103613af857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208460208401526060604084015260008454613b1f81613ac4565b8060608701526080600180841660008114613b415760018114613b5d57613b8d565b60ff19851660808a0152608084151560051b8a01019550613b8d565b89600052602060002060005b85811015613b845781548b8201860152908301908801613b69565b8a016080019650505b50939a9950505050505050505050565b60008251613baf818460208701613565565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613c0957600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613c36604083018587613bf0565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ca357600080fd5b613cac88613904565b9650613cba60208901613920565b955060408801519450606088015193506080880151925060a08801519150613ce460c08901613920565b905092959891949750929550565b604081526000613d06604083018587613bf0565b8281036020840152613d188185613589565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f8211156118a1576000816000526020600020601f850160051c81016020861015613d8f5750805b601f850160051c820191505b81811015613dae57828155600101613d9b565b505050505050565b6001600160401b03831115613dcd57613dcd613429565b613de183613ddb8354613ac4565b83613d66565b6000601f841160018114613e155760008515613dfd5750838201355b600019600387901b1c1916600186901b178355613e6f565b600083815260209020601f19861690835b82811015613e465786850135825560209485019460019092019101613e26565b5086821015613e635760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ebe57600080fd5b815161350f8161337c565b600082601f830112613eda57600080fd5b815160206001600160401b03821115613ef557613ef5613429565b8160051b613f04828201613468565b9283528481018201928281019087851115613f1e57600080fd5b83870192505b84831015613f46578251613f378161337c565b82529183019190830190613f24565b979650505050505050565b805161391b8161337c565b600060208284031215613f6e57600080fd5b81516001600160401b0380821115613f8557600080fd5b908301906101608286031215613f9a57600080fd5b613fa261343f565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613fea57600080fd5b613ff687828601613ec9565b60c08301525060e0838101519082015261010080840151908201526101209150614021828401613f51565b9181019190915261014091820151918101919091529392505050565b6000806000806080858703121561405357600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220dbc0f07975f24862ef29107d65fe042a587199d6ad1f6756f0fbf8ad88bad54664736f6c63430008180033", @@ -1276,7 +1276,7 @@ "storageLayout": { "storage": [ { - "astId": 19346, + "astId": 19069, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "governor", "offset": 0, @@ -1284,7 +1284,7 @@ "type": "t_address" }, { - "astId": 19349, + "astId": 19072, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "core", "offset": 0, @@ -1292,15 +1292,15 @@ "type": "t_contract(KlerosCore)8475" }, { - "astId": 19353, + "astId": 19076, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "disputes", "offset": 0, "slot": "2", - "type": "t_array(t_struct(Dispute)19281_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)19004_storage)dyn_storage" }, { - "astId": 19357, + "astId": 19080, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreDisputeIDToLocal", "offset": 0, @@ -1308,7 +1308,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 19359, + "astId": 19082, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "singleDrawPerJuror", "offset": 0, @@ -1322,20 +1322,20 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Dispute)19281_storage)dyn_storage": { - "base": "t_struct(Dispute)19281_storage", + "t_array(t_struct(Dispute)19004_storage)dyn_storage": { + "base": "t_struct(Dispute)19004_storage", "encoding": "dynamic_array", "label": "struct DisputeKitClassicBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)19323_storage)dyn_storage": { - "base": "t_struct(Round)19323_storage", + "t_array(t_struct(Round)19046_storage)dyn_storage": { + "base": "t_struct(Round)19046_storage", "encoding": "dynamic_array", "label": "struct DisputeKitClassicBase.Round[]", "numberOfBytes": "32" }, - "t_array(t_struct(Vote)19332_storage)dyn_storage": { - "base": "t_struct(Vote)19332_storage", + "t_array(t_struct(Vote)19055_storage)dyn_storage": { + "base": "t_struct(Vote)19055_storage", "encoding": "dynamic_array", "label": "struct DisputeKitClassicBase.Vote[]", "numberOfBytes": "32" @@ -1394,20 +1394,20 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Dispute)19281_storage": { + "t_struct(Dispute)19004_storage": { "encoding": "inplace", "label": "struct DisputeKitClassicBase.Dispute", "members": [ { - "astId": 19270, + "astId": 18993, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "rounds", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Round)19323_storage)dyn_storage" + "type": "t_array(t_struct(Round)19046_storage)dyn_storage" }, { - "astId": 19272, + "astId": 18995, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "numberOfChoices", "offset": 0, @@ -1415,7 +1415,7 @@ "type": "t_uint256" }, { - "astId": 19274, + "astId": 18997, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "jumped", "offset": 0, @@ -1423,7 +1423,7 @@ "type": "t_bool" }, { - "astId": 19278, + "astId": 19001, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreRoundIDToLocal", "offset": 0, @@ -1431,7 +1431,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 19280, + "astId": 19003, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "extraData", "offset": 0, @@ -1441,20 +1441,20 @@ ], "numberOfBytes": "160" }, - "t_struct(Round)19323_storage": { + "t_struct(Round)19046_storage": { "encoding": "inplace", "label": "struct DisputeKitClassicBase.Round", "members": [ { - "astId": 19285, + "astId": 19008, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "votes", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Vote)19332_storage)dyn_storage" + "type": "t_array(t_struct(Vote)19055_storage)dyn_storage" }, { - "astId": 19287, + "astId": 19010, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "winningChoice", "offset": 0, @@ -1462,7 +1462,7 @@ "type": "t_uint256" }, { - "astId": 19291, + "astId": 19014, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "counts", "offset": 0, @@ -1470,7 +1470,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 19293, + "astId": 19016, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "tied", "offset": 0, @@ -1478,7 +1478,7 @@ "type": "t_bool" }, { - "astId": 19295, + "astId": 19018, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalVoted", "offset": 0, @@ -1486,7 +1486,7 @@ "type": "t_uint256" }, { - "astId": 19297, + "astId": 19020, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalCommitted", "offset": 0, @@ -1494,7 +1494,7 @@ "type": "t_uint256" }, { - "astId": 19301, + "astId": 19024, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "paidFees", "offset": 0, @@ -1502,7 +1502,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 19305, + "astId": 19028, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "hasPaid", "offset": 0, @@ -1510,7 +1510,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 19311, + "astId": 19034, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "contributions", "offset": 0, @@ -1518,7 +1518,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 19313, + "astId": 19036, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "feeRewards", "offset": 0, @@ -1526,7 +1526,7 @@ "type": "t_uint256" }, { - "astId": 19316, + "astId": 19039, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "fundedChoices", "offset": 0, @@ -1534,7 +1534,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 19318, + "astId": 19041, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "nbVotes", "offset": 0, @@ -1542,7 +1542,7 @@ "type": "t_uint256" }, { - "astId": 19322, + "astId": 19045, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "alreadyDrawn", "offset": 0, @@ -1552,12 +1552,12 @@ ], "numberOfBytes": "416" }, - "t_struct(Vote)19332_storage": { + "t_struct(Vote)19055_storage": { "encoding": "inplace", "label": "struct DisputeKitClassicBase.Vote", "members": [ { - "astId": 19325, + "astId": 19048, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "account", "offset": 0, @@ -1565,7 +1565,7 @@ "type": "t_address" }, { - "astId": 19327, + "astId": 19050, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "commit", "offset": 0, @@ -1573,7 +1573,7 @@ "type": "t_bytes32" }, { - "astId": 19329, + "astId": 19052, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "choice", "offset": 0, @@ -1581,7 +1581,7 @@ "type": "t_uint256" }, { - "astId": 19331, + "astId": 19054, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "voted", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json index a05e4e28f..ccc8a1383 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + "address": "0x2246821E1313A93e2F8CdF7a3422d078f560b457", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x43b208edcf6fd040290b8ef44cd6da0f54b13515af861fb68acd7ea4255f9464", + "transactionHash": "0xf5b19a72c51e016b4baa80e54c9e35ad9ff413f2a2f3a0d3460807ac2e1fef71", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x9426F127116C3652A262AE1eA48391AC8F44D35b", - "transactionIndex": 1, - "gasUsed": "4175167", - "logsBloom": "0x00000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000002000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x242d1c89de54e1756d61bf0ed70cd5a495cc526ad94987ee7085e719c60d3562", - "transactionHash": "0x43b208edcf6fd040290b8ef44cd6da0f54b13515af861fb68acd7ea4255f9464", + "contractAddress": "0x2246821E1313A93e2F8CdF7a3422d078f560b457", + "transactionIndex": 3, + "gasUsed": "178371", + "logsBloom": "0x00000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000400000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000400000000000000000000000", + "blockHash": "0xc968ac57b13fa2e75922520f1cda70a21893354795661b2dacd28169113238ef", + "transactionHash": "0xf5b19a72c51e016b4baa80e54c9e35ad9ff413f2a2f3a0d3460807ac2e1fef71", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3638835, - "transactionHash": "0x43b208edcf6fd040290b8ef44cd6da0f54b13515af861fb68acd7ea4255f9464", - "address": "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + "transactionIndex": 3, + "blockNumber": 141215195, + "transactionHash": "0xf5b19a72c51e016b4baa80e54c9e35ad9ff413f2a2f3a0d3460807ac2e1fef71", + "address": "0x2246821E1313A93e2F8CdF7a3422d078f560b457", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0x242d1c89de54e1756d61bf0ed70cd5a495cc526ad94987ee7085e719c60d3562" + "blockHash": "0xc968ac57b13fa2e75922520f1cda70a21893354795661b2dacd28169113238ef" } ], - "blockNumber": 3638835, - "cumulativeGasUsed": "4175167", + "blockNumber": 141215195, + "cumulativeGasUsed": "271619", "status": 1, "byzantium": true }, "args": [ - "0x692CC78F2570181FFB99297965FeAA8352ab12E8", + "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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": "c66a072bc17d18807b6e81f338ff0fab", + "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\":\"DisputeKitClassicProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122094a1c38a583896452ce447160bc2955480b6ba6592457d7be641c34e4339d47264736f6c63430008180033", "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/arbitrumSepoliaDevnet/DisputeResolver.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json index c8d97fa64..b71da3a87 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json @@ -1,5 +1,5 @@ { - "address": "0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61", + "address": "0x524C5541f440204E0B4577334c439277018F971f", "abi": [ { "inputs": [ @@ -292,31 +292,31 @@ "type": "function" } ], - "transactionHash": "0x5e6e476d58c97fd8b57b9ef6fe7a5e6f3a453ac54a78e2e2218f83b81f05e47a", + "transactionHash": "0x71a94b840ca3bf1901e76986788f114d9ed205b39f35c7867280ad8b68ecf63b", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61", - "transactionIndex": 1, - "gasUsed": "955105", + "contractAddress": "0x524C5541f440204E0B4577334c439277018F971f", + "transactionIndex": 4, + "gasUsed": "899678", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7a4e485821c0a73e5f01f3811d2b631c58090089c99af140430bcf292af889b5", - "transactionHash": "0x5e6e476d58c97fd8b57b9ef6fe7a5e6f3a453ac54a78e2e2218f83b81f05e47a", + "blockHash": "0x9246f77739413a65ddae101a55a18b8595903d038e4497a9281a252cffa01c2a", + "transactionHash": "0x71a94b840ca3bf1901e76986788f114d9ed205b39f35c7867280ad8b68ecf63b", "logs": [], - "blockNumber": 89386137, - "cumulativeGasUsed": "955105", + "blockNumber": 141215329, + "cumulativeGasUsed": "1566661", "status": 1, "byzantium": true }, "args": [ - "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - "0x596D3B09E684D62217682216e9b7a0De75933391" + "0x4838e31E0ea315232c431598110FE677cAF2D6E6", + "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a" ], "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": "c66a072bc17d18807b6e81f338ff0fab", + "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\\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\":\"0xce0847bc69f5cba3758e26b60264b974a5f8fe94f103ffe22a54c9e2e1b184e1\",\"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": "0x608060405234801561001057600080fd5b50604051610ed7380380610ed783398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e0b806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea26469706673582212209f6fd300efc0931e75ea94b92e69ff22ff5fa768d324c99b1e01c4e372d71a7664736f6c63430008180033", + "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea26469706673582212209f6fd300efc0931e75ea94b92e69ff22ff5fa768d324c99b1e01c4e372d71a7664736f6c63430008180033", "devdoc": { "events": { "DisputeRequest(address,uint256,uint256,uint256,string)": { @@ -394,7 +394,7 @@ "storageLayout": { "storage": [ { - "astId": 97, + "astId": 16525, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "governor", "offset": 0, @@ -402,31 +402,31 @@ "type": "t_address" }, { - "astId": 100, + "astId": 16528, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitrator", "offset": 0, "slot": "1", - "type": "t_contract(IArbitratorV2)644" + "type": "t_contract(IArbitratorV2)22692" }, { - "astId": 103, + "astId": 16531, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "templateRegistry", "offset": 0, "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)670" + "type": "t_contract(IDisputeTemplateRegistry)22863" }, { - "astId": 107, + "astId": 16535, "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)16523_storage)dyn_storage" }, { - "astId": 111, + "astId": 16539, "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)16523_storage)dyn_storage": { + "base": "t_struct(DisputeStruct)16523_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)22692": { "encoding": "inplace", "label": "contract IArbitratorV2", "numberOfBytes": "20" }, - "t_contract(IDisputeTemplateRegistry)670": { + "t_contract(IDisputeTemplateRegistry)22863": { "encoding": "inplace", "label": "contract IDisputeTemplateRegistry", "numberOfBytes": "20" @@ -473,12 +473,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(DisputeStruct)95_storage": { + "t_struct(DisputeStruct)16523_storage": { "encoding": "inplace", "label": "struct DisputeResolver.DisputeStruct", "members": [ { - "astId": 88, + "astId": 16516, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitratorExtraData", "offset": 0, @@ -486,7 +486,7 @@ "type": "t_bytes_storage" }, { - "astId": 90, + "astId": 16518, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "isRuled", "offset": 0, @@ -494,7 +494,7 @@ "type": "t_bool" }, { - "astId": 92, + "astId": 16520, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "ruling", "offset": 0, @@ -502,7 +502,7 @@ "type": "t_uint256" }, { - "astId": 94, + "astId": 16522, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "numberOfRulingOptions", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverNeo.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverNeo.json deleted file mode 100644 index 666b192eb..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverNeo.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C", - "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" - } - ], - "transactionHash": "0xa1b97a69d7a1eca8b7daa0eb852597841b4cde3bac1015a796c5dd166b7beb0e", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C", - "transactionIndex": 1, - "gasUsed": "945706", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x00821c6a710258d7c0ef9c9a7592eab2929f3c0c2f43b8dff9dad28547605152", - "transactionHash": "0xa1b97a69d7a1eca8b7daa0eb852597841b4cde3bac1015a796c5dd166b7beb0e", - "logs": [], - "blockNumber": 89388450, - "cumulativeGasUsed": "945706", - "status": 1, - "byzantium": true - }, - "args": [ - "0x26bf077037550e437605F07e25EfcAd510715C3A", - "0x596D3B09E684D62217682216e9b7a0De75933391" - ], - "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", - "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’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_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’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "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 - }, - "storageLayout": { - "storage": [ - { - "astId": 97, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 100, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)644" - }, - { - "astId": 103, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)670" - }, - { - "astId": 107, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)95_storage)dyn_storage" - }, - { - "astId": 111, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)95_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)95_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)644": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)670": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)95_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 88, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 90, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 92, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 94, - "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json deleted file mode 100644 index 83af63ef8..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json +++ /dev/null @@ -1,522 +0,0 @@ -{ - "address": "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", - "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" - } - ], - "transactionHash": "0x5f05cc29d52127cbc6f1e97efafec74eae530e82c06d09319b3cb03749e82da8", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", - "transactionIndex": 2, - "gasUsed": "933964", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe785eea7a8d2346a671a4761f9d5855e1eecaf96df476e09f3829526fdf8912b", - "transactionHash": "0x5f05cc29d52127cbc6f1e97efafec74eae530e82c06d09319b3cb03749e82da8", - "logs": [], - "blockNumber": 89386784, - "cumulativeGasUsed": "1027627", - "status": 1, - "byzantium": true - }, - "args": [ - "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "0x596D3B09E684D62217682216e9b7a0De75933391" - ], - "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\":\"DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/DisputeResolverRuler.sol\":\"DisputeResolverRuler\"},\"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/devtools/DisputeResolverRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {DisputeResolver, IArbitratorV2, IDisputeTemplateRegistry} from \\\"../arbitrables/DisputeResolver.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\ninterface IKlerosCoreRulerFragment {\\n function getNextDisputeID() external view returns (uint256);\\n}\\n\\n/// @title DisputeResolverRuler\\n/// It extends DisputeResolver for testing purposes of the automatic ruling modes.\\n/// The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\\ncontract DisputeResolverRuler is DisputeResolver {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n IDisputeTemplateRegistry _templateRegistry\\n ) DisputeResolver(_arbitrator, _templateRegistry) {\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\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 override returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n uint256 localDisputeID = disputes.length;\\n DisputeStruct storage dispute = disputes.push();\\n dispute.arbitratorExtraData = _arbitratorExtraData;\\n dispute.numberOfRulingOptions = _numberOfRulingOptions;\\n\\n // Keep track of the upcoming dispute ID before dispute creation, so rule() can be called immediately after.\\n arbitratorDisputeID = IKlerosCoreRulerFragment(address(arbitrator)).getNextDisputeID();\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n\\n arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n }\\n}\\n\",\"keccak256\":\"0x310d715738bcb1210bb6094787f6c6cc8032664f9484e2137106474b749ff273\",\"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": "0x608060405234801561000f575f80fd5b50604051610e85380380610e8583398101604081905261002e91610088565b5f8054600180546001600160a01b03199081166001600160a01b0396871617909155600280548216949095169390931790935591811633918216171790556100c0565b6001600160a01b0381168114610085575f80fd5b50565b5f8060408385031215610099575f80fd5b82516100a481610071565b60208401519092506100b581610071565b809150509250929050565b610db8806100cd5f395ff3fe60806040526004361061009a575f3560e01c8063908bb29511610062578063908bb29514610167578063a0af81f014610188578063dc653511146101a7578063e09997d9146101ba578063e4c0aaf4146101e5578063fc548f0814610204575f80fd5b80630c340a241461009e578063311a6c56146100d95780634660ebbe146100fa578063564a565d146101195780636cc6cde114610148575b5f80fd5b3480156100a9575f80fd5b505f546100bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e4575f80fd5b506100f86100f336600461089e565b610223565b005b348015610105575f80fd5b506100f86101143660046108d5565b6103c1565b348015610124575f80fd5b506101386101333660046108f7565b61040c565b6040516100d09493929190610951565b348015610153575f80fd5b506001546100bc906001600160a01b031681565b61017a6101753660046109c4565b6104d3565b6040519081526020016100d0565b348015610193575f80fd5b506002546100bc906001600160a01b031681565b61017a6101b5366004610a46565b61053e565b3480156101c5575f80fd5b5061017a6101d43660046108f7565b60046020525f908152604090205481565b3480156101f0575f80fd5b506100f86101ff3660046108d5565b61059b565b34801561020f575f80fd5b506100f861021e3660046108d5565b6105e5565b5f82815260046020526040812054600380549192918390811061024857610248610b4a565b5f918252602090912060015460049092020191506001600160a01b031633146102c65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561030c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102bd565b600181015460ff161561036d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102bd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b5f546001600160a01b031633146103ea5760405162461bcd60e51b81526004016102bd90610b5e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061041b575f80fd5b905f5260205f2090600402015f91509050805f01805461043a90610ba0565b80601f016020809104026020016040519081016040528092919081815260200182805461046690610ba0565b80156104b15780601f10610488576101008083540402835291602001916104b1565b820191905f5260205f20905b81548152906001019060200180831161049457829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b5f610534868660405180602001604052805f81525060405180602001604052805f81525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250610630915050565b9695505050505050565b5f610590878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525060408051602081019091529081528a93509150889050610630565b979650505050505050565b5f546001600160a01b031633146105c45760405162461bcd60e51b81526004016102bd90610b5e565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461060e5760405162461bcd60e51b81526004016102bd90610b5e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001821161068d5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102bd565b600380546001810182555f91909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106ce898b83610c24565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa15801561071e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107429190610cde565b5f81815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a99417491610789918c918c9101610cf5565b6020604051808303815f875af11580156107a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c99190610cde565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061081190879086908c90610d2f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e190349061084f9089908f908f90600401610d4d565b60206040518083038185885af115801561086b573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906108909190610cde565b505050509695505050505050565b5f80604083850312156108af575f80fd5b50508035926020909101359150565b6001600160a01b03811681146108d2575f80fd5b50565b5f602082840312156108e5575f80fd5b81356108f0816108be565b9392505050565b5f60208284031215610907575f80fd5b5035919050565b5f81518084525f5b8181101561093257602081850181015186830182015201610916565b505f602082860101526020601f19601f83011685010191505092915050565b608081525f610963608083018761090e565b9415156020830152506040810192909252606090910152919050565b5f8083601f84011261098f575f80fd5b50813567ffffffffffffffff8111156109a6575f80fd5b6020830191508360208285010111156109bd575f80fd5b9250929050565b5f805f805f606086880312156109d8575f80fd5b853567ffffffffffffffff808211156109ef575f80fd5b6109fb89838a0161097f565b90975095506020880135915080821115610a13575f80fd5b50610a208882890161097f565b96999598509660400135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f8060808789031215610a5b575f80fd5b863567ffffffffffffffff80821115610a72575f80fd5b610a7e8a838b0161097f565b90985096506020890135915080821115610a96575f80fd5b610aa28a838b0161097f565b90965094506040890135915080821115610aba575f80fd5b818901915089601f830112610acd575f80fd5b813581811115610adf57610adf610a32565b604051601f8201601f19908116603f01168101908382118183101715610b0757610b07610a32565b816040528281528c6020848701011115610b1f575f80fd5b826020860160208301375f602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bb457607f821691505b602082108103610bd257634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115610c1f57805f5260205f20601f840160051c81016020851015610bfd5750805b601f840160051c820191505b81811015610c1c575f8155600101610c09565b50505b505050565b67ffffffffffffffff831115610c3c57610c3c610a32565b610c5083610c4a8354610ba0565b83610bd8565b5f601f841160018114610c81575f8515610c6a5750838201355b5f19600387901b1c1916600186901b178355610c1c565b5f83815260208120601f198716915b82811015610cb05786850135825560209485019460019092019101610c90565b5086821015610ccc575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f60208284031215610cee575f80fd5b5051919050565b606081525f6060820152608060208201525f610d14608083018561090e565b8281036040840152610d26818561090e565b95945050505050565b838152826020820152606060408201525f610d26606083018461090e565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f191601019291505056fea2646970667358221220705fa88157ab9023bb07a33a463cb61066b2e8f1fa8a7143c709595a873d336c64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009a575f3560e01c8063908bb29511610062578063908bb29514610167578063a0af81f014610188578063dc653511146101a7578063e09997d9146101ba578063e4c0aaf4146101e5578063fc548f0814610204575f80fd5b80630c340a241461009e578063311a6c56146100d95780634660ebbe146100fa578063564a565d146101195780636cc6cde114610148575b5f80fd5b3480156100a9575f80fd5b505f546100bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e4575f80fd5b506100f86100f336600461089e565b610223565b005b348015610105575f80fd5b506100f86101143660046108d5565b6103c1565b348015610124575f80fd5b506101386101333660046108f7565b61040c565b6040516100d09493929190610951565b348015610153575f80fd5b506001546100bc906001600160a01b031681565b61017a6101753660046109c4565b6104d3565b6040519081526020016100d0565b348015610193575f80fd5b506002546100bc906001600160a01b031681565b61017a6101b5366004610a46565b61053e565b3480156101c5575f80fd5b5061017a6101d43660046108f7565b60046020525f908152604090205481565b3480156101f0575f80fd5b506100f86101ff3660046108d5565b61059b565b34801561020f575f80fd5b506100f861021e3660046108d5565b6105e5565b5f82815260046020526040812054600380549192918390811061024857610248610b4a565b5f918252602090912060015460049092020191506001600160a01b031633146102c65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561030c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102bd565b600181015460ff161561036d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102bd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b5f546001600160a01b031633146103ea5760405162461bcd60e51b81526004016102bd90610b5e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061041b575f80fd5b905f5260205f2090600402015f91509050805f01805461043a90610ba0565b80601f016020809104026020016040519081016040528092919081815260200182805461046690610ba0565b80156104b15780601f10610488576101008083540402835291602001916104b1565b820191905f5260205f20905b81548152906001019060200180831161049457829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b5f610534868660405180602001604052805f81525060405180602001604052805f81525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250610630915050565b9695505050505050565b5f610590878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525060408051602081019091529081528a93509150889050610630565b979650505050505050565b5f546001600160a01b031633146105c45760405162461bcd60e51b81526004016102bd90610b5e565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461060e5760405162461bcd60e51b81526004016102bd90610b5e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001821161068d5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102bd565b600380546001810182555f91909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106ce898b83610c24565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa15801561071e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107429190610cde565b5f81815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a99417491610789918c918c9101610cf5565b6020604051808303815f875af11580156107a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c99190610cde565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061081190879086908c90610d2f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e190349061084f9089908f908f90600401610d4d565b60206040518083038185885af115801561086b573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906108909190610cde565b505050509695505050505050565b5f80604083850312156108af575f80fd5b50508035926020909101359150565b6001600160a01b03811681146108d2575f80fd5b50565b5f602082840312156108e5575f80fd5b81356108f0816108be565b9392505050565b5f60208284031215610907575f80fd5b5035919050565b5f81518084525f5b8181101561093257602081850181015186830182015201610916565b505f602082860101526020601f19601f83011685010191505092915050565b608081525f610963608083018761090e565b9415156020830152506040810192909252606090910152919050565b5f8083601f84011261098f575f80fd5b50813567ffffffffffffffff8111156109a6575f80fd5b6020830191508360208285010111156109bd575f80fd5b9250929050565b5f805f805f606086880312156109d8575f80fd5b853567ffffffffffffffff808211156109ef575f80fd5b6109fb89838a0161097f565b90975095506020880135915080821115610a13575f80fd5b50610a208882890161097f565b96999598509660400135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f8060808789031215610a5b575f80fd5b863567ffffffffffffffff80821115610a72575f80fd5b610a7e8a838b0161097f565b90985096506020890135915080821115610a96575f80fd5b610aa28a838b0161097f565b90965094506040890135915080821115610aba575f80fd5b818901915089601f830112610acd575f80fd5b813581811115610adf57610adf610a32565b604051601f8201601f19908116603f01168101908382118183101715610b0757610b07610a32565b816040528281528c6020848701011115610b1f575f80fd5b826020860160208301375f602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bb457607f821691505b602082108103610bd257634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115610c1f57805f5260205f20601f840160051c81016020851015610bfd5750805b601f840160051c820191505b81811015610c1c575f8155600101610c09565b50505b505050565b67ffffffffffffffff831115610c3c57610c3c610a32565b610c5083610c4a8354610ba0565b83610bd8565b5f601f841160018114610c81575f8515610c6a5750838201355b5f19600387901b1c1916600186901b178355610c1c565b5f83815260208120601f198716915b82811015610cb05786850135825560209485019460019092019101610c90565b5086821015610ccc575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f60208284031215610cee575f80fd5b5051919050565b606081525f6060820152608060208201525f610d14608083018561090e565b8281036040840152610d26818561090e565b95945050505050565b838152826020820152606060408201525f610d26606083018461090e565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f191601019291505056fea2646970667358221220705fa88157ab9023bb07a33a463cb61066b2e8f1fa8a7143c709595a873d336c64736f6c63430008180033", - "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’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_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’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, - "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", - "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." - } - } - }, - "title": "DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 97, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 100, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitrator", - "offset": 0, - "slot": "1", - "type": "t_contract(IArbitratorV2)644" - }, - { - "astId": 103, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "templateRegistry", - "offset": 0, - "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)670" - }, - { - "astId": 107, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(DisputeStruct)95_storage)dyn_storage" - }, - { - "astId": 111, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitratorDisputeIDToLocalID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(DisputeStruct)95_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)95_storage", - "encoding": "dynamic_array", - "label": "struct DisputeResolver.DisputeStruct[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_storage": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_contract(IArbitratorV2)644": { - "encoding": "inplace", - "label": "contract IArbitratorV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeTemplateRegistry)670": { - "encoding": "inplace", - "label": "contract IDisputeTemplateRegistry", - "numberOfBytes": "20" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DisputeStruct)95_storage": { - "encoding": "inplace", - "label": "struct DisputeResolver.DisputeStruct", - "members": [ - { - "astId": 88, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "arbitratorExtraData", - "offset": 0, - "slot": "0", - "type": "t_bytes_storage" - }, - { - "astId": 90, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "isRuled", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 92, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "ruling", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 94, - "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", - "label": "numberOfRulingOptions", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "numberOfBytes": "128" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json index 3ff100710..01e1550c4 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x596D3B09E684D62217682216e9b7a0De75933391", + "address": "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", "abi": [ { "stateMutability": "payable", @@ -257,49 +257,51 @@ "type": "constructor" } ], - "transactionHash": "0x8c2dced9ed139bc917e2ade113d031a438e66a069c9a9014d2aef333dd4eda3e", + "transactionHash": "0x5beebc57cd875a210eeda1dc1056a22c5410bf6b6cb5232034c35b4813dacc4b", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x596D3B09E684D62217682216e9b7a0De75933391", - "transactionIndex": 1, - "gasUsed": "4181458", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7c30329f6408ee776e597cbad90a95cf8534390a6b8574e18ac295ca5355e2a8", - "transactionHash": "0x8c2dced9ed139bc917e2ade113d031a438e66a069c9a9014d2aef333dd4eda3e", + "contractAddress": "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", + "transactionIndex": 4, + "gasUsed": "175413", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb04a87683c6ed7a0e84419b51f5cfcb8071cf8e7557f363fc29d890c311bf31c", + "transactionHash": "0x5beebc57cd875a210eeda1dc1056a22c5410bf6b6cb5232034c35b4813dacc4b", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3639191, - "transactionHash": "0x8c2dced9ed139bc917e2ade113d031a438e66a069c9a9014d2aef333dd4eda3e", - "address": "0x596D3B09E684D62217682216e9b7a0De75933391", + "transactionIndex": 4, + "blockNumber": 141215321, + "transactionHash": "0x5beebc57cd875a210eeda1dc1056a22c5410bf6b6cb5232034c35b4813dacc4b", + "address": "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x7c30329f6408ee776e597cbad90a95cf8534390a6b8574e18ac295ca5355e2a8" + "logIndex": 11, + "blockHash": "0xb04a87683c6ed7a0e84419b51f5cfcb8071cf8e7557f363fc29d890c311bf31c" } ], - "blockNumber": 3639191, - "cumulativeGasUsed": "4181458", + "blockNumber": 141215321, + "cumulativeGasUsed": "449841", "status": 1, "byzantium": true }, "args": [ - "0xc53b813ed94AaEb6F5518D60bf6a8109954bE3f6", + "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 3, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", "execute": { - "methodName": "initialize2", - "args": [] + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59" + ] }, - "implementation": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", + "implementation": "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json index fa748958f..55acdb466 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", + "address": "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", "abi": [ { "inputs": [], @@ -238,38 +238,38 @@ "type": "function" } ], - "transactionHash": "0xfcfcd796c92c353ec1e5703f99473172a679d3956ff18fb613d89343f88fbe8d", + "transactionHash": "0xa32a2a5ad3da13d72198b5db82cdb3c51241eb09971676fb886332347f10dd13", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", - "transactionIndex": 3, + "contractAddress": "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", + "transactionIndex": 2, "gasUsed": "636291", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000004020000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa976868bf2ad2f6482666d223bd0981eb42e949fa1745bde379f2144a191ffb8", - "transactionHash": "0xfcfcd796c92c353ec1e5703f99473172a679d3956ff18fb613d89343f88fbe8d", + "logsBloom": "0x00000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000008000000000000000000000000000000000000000000020", + "blockHash": "0xe107786f8ce117fb136efdb3c163f28f47a07eafcd1c6a6f546ef726ee44f044", + "transactionHash": "0xa32a2a5ad3da13d72198b5db82cdb3c51241eb09971676fb886332347f10dd13", "logs": [ { - "transactionIndex": 3, - "blockNumber": 139232310, - "transactionHash": "0xfcfcd796c92c353ec1e5703f99473172a679d3956ff18fb613d89343f88fbe8d", - "address": "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", + "transactionIndex": 2, + "blockNumber": 141215312, + "transactionHash": "0xa32a2a5ad3da13d72198b5db82cdb3c51241eb09971676fb886332347f10dd13", + "address": "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 1, - "blockHash": "0xa976868bf2ad2f6482666d223bd0981eb42e949fa1745bde379f2144a191ffb8" + "blockHash": "0xe107786f8ce117fb136efdb3c163f28f47a07eafcd1c6a6f546ef726ee44f044" } ], - "blockNumber": 139232310, - "cumulativeGasUsed": "801387", + "blockNumber": 141215312, + "cumulativeGasUsed": "1313127", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 3, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"},\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0x846514453223bb0f371180dd8b08b83c0b4a794e8cb915cac3321d3e1a5a26a8\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610a146100fc600039600081816103010152818161032a01526105270152610a146000f3fe6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b5780633a283d7d146100b8578063472abf68146100dc5780634a994174146100f35780634f1ef2861461011357806352d1902d1461012657806354fd4d501461013b578063c4d66de814610179578063e4c0aaf414610199575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100ce60015481565b6040519081526020016100af565b3480156100e857600080fd5b506100f16101b9565b005b3480156100ff57600080fd5b506100ce61010e36600461078b565b610280565b6100f161012136600461082e565b6102ed565b34801561013257600080fd5b506100ce61051a565b34801561014757600080fd5b5061016c604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108df565b34801561018557600080fd5b506100f16101943660046108f2565b610578565b3480156101a557600080fd5b506100f16101b43660046108f2565b610660565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680610202575080546001600160401b03808416911610155b1561021f5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b60018054600091826102918361090d565b919050559050836040516102a59190610934565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516102de929190610950565b60405180910390a39392505050565b6102f6826106ac565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061037457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103686000805160206109bf8339815191525490565b6001600160a01b031614155b156103925760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103ec575060408051601f3d908101601f191682019092526103e99181019061097e565b60015b61041957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206109bf833981519152811461044a57604051632a87526960e21b815260048101829052602401610410565b6000805160206109bf8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610515576000836001600160a01b0316836040516104b19190610934565b600060405180830381855af49150503d80600081146104ec576040519150601f19603f3d011682016040523d82523d6000602084013e6104f1565b606091505b5050905080610513576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105655760405163703e46dd60e11b815260040160405180910390fd5b506000805160206109bf83398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105c1575080546001600160401b03808416911610155b156105de5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041090610997565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106d65760405162461bcd60e51b815260040161041090610997565b50565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115610709576107096106d9565b604051601f8501601f19908116603f01168101908282118183101715610731576107316106d9565b8160405280935085815286868601111561074a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261077557600080fd5b610784838335602085016106ef565b9392505050565b6000806000606084860312156107a057600080fd5b83356001600160401b03808211156107b757600080fd5b6107c387838801610764565b945060208601359150808211156107d957600080fd5b6107e587838801610764565b935060408601359150808211156107fb57600080fd5b5061080886828701610764565b9150509250925092565b80356001600160a01b038116811461082957600080fd5b919050565b6000806040838503121561084157600080fd5b61084a83610812565b915060208301356001600160401b0381111561086557600080fd5b8301601f8101851361087657600080fd5b610885858235602084016106ef565b9150509250929050565b60005b838110156108aa578181015183820152602001610892565b50506000910152565b600081518084526108cb81602086016020860161088f565b601f01601f19169290920160200192915050565b60208152600061078460208301846108b3565b60006020828403121561090457600080fd5b61078482610812565b60006001820161092d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6000825161094681846020870161088f565b9190910192915050565b60408152600061096360408301856108b3565b828103602084015261097581856108b3565b95945050505050565b60006020828403121561099057600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122077c70451c86b4f0fa2f477a69ed75120b197b736aed325df40ecd8d281ec15a864736f6c63430008180033", diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json index c3beade40..78bed1af0 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x596D3B09E684D62217682216e9b7a0De75933391", + "address": "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x8c2dced9ed139bc917e2ade113d031a438e66a069c9a9014d2aef333dd4eda3e", + "transactionHash": "0x5beebc57cd875a210eeda1dc1056a22c5410bf6b6cb5232034c35b4813dacc4b", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x596D3B09E684D62217682216e9b7a0De75933391", - "transactionIndex": 1, - "gasUsed": "4181458", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7c30329f6408ee776e597cbad90a95cf8534390a6b8574e18ac295ca5355e2a8", - "transactionHash": "0x8c2dced9ed139bc917e2ade113d031a438e66a069c9a9014d2aef333dd4eda3e", + "contractAddress": "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", + "transactionIndex": 4, + "gasUsed": "175413", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb04a87683c6ed7a0e84419b51f5cfcb8071cf8e7557f363fc29d890c311bf31c", + "transactionHash": "0x5beebc57cd875a210eeda1dc1056a22c5410bf6b6cb5232034c35b4813dacc4b", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3639191, - "transactionHash": "0x8c2dced9ed139bc917e2ade113d031a438e66a069c9a9014d2aef333dd4eda3e", - "address": "0x596D3B09E684D62217682216e9b7a0De75933391", + "transactionIndex": 4, + "blockNumber": 141215321, + "transactionHash": "0x5beebc57cd875a210eeda1dc1056a22c5410bf6b6cb5232034c35b4813dacc4b", + "address": "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x7c30329f6408ee776e597cbad90a95cf8534390a6b8574e18ac295ca5355e2a8" + "logIndex": 11, + "blockHash": "0xb04a87683c6ed7a0e84419b51f5cfcb8071cf8e7557f363fc29d890c311bf31c" } ], - "blockNumber": 3639191, - "cumulativeGasUsed": "4181458", + "blockNumber": 141215321, + "cumulativeGasUsed": "449841", "status": 1, "byzantium": true }, "args": [ - "0xc53b813ed94AaEb6F5518D60bf6a8109954bE3f6", + "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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": "c66a072bc17d18807b6e81f338ff0fab", + "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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220fc35bcfc81b847362e3b09f140cee679a071a646ec883e245b34a4cebe415b3464736f6c63430008180033", "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/arbitrumSepoliaDevnet/EvidenceModule.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json index 301b3088a..9a00bb657 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json @@ -1,5 +1,5 @@ { - "address": "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + "address": "0x990f44d19a5F46889801B31bf58e0536fBECf27C", "abi": [ { "stateMutability": "payable", @@ -214,49 +214,51 @@ "type": "constructor" } ], - "transactionHash": "0x8d69083b7054b38ca34473b5aa7e359baf9dfe08e374f926d236a66d3ba89b61", + "transactionHash": "0x1e1bf66c2687ebd2e2b608112fd69240eccc6b3b3181fb2a183b641dc8a56f67", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + "contractAddress": "0x990f44d19a5F46889801B31bf58e0536fBECf27C", "transactionIndex": 1, - "gasUsed": "2722260", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000080000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb87d473e0e36ae4b612a0ec69cd350a54608d12378eb4d58830ac4a00fc8136d", - "transactionHash": "0x8d69083b7054b38ca34473b5aa7e359baf9dfe08e374f926d236a66d3ba89b61", + "gasUsed": "175367", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000200000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd492e0e5c44248cb1e56dd25ebe779193bca27a39aa15f42df1d68175c34165d", + "transactionHash": "0x1e1bf66c2687ebd2e2b608112fd69240eccc6b3b3181fb2a183b641dc8a56f67", "logs": [ { "transactionIndex": 1, - "blockNumber": 3638735, - "transactionHash": "0x8d69083b7054b38ca34473b5aa7e359baf9dfe08e374f926d236a66d3ba89b61", - "address": "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + "blockNumber": 141215177, + "transactionHash": "0x1e1bf66c2687ebd2e2b608112fd69240eccc6b3b3181fb2a183b641dc8a56f67", + "address": "0x990f44d19a5F46889801B31bf58e0536fBECf27C", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0xb87d473e0e36ae4b612a0ec69cd350a54608d12378eb4d58830ac4a00fc8136d" + "blockHash": "0xd492e0e5c44248cb1e56dd25ebe779193bca27a39aa15f42df1d68175c34165d" } ], - "blockNumber": 3638735, - "cumulativeGasUsed": "2722260", + "blockNumber": 141215177, + "cumulativeGasUsed": "175367", "status": 1, "byzantium": true }, "args": [ - "0x05AD81f245209b7f91885fd96e57c9da90554824", + "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", "execute": { - "methodName": "initialize2", - "args": [] + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59" + ] }, - "implementation": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", + "implementation": "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json index 605788393..f7bd82e5f 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", + "address": "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", "abi": [ { "inputs": [], @@ -195,38 +195,38 @@ "type": "function" } ], - "transactionHash": "0xdfb5daa654439edc629b895b1a6481247548e67d8097ec4c118c48396c3a86b4", + "transactionHash": "0x251f29a778cffd56bb5ed753316dc2ca656feb8ccc76f2d195ce7192dc541d22", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", - "transactionIndex": 1, + "contractAddress": "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", + "transactionIndex": 3, "gasUsed": "576517", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5ff3b09b287d49694b6ac3e25ab8b4aa8d75055fa2e38352b72ba02de758e34d", - "transactionHash": "0xdfb5daa654439edc629b895b1a6481247548e67d8097ec4c118c48396c3a86b4", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000002000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa8038dce4b29ca103c9fe591310f7f5aa4ec72d83c7442c28b10d12a7f53e0ef", + "transactionHash": "0x251f29a778cffd56bb5ed753316dc2ca656feb8ccc76f2d195ce7192dc541d22", "logs": [ { - "transactionIndex": 1, - "blockNumber": 139232342, - "transactionHash": "0xdfb5daa654439edc629b895b1a6481247548e67d8097ec4c118c48396c3a86b4", - "address": "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", + "transactionIndex": 3, + "blockNumber": 141215167, + "transactionHash": "0x251f29a778cffd56bb5ed753316dc2ca656feb8ccc76f2d195ce7192dc541d22", + "address": "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x5ff3b09b287d49694b6ac3e25ab8b4aa8d75055fa2e38352b72ba02de758e34d" + "logIndex": 6, + "blockHash": "0xa8038dce4b29ca103c9fe591310f7f5aa4ec72d83c7442c28b10d12a7f53e0ef" } ], - "blockNumber": 139232342, - "cumulativeGasUsed": "576517", + "blockNumber": 141215167, + "cumulativeGasUsed": "847967", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Evidence Module\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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\\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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0xedf978718e5d349c5a39747e2c4da253a1d8b73588c4118b74b39c324ba471fe\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108ff6100fc6000396000818161024a01528181610273015261047001526108ff6000f3fe6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a2414610065578063472abf68146100a25780634f1ef286146100b957806352d1902d146100cc57806354fd4d50146100ef578063a6a7f0eb1461012d578063c4d66de81461014d575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b761016d565b005b6100b76100c736600461068e565b610236565b3480156100d857600080fd5b506100e1610463565b604051908152602001610099565b3480156100fb57600080fd5b50610120604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100999190610774565b34801561013957600080fd5b506100b76101483660046107a7565b6104c1565b34801561015957600080fd5b506100b7610168366004610823565b61050a565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806101b75750805467ffffffffffffffff808416911610155b156101d45760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b61023f826105f4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806102bd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b16000805160206108aa8339815191525490565b6001600160a01b031614155b156102db5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610335575060408051601f3d908101601f1916820190925261033291810190610845565b60015b61036257604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6000805160206108aa833981519152811461039357604051632a87526960e21b815260048101829052602401610359565b6000805160206108aa8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561045e576000836001600160a01b0316836040516103fa919061085e565b600060405180830381855af49150503d8060008114610435576040519150601f19603f3d011682016040523d82523d6000602084013e61043a565b606091505b505090508061045c576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ae5760405163703e46dd60e11b815260040160405180910390fd5b506000805160206108aa83398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516104fd92919061087a565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105545750805467ffffffffffffffff808416911610155b156105715760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146106595760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610359565b50565b80356001600160a01b038116811461067357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106a157600080fd5b6106aa8361065c565b9150602083013567ffffffffffffffff808211156106c757600080fd5b818501915085601f8301126106db57600080fd5b8135818111156106ed576106ed610678565b604051601f8201601f19908116603f0116810190838211818310171561071557610715610678565b8160405282815288602084870101111561072e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b8381101561076b578181015183820152602001610753565b50506000910152565b6020815260008251806020840152610793816040850160208701610750565b601f01601f19169190910160400192915050565b6000806000604084860312156107bc57600080fd5b83359250602084013567ffffffffffffffff808211156107db57600080fd5b818601915086601f8301126107ef57600080fd5b8135818111156107fe57600080fd5b87602082850101111561081057600080fd5b6020830194508093505050509250925092565b60006020828403121561083557600080fd5b61083e8261065c565b9392505050565b60006020828403121561085757600080fd5b5051919050565b60008251610870818460208701610750565b9190910192915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e8029341a85fe4ec5c46a752df03395b1ee6ff03774364e24047c608189c4ceb64736f6c63430008180033", @@ -333,7 +333,7 @@ "storageLayout": { "storage": [ { - "astId": 21480, + "astId": 21203, "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", "label": "governor", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json index a049ed1f5..cb8f1c41d 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + "address": "0x990f44d19a5F46889801B31bf58e0536fBECf27C", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x8d69083b7054b38ca34473b5aa7e359baf9dfe08e374f926d236a66d3ba89b61", + "transactionHash": "0x1e1bf66c2687ebd2e2b608112fd69240eccc6b3b3181fb2a183b641dc8a56f67", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + "contractAddress": "0x990f44d19a5F46889801B31bf58e0536fBECf27C", "transactionIndex": 1, - "gasUsed": "2722260", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000080000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb87d473e0e36ae4b612a0ec69cd350a54608d12378eb4d58830ac4a00fc8136d", - "transactionHash": "0x8d69083b7054b38ca34473b5aa7e359baf9dfe08e374f926d236a66d3ba89b61", + "gasUsed": "175367", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000200000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd492e0e5c44248cb1e56dd25ebe779193bca27a39aa15f42df1d68175c34165d", + "transactionHash": "0x1e1bf66c2687ebd2e2b608112fd69240eccc6b3b3181fb2a183b641dc8a56f67", "logs": [ { "transactionIndex": 1, - "blockNumber": 3638735, - "transactionHash": "0x8d69083b7054b38ca34473b5aa7e359baf9dfe08e374f926d236a66d3ba89b61", - "address": "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", + "blockNumber": 141215177, + "transactionHash": "0x1e1bf66c2687ebd2e2b608112fd69240eccc6b3b3181fb2a183b641dc8a56f67", + "address": "0x990f44d19a5F46889801B31bf58e0536fBECf27C", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0xb87d473e0e36ae4b612a0ec69cd350a54608d12378eb4d58830ac4a00fc8136d" + "blockHash": "0xd492e0e5c44248cb1e56dd25ebe779193bca27a39aa15f42df1d68175c34165d" } ], - "blockNumber": 3638735, - "cumulativeGasUsed": "2722260", + "blockNumber": 141215177, + "cumulativeGasUsed": "175367", "status": 1, "byzantium": true }, "args": [ - "0x05AD81f245209b7f91885fd96e57c9da90554824", + "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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": "c66a072bc17d18807b6e81f338ff0fab", + "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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7c42d679ff13810d84897a3cbbb7e45ef2c7b94a533d7db8e3a61c374c817ee64736f6c63430008180033", "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/arbitrumSepoliaDevnet/KlerosCore.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json index 408681d2d..59fac9359 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json @@ -1,5 +1,5 @@ { - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "abi": [ { "stateMutability": "payable", @@ -1884,50 +1884,50 @@ "type": "constructor" } ], - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - "transactionIndex": 1, - "gasUsed": "5235914", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000004000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040008000000000000000000000000020000000000000010000800402000000000000008000000080000000000000000000000000800000000000000000000000080000000000000000000000000000000004008000000000000000000000000000000000100000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb", - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "contractAddress": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", + "transactionIndex": 6, + "gasUsed": "579826", + "logsBloom": "0x00000000000000000000000020000000000000000000100000000000020000000000000000000000000000000000200000000040000000000000000000440000000000000000000000000000000000000000000000040000000000000000000000000000020000000000000010000800402000000000000000000000000004000000800000000000000800000010000000000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001000000000000800000000000000000000000000000000000000000000", + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779", + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b" + "0x0000000000000000000000002246821e1313a93e2f8cdf7a3422d078f560b457" ], "data": "0x", - "logIndex": 0, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "logIndex": 9, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" }, { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", + "0x550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000" ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 10, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" }, { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -1935,41 +1935,62 @@ "0x0000000000000000000000000000000000000000000000000000000000000001" ], "data": "0x", - "logIndex": 2, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "logIndex": 11, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" }, { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "logIndex": 12, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" } ], - "blockNumber": 3638878, - "cumulativeGasUsed": "5235914", + "blockNumber": 141215236, + "cumulativeGasUsed": "1057697", "status": 1, "byzantium": true }, "args": [ - "0x91a373BBdE0532F86410682F362e2Cf685e95085", - "0x994b27af000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000019cb28bab40c3585955798f5eeabd71eec14471c00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" + "0xb6839061C3aD03c208EFd697409453bf9900cAb2", + "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000002246821e1313a93e2f8cdf7a3422d078f560b457000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000b34651b65a40553c444c6f0d27286c80ec34fbfd00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", "execute": { - "methodName": "initialize3", - "args": [] + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "0x34B944D42cAcfC8266955D07A80181D2054aa225", + "0x0000000000000000000000000000000000000000", + "0x2246821E1313A93e2F8CdF7a3422d078f560b457", + false, + [ + "200000000000000000000", + 10000, + "100000000000000000", + 256 + ], + [ + 0, + 0, + 0, + 10 + ], + "0x05", + "0xb34651b65A40553C444c6F0D27286C80ec34fbfD" + ] }, - "implementation": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + "implementation": "0xb6839061C3aD03c208EFd697409453bf9900cAb2", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo.json deleted file mode 100644 index 8d3fd428c..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo.json +++ /dev/null @@ -1,2100 +0,0 @@ -{ - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "AppealPeriodNotPassed", - "type": "error" - }, - { - "inputs": [], - "name": "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" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "transactionIndex": 2, - "gasUsed": "670390", - "logsBloom": "0x00000000000000000000400020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000140000000004000000000000000000020000000000000010000800402000000008000008000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000028000000000000004000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711", - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000d40aa608801a639e292e10c235b90488d04070b1" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - }, - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 2, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - }, - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - }, - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - } - ], - "blockNumber": 21125156, - "cumulativeGasUsed": "831421", - "status": 1, - "byzantium": true - }, - "args": [ - "0x419B8C9b13e7Ea358D0ACBfD2214a9Ec0f8e182e", - "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d40aa608801a639e292e10c235b90488d04070b1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000220000000000000000000000000809533c303c10915bb5c0585f2d8d738e2a4fb640000000000000000000000007dfcf7444a81d4a92a641ee292f36458cd9eb36500000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 2, - "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", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x34B944D42cAcfC8266955D07A80181D2054aa225", - "0x0000000000000000000000000000000000000000", - "0xd40aA608801a639E292e10C235B90488D04070b1", - false, - [ - { - "type": "BigNumber", - "hex": "0x0ad78ebc5ac6200000" - }, - 10000, - { - "type": "BigNumber", - "hex": "0x016345785d8a0000" - }, - 256 - ], - [ - 0, - 0, - 0, - 10 - ], - "0x05", - "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F" - ] - }, - "implementation": "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Implementation.json deleted file mode 100644 index 92f96ed65..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Implementation.json +++ /dev/null @@ -1,2835 +0,0 @@ -{ - "address": "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", - "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" - } - ], - "transactionHash": "0x8b80bfa88c9e5e90c8e53f74d87b2739832ad888ff537a47ed2e7cb5764ac92a", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", - "transactionIndex": 3, - "gasUsed": "6535356", - "logsBloom": "0x00000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000040000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5338b404754e20462bc7ef471b92f9fe8a3d1fdcbaf0515bded00ef41cc0662a", - "transactionHash": "0x8b80bfa88c9e5e90c8e53f74d87b2739832ad888ff537a47ed2e7cb5764ac92a", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 21554000, - "transactionHash": "0x8b80bfa88c9e5e90c8e53f74d87b2739832ad888ff537a47ed2e7cb5764ac92a", - "address": "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 6, - "blockHash": "0x5338b404754e20462bc7ef471b92f9fe8a3d1fdcbaf0515bded00ef41cc0662a" - } - ], - "blockNumber": 21554000, - "cumulativeGasUsed": "6850085", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "04e66c05dce8c2b0405d41f363293597", - "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\":\"0xea253c1c947aca1589462436980c8cd22d4f09180a38739f438967427b688830\",\"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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516158b162000103600039600081816118cc015281816118f50152611aec01526158b16000f3fe6080604052600436106102c95760003560e01c806382d022371161017b578063c71f4253116100d7578063f6506db411610085578063f6506db414610968578063f7434ea914610988578063fbb519e7146109a8578063fbf405b0146109c8578063fc6f8f16146109e8578063fe4037e614610a08578063fe524c3914610a2857600080fd5b8063c71f425314610893578063cf0c38f8146108b3578063d07368bd146108d3578063d2b8035a146108f3578063d4d1d76a14610913578063d98493f614610928578063e4c0aaf41461094857600080fd5b8063acdbf51d11610134578063acdbf51d146107a8578063afe15cfb146107c8578063b0049637146107fd578063b44d573c1461081d578063c13517e11461084d578063c258bb1914610860578063c35699021461088057600080fd5b806382d02237146106e65780638456cb591461070657806386541b241461071b5780638a9bb02a1461073b5780638bb0487514610768578063a072b86c1461078857600080fd5b80632e2e936a1161022a57806352d1902d116101e357806352d1902d14610606578063564a565d1461061b57806359ec827e1461064c5780635c975abb1461066c578063751accd0146106865780637717a6e8146106a65780637934c0be146106c657600080fd5b80632e2e936a146105515780632fcb4f04146105715780633cfd1184146105915780633f4ba83a146105be578063452a9320146105d35780634f1ef286146105f357600080fd5b806319b815291161028757806319b81529146104035780631c3db16d146104335780631d7e6892146104705780631f5a0dd2146104905780632c053739146104f15780632d29a47b146105115780632e1daf2f1461053157600080fd5b8062f5822c146102ce5780630219da79146102f05780630b7414bc146103685780630c340a2414610388578063115d5376146103b55780631860592b146103d5575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004614a12565b610a48565b005b3480156102fc57600080fd5b5061033b61030b366004614a12565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037457600080fd5b506102ee610383366004614b20565b610a95565b34801561039457600080fd5b506000546103a8906001600160a01b031681565b60405161035f9190614b81565b3480156103c157600080fd5b506102ee6103d0366004614b95565b610bd6565b3480156103e157600080fd5b506103f56103f0366004614bae565b61110d565b60405190815260200161035f565b34801561040f57600080fd5b5061042361041e366004614b95565b611167565b604051901515815260200161035f565b34801561043f57600080fd5b5061045361044e366004614b95565b611260565b60408051938452911515602084015215159082015260600161035f565b34801561047c57600080fd5b506102ee61048b366004614bda565b611361565b34801561049c57600080fd5b506104b06104ab366004614b95565b6113b7565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161035f565b3480156104fd57600080fd5b506102ee61050c366004614cef565b611416565b34801561051d57600080fd5b506102ee61052c366004614ddc565b6114e8565b34801561053d57600080fd5b506004546103a8906001600160a01b031681565b34801561055d57600080fd5b50600b546103a8906001600160a01b031681565b34801561057d57600080fd5b506102ee61058c366004614a12565b61177e565b34801561059d57600080fd5b506105b16105ac366004614e08565b6117cb565b60405161035f9190614e46565b3480156105ca57600080fd5b506102ee611835565b3480156105df57600080fd5b506001546103a8906001600160a01b031681565b6102ee610601366004614e54565b6118b8565b34801561061257600080fd5b506103f5611adf565b34801561062757600080fd5b5061063b610636366004614b95565b611b3d565b60405161035f959493929190614edb565b34801561065857600080fd5b506103f5610667366004614b95565b611b99565b34801561067857600080fd5b506009546104239060ff1681565b34801561069257600080fd5b506102ee6106a1366004614f1a565b611cee565b3480156106b257600080fd5b506102ee6106c1366004614f72565b611d98565b3480156106d257600080fd5b506102ee6106e1366004614bda565b611e5b565b3480156106f257600080fd5b506102ee610701366004614f8e565b611eda565b34801561071257600080fd5b506102ee611f97565b34801561072757600080fd5b506102ee610736366004614fe0565b612037565b34801561074757600080fd5b5061075b61075636600461504e565b61221e565b60405161035f91906150b4565b34801561077457600080fd5b506102ee610783366004614b95565b6123aa565b34801561079457600080fd5b506102ee6107a3366004615159565b61250e565b3480156107b457600080fd5b506103a86107c3366004614b95565b61287f565b3480156107d457600080fd5b506107e86107e3366004614b95565b6128a9565b6040805192835260208301919091520161035f565b34801561080957600080fd5b506102ee610818366004614a12565b612955565b34801561082957600080fd5b50610423610838366004614a12565b600a6020526000908152604090205460ff1681565b6103f561085b366004615219565b6129a2565b34801561086c57600080fd5b506102ee61087b366004614a12565b6129da565b6102ee61088e366004615249565b612a27565b34801561089f57600080fd5b506103f56108ae366004614b95565b612efb565b3480156108bf57600080fd5b506003546103a8906001600160a01b031681565b3480156108df57600080fd5b506102ee6108ee366004614a12565b612f63565b3480156108ff57600080fd5b506102ee61090e36600461504e565b61300c565b34801561091f57600080fd5b506006546103f5565b34801561093457600080fd5b506103f56109433660046152ca565b613321565b34801561095457600080fd5b506102ee610963366004614a12565b61336e565b34801561097457600080fd5b506103f5610983366004615315565b6133bb565b34801561099457600080fd5b506103f56109a336600461537b565b6134a1565b3480156109b457600080fd5b506102ee6109c33660046153af565b6134ed565b3480156109d457600080fd5b506002546103a8906001600160a01b031681565b3480156109f457600080fd5b506103f5610a03366004614b95565b61352d565b348015610a1457600080fd5b506102ee610a23366004614a12565b61355c565b348015610a3457600080fd5b50610423610a43366004614f72565b6135a9565b6000546001600160a01b03163314610a735760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ac05760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bd0578115610b5f57828181518110610ae457610ae4615400565b602002602001015160001480610b1757506006548351849083908110610b0c57610b0c615400565b602002602001015110155b15610b3557604051633d58a98960e11b815260040160405180910390fd5b610b5a84848381518110610b4b57610b4b615400565b602002602001015160016135f1565b610bbe565b6001838281518110610b7357610b73615400565b602002602001015103610b99576040516356d111fd60e11b815260040160405180910390fd5b610bbe84848381518110610baf57610baf615400565b602002602001015160006135f1565b80610bc88161542c565b915050610ac3565b50505050565b600060078281548110610beb57610beb615400565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c1e57610c1e615400565b6000918252602082206003850154600c909202019250610c4090600190615445565b90506000836003018281548110610c5957610c59615400565b600091825260208220600b909102019150600185015460ff166004811115610c8357610c83614ea3565b03610d5e5781158015610cd257506001840154600684019060ff166004811115610caf57610caf614ea3565b60048110610cbf57610cbf615400565b01546002850154610cd09042615445565b105b15610cf057604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d18576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d2f576002610d32565b60015b60018086018054909160ff1990911690836004811115610d5457610d54614ea3565b02179055506110bf565b60018085015460ff166004811115610d7857610d78614ea3565b03610e88576001840154600684019060ff166004811115610d9b57610d9b614ea3565b60048110610dab57610dab615400565b01546002850154610dbc9042615445565b108015610e5357506006816000015481548110610ddb57610ddb615400565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e519190615458565b155b15610e7157604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610d54565b6002600185015460ff166004811115610ea357610ea3614ea3565b03610ff1576001840154600684019060ff166004811115610ec657610ec6614ea3565b60048110610ed657610ed6615400565b01546002850154610ee79042615445565b108015610f7e57506006816000015481548110610f0657610f06615400565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610f58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7c9190615458565b155b15610f9c57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36110bf565b6003600185015460ff16600481111561100c5761100c614ea3565b03611086576001840154600684019060ff16600481111561102f5761102f614ea3565b6004811061103f5761103f615400565b015460028501546110509042615445565b101561106f57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610d54565b6004600185015460ff1660048111156110a1576110a1614ea3565b036110bf576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110fe9160ff1690615475565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061114a90600160481b900460ff16600a615567565b6111549084615576565b61115e91906155a3565b90505b92915050565b6000806007838154811061117d5761117d615400565b60009182526020822060036004909202019081018054919350906111a390600190615445565b815481106111b3576111b3615400565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106111e8576111e8615400565b90600052602060002090600c0201905080600501548260030154101561121357506000949350505050565b80546005805490916001600160601b031690811061123357611233615400565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061127957611279615400565b600091825260208220600360049092020190810180549193509061129f90600190615445565b815481106112af576112af615400565b90600052602060002090600b02019050600060068260000154815481106112d8576112d8615400565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa15801561132d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135191906155b7565b9199909850909650945050505050565b6000546001600160a01b0316331461138c5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b600581815481106113c757600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061145f575080546001600160401b03808416911610155b1561147c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff161561150c57604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061152257611522615400565b600091825260209091206004918202019150600182015460ff16600481111561154d5761154d614ea3565b1461156b57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061158057611580615400565b6000918252602082206004600b909202019081015490935091506115a484836155ef565b60058401546006850154600286015492935090916000906115c69083906155a3565b905060008660010154905060008060068960000154815481106115eb576115eb615400565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166b9190615602565b915050806000036116875783861115611682578395505b6116a7565b611692846002615576565b8611156116a7576116a4846002615576565b95505b60048801869055865b8681101561175d5784811015611709576117026040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613679565b955061174b565b61174b6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613b4a565b806117558161542c565b9150506116b0565b508488600501541461177157600588018590555b5050505050505050505050565b6000546001600160a01b031633146117a95760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6117d3614942565b6005826001600160601b0316815481106117ef576117ef615400565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118165750505050509050919050565b6000546001600160a01b031633146118605760405163c383977560e01b815260040160405180910390fd5b60095460ff166118835760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6118c182614082565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061193f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661193360008051602061585c8339815191525490565b6001600160a01b031614155b1561195d5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119b7575060408051601f3d908101601f191682019092526119b491810190615602565b60015b6119df5781604051630c76093760e01b81526004016119d69190614b81565b60405180910390fd5b60008051602061585c8339815191528114611a1057604051632a87526960e21b8152600481018290526024016119d6565b60008051602061585c8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611ad9576000836001600160a01b031683604051611a77919061563f565b600060405180830381855af49150503d8060008114611ab2576040519150601f19603f3d011682016040523d82523d6000602084013e611ab7565b606091505b5050905080610bd0576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b2a5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061585c83398151915290565b60078181548110611b4d57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611baf57611baf615400565b6000918252602082206003600490920201908101805491935090611bd590600190615445565b81548110611be557611be5615400565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611c1a57611c1a615400565b90600052602060002090600c020190508060050154826003015410611cb95782546001600160601b031660001901611c5b576001600160ff1b039350611ce6565b6003820154611c6b906002615576565b611c769060016155ef565b81546005805490916001600160601b0316908110611c9657611c96615400565b90600052602060002090600c020160040154611cb29190615576565b9350611ce6565b6003820154611cc9906002615576565b611cd49060016155ef565b8160040154611ce39190615576565b93505b505050919050565b6000546001600160a01b03163314611d195760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611d34919061563f565b60006040518083038185875af1925050503d8060008114611d71576040519150601f19603f3d011682016040523d82523d6000602084013e611d76565b606091505b5050905080610bd0576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611dbc57604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611dec903390600401614b81565b602060405180830381865afa158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d9190615602565b600003611e4d576040516326b551e560e11b815260040160405180910390fd5b611ad93383836000806140b0565b6000546001600160a01b03163314611e865760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f055760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611fbd57506000546001600160a01b03163314155b15611fdb57604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611fff57604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120625760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b03168154811061208057612080615400565b90600052602060002090600c0201905060016001600160601b0316886001600160601b0316141580156120e2575080546005805488926001600160601b03169081106120ce576120ce615400565b90600052602060002090600c020160020154115b1561210057604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121855786600583600101838154811061212757612127615400565b90600052602060002001548154811061214257612142615400565b90600052602060002090600c020160020154101561217357604051639717078960e01b815260040160405180910390fd5b8061217d8161542c565b915050612103565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556121c89060068301908490614960565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161220c9695949392919061565b565b60405180910390a25050505050505050565b61228460405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061229757612297615400565b906000526020600020906004020160030182815481106122b9576122b9615400565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561236857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161234a575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106123bf576123bf615400565b600091825260209091206004918202019150600182015460ff1660048111156123ea576123ea614ea3565b1461240857604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156124335760405163c977f8d360e01b815260040160405180910390fd5b600061243e83611260565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b1580156124f157600080fd5b505af1158015612505573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125395760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b03168154811061255657612556615400565b90600052602060002090600c020160020154111561258757604051639717078960e01b815260040160405180910390fd5b80516000036125a95760405163402585f560e01b815260040160405180910390fd5b6001600160601b0389166125d057604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156126ce5783818151811061262357612623615400565b6020026020010151600014806126565750600654845185908390811061264b5761264b615400565b602002602001015110155b1561267457604051633d58a98960e11b815260040160405180910390fd5b600182600a01600086848151811061268e5761268e615400565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806126c69061542c565b915050612608565b5060016000908152600a8201602052604090205460ff16612702576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c16178155604080516000815260208101918290525161273a91600184019161499e565b50805460ff60601b1916600160601b8b151502178155600281018990556003810188905560048082018890556005820187905561277d9060068301908790614960565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916127af9186918991016156ba565b600060405180830381600087803b1580156127c957600080fd5b505af11580156127dd573d6000803e3d6000fd5b5050505060058b6001600160601b0316815481106127fd576127fd615400565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d9061286a908e908e908e908e908e908e908d906156d3565b60405180910390a35050505050505050505050565b6006818154811061288f57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106128c1576128c1615400565b6000918252602090912060049091020190506003600182015460ff1660048111156128ee576128ee614ea3565b03612946576002810154815460058054929550916001600160601b0390911690811061291c5761291c615400565b600091825260209091206009600c909202010154600282015461293f91906155ef565b915061294f565b60009250600091505b50915091565b6000546001600160a01b031633146129805760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006129ad826134a1565b3410156129cd57604051630e3360f160e21b815260040160405180910390fd5b61115e838360003461426a565b6000546001600160a01b03163314612a055760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a3083611b99565b341015612a5057604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612a6557612a65615400565b6000918252602090912060049091020190506003600182015460ff166004811115612a9257612a92614ea3565b14612ab0576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612ac690600190615445565b81548110612ad657612ad6615400565b90600052602060002090600b020190506006816000015481548110612afd57612afd615400565b6000918252602090912001546001600160a01b03163314612b315760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612b7457612b74615400565b90600052602060002090600c020160050154846003015410612c7d576005836001600160601b031681548110612bac57612bac615400565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612bdf57612bdf615400565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c0b57600191505b84546001600160601b03848116911614612c7d57845460038601546001600160601b0390911690612c3e90600190615445565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612cc057612cc0615400565b90600052602060002090600c02019050806004015434612ce091906155a3565b826003018190555061271081600301548260020154612cff9190615576565b612d0991906155a3565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d4091615445565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612d7e57600080fd5b505af1158015612d92573d6000803e3d6000fd5b505086548454149150612e7890505784546003870154612db490600190615445565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e0257612e02615400565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612e45918d918d918d9190600401615750565b600060405180830381600087803b158015612e5f57600080fd5b505af1158015612e73573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612ee89190615475565b60405180910390a2505050505050505050565b60008060078381548110612f1157612f11615400565b906000526020600020906004020190508060030160018260030180549050612f399190615445565b81548110612f4957612f49615400565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612f8e5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b60006007838154811061302157613021615400565b906000526020600020906004020190506000600182600301805490506130479190615445565b9050600082600301828154811061306057613060615400565b600091825260208220600b909102019150600184015460ff16600481111561308a5761308a614ea3565b146130a857604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106130c1576130c1615400565b6000918252602082200154600a8401546001600160a01b039091169250905b86811080156130f6575060038401546006850154105b156132fe5760006001600160a01b03841663d2b8035a8a846131178161542c565b955061312390876155ef565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015613166573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061318a9190615780565b90506001600160a01b0381166131a057506130e0565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926131d692869290910161579d565b600060405180830381600087803b1580156131f057600080fd5b505af1158015613204573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91613251918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036132f85760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b1580156132df57600080fd5b505af11580156132f3573d6000803e3d6000fd5b505050505b506130e0565b8084600a01600082825461331291906155ef565b90915550505050505050505050565b6000613366826103f086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134a192505050565b949350505050565b6000546001600160a01b031633146133995760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133f45760405163e51cf7bf60e01b815260040160405180910390fd5b6133ff858585613321565b82101561341f57604051630e3360f160e21b815260040160405180910390fd5b6134346001600160a01b0384163330856142a6565b613451576040516312171d8360e31b815260040160405180910390fd5b6134958686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925087915061426a9050565b90505b95945050505050565b60008060006134af84614382565b5091509150806005836001600160601b0316815481106134d1576134d1615400565b90600052602060002090600c0201600401546133669190615576565b6004546001600160a01b0316331461351857604051639d6cab9960e01b815260040160405180910390fd5b6135268484848460016140b0565b5050505050565b60006007828154811061354257613542615400565b600091825260209091206003600490920201015492915050565b6000546001600160a01b031633146135875760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b0316815481106135c7576135c7615400565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b03168154811061360e5761360e615400565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061369357613693615400565b906000526020600020906004020190506000816003018460200151815481106136be576136be615400565b90600052602060002090600b02019050600060068260000154815481106136e7576136e7615400565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa15801561376d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137919190615602565b90506127108111156137a257506127105b60006127106137b18382615445565b85600101546137c09190615576565b6137ca91906155a3565b9050808760c0018181516137de91906155ef565b90525060e08701516006850180546000929081106137fe576137fe615400565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161383f91859187910161579d565b600060405180830381600087803b15801561385957600080fd5b505af115801561386d573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c92506138a291859187910161579d565b600060405180830381600087803b1580156138bc57600080fd5b505af11580156138d0573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e786613910876157b6565b60098b01546040516139329392916000916001600160a01b03909116906157d2565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139bd9190615458565b613a23576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916139f091859101614b81565b600060405180830381600087803b158015613a0a57600080fd5b505af1158015613a1e573d6000803e3d6000fd5b505050505b60018860600151613a349190615445565b8860e00151148015613a4857506040880151155b15613b395760098501546001600160a01b0316613a91576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613ab8565b60005460028601546009870154613ab6926001600160a01b0391821692911690614409565b505b60005460c0890151600254613adb926001600160a01b0391821692911690614409565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613b3093909290916001600160a01b03909116906157f6565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613b6357613b63615400565b90600052602060002090600402019050600081600301836020015181548110613b8e57613b8e615400565b90600052602060002090600b0201905060006006826000015481548110613bb757613bb7615400565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613bf691615815565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c7a9190615602565b9050612710811115613c8b57506127105b60008360060186606001518760e00151613ca59190615815565b81548110613cb557613cb5615400565b600091825260208220015460018601546001600160a01b03909116925061271090613ce1908590615576565b613ceb91906155a3565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613d1d91869186910161579d565b600060405180830381600087803b158015613d3757600080fd5b505af1158015613d4b573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613d7e91869101614b81565b602060405180830381865afa158015613d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dbf9190615458565b613ddc57600254613dda906001600160a01b03168383614409565b505b60006127108489604001518a60c00151613df691906155a3565b613e009190615576565b613e0a91906155a3565b905080866008016000828254613e2091906155ef565b925050819055506000612710858a604001518960020154613e4191906155a3565b613e4b9190615576565b613e5591906155a3565b905080876007016000828254613e6b91906155ef565b9091555050600254613e87906001600160a01b03168584614409565b5060098701546001600160a01b0316613ec5576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613ee0565b6009870154613ede906001600160a01b03168583614409565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613f30928c928a928a92909116906157d2565b60405180910390a4600189606001516002613f4b9190615576565b613f559190615445565b8960e001510361407757600087600801548a60c00151613f759190615445565b9050600088600701548960020154613f8d9190615445565b905081151580613f9c57508015155b15611771578115613fc657600054600254613fc4916001600160a01b03918216911684614409565b505b801561402d5760098901546001600160a01b031661400c57600080546040516001600160a01b039091169183156108fc02918491818181858888f193505050505061402d565b60005460098a015461402b916001600160a01b03918216911683614409565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49161286a91879187916001600160a01b03909116906157f6565b505050505050505050565b6000546001600160a01b031633146140ad5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b03851615806140d257506005546001600160601b038616115b156140ea576140e28260046144d6565b506000613498565b831580159061412557506005856001600160601b03168154811061411057614110615400565b90600052602060002090600c02016002015484105b15614135576140e28260056144d6565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af11580156141a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141cc9190615829565b9194509250905060008160078111156141e7576141e7614ea3565b14614202576141f685826144d6565b60009350505050613498565b821561422f57600254614220906001600160a01b03168a30866142a6565b61422f576141f68560016144d6565b811561425b5760025461424c906001600160a01b03168a84614409565b61425b576141f68560026144d6565b50600198975050505050505050565b336000908152600a602052604081205460ff1661429a57604051630407618360e31b815260040160405180910390fd5b61349885858585614544565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161430b919061563f565b6000604051808303816000865af19150503d8060008114614348576040519150601f19603f3d011682016040523d82523d6000602084013e61434d565b606091505b50915091508180156143775750805115806143775750808060200190518101906143779190615458565b979650505050505050565b600080600060408451106143f7575050506020810151604082015160608301516001600160601b03831615806143c357506005546001600160601b03841610155b156143cd57600192505b816000036143da57600391505b8015806143e957506006548110155b156143f2575060015b614402565b506001915060039050815b9193909250565b6000806000856001600160a01b0316858560405160240161442b92919061579d565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251614460919061563f565b6000604051808303816000865af19150503d806000811461449d576040519150601f19603f3d011682016040523d82523d6000602084013e6144a2565b606091505b50915091508180156144cc5750805115806144cc5750808060200190518101906144cc9190615458565b9695505050505050565b6144e0828261482b565b60068160078111156144f4576144f4614ea3565b0361451257604051636590e91560e01b815260040160405180910390fd5b600781600781111561452657614526614ea3565b03611adb576040516358859f1d60e01b815260040160405180910390fd5b600080600061455286614382565b92505091506005826001600160601b03168154811061457357614573615400565b60009182526020808320848452600a600c90930201919091019052604090205460ff166145b35760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a90910155600680549296509092918490811061463e5761463e615400565b6000918252602082200154600580546001600160a01b039092169350906001600160601b03871690811061467457614674615400565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156146bf576146ba8a846004015461110d565b6146c5565b82600401545b90506146d1818a6155a3565b6003808401919091558683558301546002840154612710916146f291615576565b6146fc91906155a3565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561476f57600080fd5b505af1158015614783573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147bd9493929190615750565b600060405180830381600087803b1580156147d757600080fd5b505af11580156147eb573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b600182600181111561483f5761483f614ea3565b03614848575050565b600181600781111561485c5761485c614ea3565b0361487a57604051630f323ed960e11b815260040160405180910390fd5b600281600781111561488e5761488e614ea3565b036148ac5760405163e45e13a360e01b815260040160405180910390fd5b60038160078111156148c0576148c0614ea3565b036148de57604051631d91d0ed60e31b815260040160405180910390fd5b60048160078111156148f2576148f2614ea3565b03614910576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561492457614924614ea3565b03611adb57604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b826004810192821561498e579160200282015b8281111561498e578251825591602001919060010190614973565b5061499a9291506149d8565b5090565b82805482825590600052602060002090810192821561498e579160200282018281111561498e578251825591602001919060010190614973565b5b8082111561499a57600081556001016149d9565b6001600160a01b03811681146140ad57600080fd5b8035614a0d816149ed565b919050565b600060208284031215614a2457600080fd5b8135614a2f816149ed565b9392505050565b80356001600160601b0381168114614a0d57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614a8b57614a8b614a4d565b604052919050565b600082601f830112614aa457600080fd5b813560206001600160401b03821115614abf57614abf614a4d565b8160051b614ace828201614a63565b9283528481018201928281019087851115614ae857600080fd5b83870192505b8483101561437757823582529183019190830190614aee565b80151581146140ad57600080fd5b8035614a0d81614b07565b600080600060608486031215614b3557600080fd5b614b3e84614a36565b925060208401356001600160401b03811115614b5957600080fd5b614b6586828701614a93565b9250506040840135614b7681614b07565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614ba757600080fd5b5035919050565b60008060408385031215614bc157600080fd5b8235614bcc816149ed565b946020939093013593505050565b60008060408385031215614bed57600080fd5b8235614bf8816149ed565b91506020830135614c0881614b07565b809150509250929050565b600082601f830112614c2457600080fd5b604051608081018181106001600160401b0382111715614c4657614c46614a4d565b604052806080840185811115614c5b57600080fd5b845b81811015614c75578035835260209283019201614c5d565b509195945050505050565b600082601f830112614c9157600080fd5b81356001600160401b03811115614caa57614caa614a4d565b614cbd601f8201601f1916602001614a63565b818152846020838601011115614cd257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e031215614d1157600080fd5b8b35614d1c816149ed565b9a5060208c0135614d2c816149ed565b9950614d3a60408d01614a02565b9850614d4860608d01614a02565b9750614d5660808d01614a02565b9650614d6460a08d01614b15565b9550614d738d60c08e01614c13565b9450614d838d6101408e01614c13565b93506101c08c01356001600160401b03811115614d9f57600080fd5b614dab8e828f01614c80565b935050614dbb6101e08d01614a02565b9150614dca6102008d01614a02565b90509295989b509295989b9093969950565b600080600060608486031215614df157600080fd5b505081359360208301359350604090920135919050565b600060208284031215614e1a57600080fd5b61115e82614a36565b8060005b6004811015610bd0578151845260209384019390910190600101614e27565b608081016111618284614e23565b60008060408385031215614e6757600080fd5b8235614e72816149ed565b915060208301356001600160401b03811115614e8d57600080fd5b614e9985828601614c80565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614ed757634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614f076040830186614eb9565b9215156060820152608001529392505050565b600080600060608486031215614f2f57600080fd5b8335614f3a816149ed565b92506020840135915060408401356001600160401b03811115614f5c57600080fd5b614f6886828701614c80565b9150509250925092565b60008060408385031215614f8557600080fd5b614bcc83614a36565b600080600060608486031215614fa357600080fd5b8335614fae816149ed565b925060208401356001600160401b0381168114614fca57600080fd5b9150604084013560ff81168114614b7657600080fd5b6000806000806000806000610140888a031215614ffc57600080fd5b61500588614a36565b9650602088013561501581614b07565b955060408801359450606088013593506080880135925060a088013591506150408960c08a01614c13565b905092959891949750929550565b6000806040838503121561506157600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156150a95781516001600160a01b031687529582019590820190600101615084565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261510f610180850183615070565b60e08601516101008681019190915286015161012080870191909152860151909250610140615148818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561517857600080fd5b6151818a614a36565b985060208a013561519181614b07565b975060408a0135965060608a0135955060808a0135945060a08a013593506151bc8b60c08c01614c13565b92506101408a01356001600160401b03808211156151d957600080fd5b6151e58d838e01614c80565b93506101608c01359150808211156151fc57600080fd5b506152098c828d01614a93565b9150509295985092959850929598565b6000806040838503121561522c57600080fd5b8235915060208301356001600160401b03811115614e8d57600080fd5b60008060006060848603121561525e57600080fd5b833592506020840135915060408401356001600160401b03811115614f5c57600080fd5b60008083601f84011261529457600080fd5b5081356001600160401b038111156152ab57600080fd5b6020830191508360208285010111156152c357600080fd5b9250929050565b6000806000604084860312156152df57600080fd5b83356001600160401b038111156152f557600080fd5b61530186828701615282565b9094509250506020840135614b76816149ed565b60008060008060006080868803121561532d57600080fd5b8535945060208601356001600160401b0381111561534a57600080fd5b61535688828901615282565b909550935050604086013561536a816149ed565b949793965091946060013592915050565b60006020828403121561538d57600080fd5b81356001600160401b038111156153a357600080fd5b61336684828501614c80565b600080600080608085870312156153c557600080fd5b84356153d0816149ed565b93506153de60208601614a36565b92506040850135915060608501356153f581614b07565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161543e5761543e615416565b5060010190565b8181038181111561116157611161615416565b60006020828403121561546a57600080fd5b8151614a2f81614b07565b602081016111618284614eb9565b600181815b808511156154be5781600019048211156154a4576154a4615416565b808516156154b157918102915b93841c9390800290615488565b509250929050565b6000826154d557506001611161565b816154e257506000611161565b81600181146154f857600281146155025761551e565b6001915050611161565b60ff84111561551357615513615416565b50506001821b611161565b5060208310610133831016604e8410600b8410161715615541575081810a611161565b61554b8383615483565b806000190482111561555f5761555f615416565b029392505050565b600061115e60ff8416836154c6565b808202811582820484141761116157611161615416565b634e487b7160e01b600052601260045260246000fd5b6000826155b2576155b261558d565b500490565b6000806000606084860312156155cc57600080fd5b8351925060208401516155de81614b07565b6040850151909250614b7681614b07565b8082018082111561116157611161615416565b60006020828403121561561457600080fd5b5051919050565b60005b8381101561563657818101518382015260200161561e565b50506000910152565b6000825161565181846020870161561b565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261437760a0830184614e23565b600081518084526156a681602086016020860161561b565b601f01601f19169290920160200192915050565b828152604060208201526000613366604083018461568e565b60006101408083018a1515845260208a8186015289604086015288606086015287608086015261570660a0860188614e23565b6101208501929092528451908190526101608401918086019160005b8181101561573e57835185529382019392820192600101615722565b50929c9b505050505050505050505050565b84815283602082015260806040820152600061576f608083018561568e565b905082606083015295945050505050565b60006020828403121561579257600080fd5b8151614a2f816149ed565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016157cb576157cb615416565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b6000826158245761582461558d565b500690565b60008060006060848603121561583e57600080fd5b8351925060208401519150604084015160088110614b7657600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ffd4b8cc0150c09d914b76d2012f161e53d22e94660667769ec86952a8f5683364736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102c95760003560e01c806382d022371161017b578063c71f4253116100d7578063f6506db411610085578063f6506db414610968578063f7434ea914610988578063fbb519e7146109a8578063fbf405b0146109c8578063fc6f8f16146109e8578063fe4037e614610a08578063fe524c3914610a2857600080fd5b8063c71f425314610893578063cf0c38f8146108b3578063d07368bd146108d3578063d2b8035a146108f3578063d4d1d76a14610913578063d98493f614610928578063e4c0aaf41461094857600080fd5b8063acdbf51d11610134578063acdbf51d146107a8578063afe15cfb146107c8578063b0049637146107fd578063b44d573c1461081d578063c13517e11461084d578063c258bb1914610860578063c35699021461088057600080fd5b806382d02237146106e65780638456cb591461070657806386541b241461071b5780638a9bb02a1461073b5780638bb0487514610768578063a072b86c1461078857600080fd5b80632e2e936a1161022a57806352d1902d116101e357806352d1902d14610606578063564a565d1461061b57806359ec827e1461064c5780635c975abb1461066c578063751accd0146106865780637717a6e8146106a65780637934c0be146106c657600080fd5b80632e2e936a146105515780632fcb4f04146105715780633cfd1184146105915780633f4ba83a146105be578063452a9320146105d35780634f1ef286146105f357600080fd5b806319b815291161028757806319b81529146104035780631c3db16d146104335780631d7e6892146104705780631f5a0dd2146104905780632c053739146104f15780632d29a47b146105115780632e1daf2f1461053157600080fd5b8062f5822c146102ce5780630219da79146102f05780630b7414bc146103685780630c340a2414610388578063115d5376146103b55780631860592b146103d5575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004614a12565b610a48565b005b3480156102fc57600080fd5b5061033b61030b366004614a12565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037457600080fd5b506102ee610383366004614b20565b610a95565b34801561039457600080fd5b506000546103a8906001600160a01b031681565b60405161035f9190614b81565b3480156103c157600080fd5b506102ee6103d0366004614b95565b610bd6565b3480156103e157600080fd5b506103f56103f0366004614bae565b61110d565b60405190815260200161035f565b34801561040f57600080fd5b5061042361041e366004614b95565b611167565b604051901515815260200161035f565b34801561043f57600080fd5b5061045361044e366004614b95565b611260565b60408051938452911515602084015215159082015260600161035f565b34801561047c57600080fd5b506102ee61048b366004614bda565b611361565b34801561049c57600080fd5b506104b06104ab366004614b95565b6113b7565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161035f565b3480156104fd57600080fd5b506102ee61050c366004614cef565b611416565b34801561051d57600080fd5b506102ee61052c366004614ddc565b6114e8565b34801561053d57600080fd5b506004546103a8906001600160a01b031681565b34801561055d57600080fd5b50600b546103a8906001600160a01b031681565b34801561057d57600080fd5b506102ee61058c366004614a12565b61177e565b34801561059d57600080fd5b506105b16105ac366004614e08565b6117cb565b60405161035f9190614e46565b3480156105ca57600080fd5b506102ee611835565b3480156105df57600080fd5b506001546103a8906001600160a01b031681565b6102ee610601366004614e54565b6118b8565b34801561061257600080fd5b506103f5611adf565b34801561062757600080fd5b5061063b610636366004614b95565b611b3d565b60405161035f959493929190614edb565b34801561065857600080fd5b506103f5610667366004614b95565b611b99565b34801561067857600080fd5b506009546104239060ff1681565b34801561069257600080fd5b506102ee6106a1366004614f1a565b611cee565b3480156106b257600080fd5b506102ee6106c1366004614f72565b611d98565b3480156106d257600080fd5b506102ee6106e1366004614bda565b611e5b565b3480156106f257600080fd5b506102ee610701366004614f8e565b611eda565b34801561071257600080fd5b506102ee611f97565b34801561072757600080fd5b506102ee610736366004614fe0565b612037565b34801561074757600080fd5b5061075b61075636600461504e565b61221e565b60405161035f91906150b4565b34801561077457600080fd5b506102ee610783366004614b95565b6123aa565b34801561079457600080fd5b506102ee6107a3366004615159565b61250e565b3480156107b457600080fd5b506103a86107c3366004614b95565b61287f565b3480156107d457600080fd5b506107e86107e3366004614b95565b6128a9565b6040805192835260208301919091520161035f565b34801561080957600080fd5b506102ee610818366004614a12565b612955565b34801561082957600080fd5b50610423610838366004614a12565b600a6020526000908152604090205460ff1681565b6103f561085b366004615219565b6129a2565b34801561086c57600080fd5b506102ee61087b366004614a12565b6129da565b6102ee61088e366004615249565b612a27565b34801561089f57600080fd5b506103f56108ae366004614b95565b612efb565b3480156108bf57600080fd5b506003546103a8906001600160a01b031681565b3480156108df57600080fd5b506102ee6108ee366004614a12565b612f63565b3480156108ff57600080fd5b506102ee61090e36600461504e565b61300c565b34801561091f57600080fd5b506006546103f5565b34801561093457600080fd5b506103f56109433660046152ca565b613321565b34801561095457600080fd5b506102ee610963366004614a12565b61336e565b34801561097457600080fd5b506103f5610983366004615315565b6133bb565b34801561099457600080fd5b506103f56109a336600461537b565b6134a1565b3480156109b457600080fd5b506102ee6109c33660046153af565b6134ed565b3480156109d457600080fd5b506002546103a8906001600160a01b031681565b3480156109f457600080fd5b506103f5610a03366004614b95565b61352d565b348015610a1457600080fd5b506102ee610a23366004614a12565b61355c565b348015610a3457600080fd5b50610423610a43366004614f72565b6135a9565b6000546001600160a01b03163314610a735760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ac05760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bd0578115610b5f57828181518110610ae457610ae4615400565b602002602001015160001480610b1757506006548351849083908110610b0c57610b0c615400565b602002602001015110155b15610b3557604051633d58a98960e11b815260040160405180910390fd5b610b5a84848381518110610b4b57610b4b615400565b602002602001015160016135f1565b610bbe565b6001838281518110610b7357610b73615400565b602002602001015103610b99576040516356d111fd60e11b815260040160405180910390fd5b610bbe84848381518110610baf57610baf615400565b602002602001015160006135f1565b80610bc88161542c565b915050610ac3565b50505050565b600060078281548110610beb57610beb615400565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c1e57610c1e615400565b6000918252602082206003850154600c909202019250610c4090600190615445565b90506000836003018281548110610c5957610c59615400565b600091825260208220600b909102019150600185015460ff166004811115610c8357610c83614ea3565b03610d5e5781158015610cd257506001840154600684019060ff166004811115610caf57610caf614ea3565b60048110610cbf57610cbf615400565b01546002850154610cd09042615445565b105b15610cf057604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d18576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d2f576002610d32565b60015b60018086018054909160ff1990911690836004811115610d5457610d54614ea3565b02179055506110bf565b60018085015460ff166004811115610d7857610d78614ea3565b03610e88576001840154600684019060ff166004811115610d9b57610d9b614ea3565b60048110610dab57610dab615400565b01546002850154610dbc9042615445565b108015610e5357506006816000015481548110610ddb57610ddb615400565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e519190615458565b155b15610e7157604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610d54565b6002600185015460ff166004811115610ea357610ea3614ea3565b03610ff1576001840154600684019060ff166004811115610ec657610ec6614ea3565b60048110610ed657610ed6615400565b01546002850154610ee79042615445565b108015610f7e57506006816000015481548110610f0657610f06615400565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610f58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7c9190615458565b155b15610f9c57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36110bf565b6003600185015460ff16600481111561100c5761100c614ea3565b03611086576001840154600684019060ff16600481111561102f5761102f614ea3565b6004811061103f5761103f615400565b015460028501546110509042615445565b101561106f57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610d54565b6004600185015460ff1660048111156110a1576110a1614ea3565b036110bf576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110fe9160ff1690615475565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061114a90600160481b900460ff16600a615567565b6111549084615576565b61115e91906155a3565b90505b92915050565b6000806007838154811061117d5761117d615400565b60009182526020822060036004909202019081018054919350906111a390600190615445565b815481106111b3576111b3615400565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106111e8576111e8615400565b90600052602060002090600c0201905080600501548260030154101561121357506000949350505050565b80546005805490916001600160601b031690811061123357611233615400565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061127957611279615400565b600091825260208220600360049092020190810180549193509061129f90600190615445565b815481106112af576112af615400565b90600052602060002090600b02019050600060068260000154815481106112d8576112d8615400565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa15801561132d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135191906155b7565b9199909850909650945050505050565b6000546001600160a01b0316331461138c5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b600581815481106113c757600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061145f575080546001600160401b03808416911610155b1561147c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff161561150c57604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061152257611522615400565b600091825260209091206004918202019150600182015460ff16600481111561154d5761154d614ea3565b1461156b57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061158057611580615400565b6000918252602082206004600b909202019081015490935091506115a484836155ef565b60058401546006850154600286015492935090916000906115c69083906155a3565b905060008660010154905060008060068960000154815481106115eb576115eb615400565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166b9190615602565b915050806000036116875783861115611682578395505b6116a7565b611692846002615576565b8611156116a7576116a4846002615576565b95505b60048801869055865b8681101561175d5784811015611709576117026040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613679565b955061174b565b61174b6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613b4a565b806117558161542c565b9150506116b0565b508488600501541461177157600588018590555b5050505050505050505050565b6000546001600160a01b031633146117a95760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6117d3614942565b6005826001600160601b0316815481106117ef576117ef615400565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116118165750505050509050919050565b6000546001600160a01b031633146118605760405163c383977560e01b815260040160405180910390fd5b60095460ff166118835760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6118c182614082565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061193f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661193360008051602061585c8339815191525490565b6001600160a01b031614155b1561195d5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119b7575060408051601f3d908101601f191682019092526119b491810190615602565b60015b6119df5781604051630c76093760e01b81526004016119d69190614b81565b60405180910390fd5b60008051602061585c8339815191528114611a1057604051632a87526960e21b8152600481018290526024016119d6565b60008051602061585c8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611ad9576000836001600160a01b031683604051611a77919061563f565b600060405180830381855af49150503d8060008114611ab2576040519150601f19603f3d011682016040523d82523d6000602084013e611ab7565b606091505b5050905080610bd0576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b2a5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061585c83398151915290565b60078181548110611b4d57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611baf57611baf615400565b6000918252602082206003600490920201908101805491935090611bd590600190615445565b81548110611be557611be5615400565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611c1a57611c1a615400565b90600052602060002090600c020190508060050154826003015410611cb95782546001600160601b031660001901611c5b576001600160ff1b039350611ce6565b6003820154611c6b906002615576565b611c769060016155ef565b81546005805490916001600160601b0316908110611c9657611c96615400565b90600052602060002090600c020160040154611cb29190615576565b9350611ce6565b6003820154611cc9906002615576565b611cd49060016155ef565b8160040154611ce39190615576565b93505b505050919050565b6000546001600160a01b03163314611d195760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611d34919061563f565b60006040518083038185875af1925050503d8060008114611d71576040519150601f19603f3d011682016040523d82523d6000602084013e611d76565b606091505b5050905080610bd0576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611dbc57604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611dec903390600401614b81565b602060405180830381865afa158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d9190615602565b600003611e4d576040516326b551e560e11b815260040160405180910390fd5b611ad93383836000806140b0565b6000546001600160a01b03163314611e865760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f055760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611fbd57506000546001600160a01b03163314155b15611fdb57604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611fff57604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120625760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b03168154811061208057612080615400565b90600052602060002090600c0201905060016001600160601b0316886001600160601b0316141580156120e2575080546005805488926001600160601b03169081106120ce576120ce615400565b90600052602060002090600c020160020154115b1561210057604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121855786600583600101838154811061212757612127615400565b90600052602060002001548154811061214257612142615400565b90600052602060002090600c020160020154101561217357604051639717078960e01b815260040160405180910390fd5b8061217d8161542c565b915050612103565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556121c89060068301908490614960565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161220c9695949392919061565b565b60405180910390a25050505050505050565b61228460405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6007838154811061229757612297615400565b906000526020600020906004020160030182815481106122b9576122b9615400565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561236857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161234a575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106123bf576123bf615400565b600091825260209091206004918202019150600182015460ff1660048111156123ea576123ea614ea3565b1461240857604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156124335760405163c977f8d360e01b815260040160405180910390fd5b600061243e83611260565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b1580156124f157600080fd5b505af1158015612505573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125395760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b03168154811061255657612556615400565b90600052602060002090600c020160020154111561258757604051639717078960e01b815260040160405180910390fd5b80516000036125a95760405163402585f560e01b815260040160405180910390fd5b6001600160601b0389166125d057604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156126ce5783818151811061262357612623615400565b6020026020010151600014806126565750600654845185908390811061264b5761264b615400565b602002602001015110155b1561267457604051633d58a98960e11b815260040160405180910390fd5b600182600a01600086848151811061268e5761268e615400565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806126c69061542c565b915050612608565b5060016000908152600a8201602052604090205460ff16612702576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c16178155604080516000815260208101918290525161273a91600184019161499e565b50805460ff60601b1916600160601b8b151502178155600281018990556003810188905560048082018890556005820187905561277d9060068301908790614960565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916127af9186918991016156ba565b600060405180830381600087803b1580156127c957600080fd5b505af11580156127dd573d6000803e3d6000fd5b5050505060058b6001600160601b0316815481106127fd576127fd615400565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d9061286a908e908e908e908e908e908e908d906156d3565b60405180910390a35050505050505050505050565b6006818154811061288f57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106128c1576128c1615400565b6000918252602090912060049091020190506003600182015460ff1660048111156128ee576128ee614ea3565b03612946576002810154815460058054929550916001600160601b0390911690811061291c5761291c615400565b600091825260209091206009600c909202010154600282015461293f91906155ef565b915061294f565b60009250600091505b50915091565b6000546001600160a01b031633146129805760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006129ad826134a1565b3410156129cd57604051630e3360f160e21b815260040160405180910390fd5b61115e838360003461426a565b6000546001600160a01b03163314612a055760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a3083611b99565b341015612a5057604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612a6557612a65615400565b6000918252602090912060049091020190506003600182015460ff166004811115612a9257612a92614ea3565b14612ab0576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612ac690600190615445565b81548110612ad657612ad6615400565b90600052602060002090600b020190506006816000015481548110612afd57612afd615400565b6000918252602090912001546001600160a01b03163314612b315760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612b7457612b74615400565b90600052602060002090600c020160050154846003015410612c7d576005836001600160601b031681548110612bac57612bac615400565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612bdf57612bdf615400565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c0b57600191505b84546001600160601b03848116911614612c7d57845460038601546001600160601b0390911690612c3e90600190615445565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612cc057612cc0615400565b90600052602060002090600c02019050806004015434612ce091906155a3565b826003018190555061271081600301548260020154612cff9190615576565b612d0991906155a3565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d4091615445565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612d7e57600080fd5b505af1158015612d92573d6000803e3d6000fd5b505086548454149150612e7890505784546003870154612db490600190615445565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e0257612e02615400565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612e45918d918d918d9190600401615750565b600060405180830381600087803b158015612e5f57600080fd5b505af1158015612e73573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612ee89190615475565b60405180910390a2505050505050505050565b60008060078381548110612f1157612f11615400565b906000526020600020906004020190508060030160018260030180549050612f399190615445565b81548110612f4957612f49615400565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612f8e5760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b60006007838154811061302157613021615400565b906000526020600020906004020190506000600182600301805490506130479190615445565b9050600082600301828154811061306057613060615400565b600091825260208220600b909102019150600184015460ff16600481111561308a5761308a614ea3565b146130a857604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106130c1576130c1615400565b6000918252602082200154600a8401546001600160a01b039091169250905b86811080156130f6575060038401546006850154105b156132fe5760006001600160a01b03841663d2b8035a8a846131178161542c565b955061312390876155ef565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015613166573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061318a9190615780565b90506001600160a01b0381166131a057506130e0565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926131d692869290910161579d565b600060405180830381600087803b1580156131f057600080fd5b505af1158015613204573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91613251918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036132f85760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b1580156132df57600080fd5b505af11580156132f3573d6000803e3d6000fd5b505050505b506130e0565b8084600a01600082825461331291906155ef565b90915550505050505050505050565b6000613366826103f086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134a192505050565b949350505050565b6000546001600160a01b031633146133995760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133f45760405163e51cf7bf60e01b815260040160405180910390fd5b6133ff858585613321565b82101561341f57604051630e3360f160e21b815260040160405180910390fd5b6134346001600160a01b0384163330856142a6565b613451576040516312171d8360e31b815260040160405180910390fd5b6134958686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925087915061426a9050565b90505b95945050505050565b60008060006134af84614382565b5091509150806005836001600160601b0316815481106134d1576134d1615400565b90600052602060002090600c0201600401546133669190615576565b6004546001600160a01b0316331461351857604051639d6cab9960e01b815260040160405180910390fd5b6135268484848460016140b0565b5050505050565b60006007828154811061354257613542615400565b600091825260209091206003600490920201015492915050565b6000546001600160a01b031633146135875760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b0316815481106135c7576135c7615400565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b03168154811061360e5761360e615400565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061369357613693615400565b906000526020600020906004020190506000816003018460200151815481106136be576136be615400565b90600052602060002090600b02019050600060068260000154815481106136e7576136e7615400565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa15801561376d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137919190615602565b90506127108111156137a257506127105b60006127106137b18382615445565b85600101546137c09190615576565b6137ca91906155a3565b9050808760c0018181516137de91906155ef565b90525060e08701516006850180546000929081106137fe576137fe615400565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161383f91859187910161579d565b600060405180830381600087803b15801561385957600080fd5b505af115801561386d573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c92506138a291859187910161579d565b600060405180830381600087803b1580156138bc57600080fd5b505af11580156138d0573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e786613910876157b6565b60098b01546040516139329392916000916001600160a01b03909116906157d2565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139bd9190615458565b613a23576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916139f091859101614b81565b600060405180830381600087803b158015613a0a57600080fd5b505af1158015613a1e573d6000803e3d6000fd5b505050505b60018860600151613a349190615445565b8860e00151148015613a4857506040880151155b15613b395760098501546001600160a01b0316613a91576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613ab8565b60005460028601546009870154613ab6926001600160a01b0391821692911690614409565b505b60005460c0890151600254613adb926001600160a01b0391821692911690614409565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613b3093909290916001600160a01b03909116906157f6565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613b6357613b63615400565b90600052602060002090600402019050600081600301836020015181548110613b8e57613b8e615400565b90600052602060002090600b0201905060006006826000015481548110613bb757613bb7615400565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613bf691615815565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c7a9190615602565b9050612710811115613c8b57506127105b60008360060186606001518760e00151613ca59190615815565b81548110613cb557613cb5615400565b600091825260208220015460018601546001600160a01b03909116925061271090613ce1908590615576565b613ceb91906155a3565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613d1d91869186910161579d565b600060405180830381600087803b158015613d3757600080fd5b505af1158015613d4b573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613d7e91869101614b81565b602060405180830381865afa158015613d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dbf9190615458565b613ddc57600254613dda906001600160a01b03168383614409565b505b60006127108489604001518a60c00151613df691906155a3565b613e009190615576565b613e0a91906155a3565b905080866008016000828254613e2091906155ef565b925050819055506000612710858a604001518960020154613e4191906155a3565b613e4b9190615576565b613e5591906155a3565b905080876007016000828254613e6b91906155ef565b9091555050600254613e87906001600160a01b03168584614409565b5060098701546001600160a01b0316613ec5576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613ee0565b6009870154613ede906001600160a01b03168583614409565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613f30928c928a928a92909116906157d2565b60405180910390a4600189606001516002613f4b9190615576565b613f559190615445565b8960e001510361407757600087600801548a60c00151613f759190615445565b9050600088600701548960020154613f8d9190615445565b905081151580613f9c57508015155b15611771578115613fc657600054600254613fc4916001600160a01b03918216911684614409565b505b801561402d5760098901546001600160a01b031661400c57600080546040516001600160a01b039091169183156108fc02918491818181858888f193505050505061402d565b60005460098a015461402b916001600160a01b03918216911683614409565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49161286a91879187916001600160a01b03909116906157f6565b505050505050505050565b6000546001600160a01b031633146140ad5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b03851615806140d257506005546001600160601b038616115b156140ea576140e28260046144d6565b506000613498565b831580159061412557506005856001600160601b03168154811061411057614110615400565b90600052602060002090600c02016002015484105b15614135576140e28260056144d6565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af11580156141a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141cc9190615829565b9194509250905060008160078111156141e7576141e7614ea3565b14614202576141f685826144d6565b60009350505050613498565b821561422f57600254614220906001600160a01b03168a30866142a6565b61422f576141f68560016144d6565b811561425b5760025461424c906001600160a01b03168a84614409565b61425b576141f68560026144d6565b50600198975050505050505050565b336000908152600a602052604081205460ff1661429a57604051630407618360e31b815260040160405180910390fd5b61349885858585614544565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161430b919061563f565b6000604051808303816000865af19150503d8060008114614348576040519150601f19603f3d011682016040523d82523d6000602084013e61434d565b606091505b50915091508180156143775750805115806143775750808060200190518101906143779190615458565b979650505050505050565b600080600060408451106143f7575050506020810151604082015160608301516001600160601b03831615806143c357506005546001600160601b03841610155b156143cd57600192505b816000036143da57600391505b8015806143e957506006548110155b156143f2575060015b614402565b506001915060039050815b9193909250565b6000806000856001600160a01b0316858560405160240161442b92919061579d565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251614460919061563f565b6000604051808303816000865af19150503d806000811461449d576040519150601f19603f3d011682016040523d82523d6000602084013e6144a2565b606091505b50915091508180156144cc5750805115806144cc5750808060200190518101906144cc9190615458565b9695505050505050565b6144e0828261482b565b60068160078111156144f4576144f4614ea3565b0361451257604051636590e91560e01b815260040160405180910390fd5b600781600781111561452657614526614ea3565b03611adb576040516358859f1d60e01b815260040160405180910390fd5b600080600061455286614382565b92505091506005826001600160601b03168154811061457357614573615400565b60009182526020808320848452600a600c90930201919091019052604090205460ff166145b35760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a90910155600680549296509092918490811061463e5761463e615400565b6000918252602082200154600580546001600160a01b039092169350906001600160601b03871690811061467457614674615400565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156146bf576146ba8a846004015461110d565b6146c5565b82600401545b90506146d1818a6155a3565b6003808401919091558683558301546002840154612710916146f291615576565b6146fc91906155a3565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561476f57600080fd5b505af1158015614783573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147bd9493929190615750565b600060405180830381600087803b1580156147d757600080fd5b505af11580156147eb573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b600182600181111561483f5761483f614ea3565b03614848575050565b600181600781111561485c5761485c614ea3565b0361487a57604051630f323ed960e11b815260040160405180910390fd5b600281600781111561488e5761488e614ea3565b036148ac5760405163e45e13a360e01b815260040160405180910390fd5b60038160078111156148c0576148c0614ea3565b036148de57604051631d91d0ed60e31b815260040160405180910390fd5b60048160078111156148f2576148f2614ea3565b03614910576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561492457614924614ea3565b03611adb57604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b826004810192821561498e579160200282015b8281111561498e578251825591602001919060010190614973565b5061499a9291506149d8565b5090565b82805482825590600052602060002090810192821561498e579160200282018281111561498e578251825591602001919060010190614973565b5b8082111561499a57600081556001016149d9565b6001600160a01b03811681146140ad57600080fd5b8035614a0d816149ed565b919050565b600060208284031215614a2457600080fd5b8135614a2f816149ed565b9392505050565b80356001600160601b0381168114614a0d57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614a8b57614a8b614a4d565b604052919050565b600082601f830112614aa457600080fd5b813560206001600160401b03821115614abf57614abf614a4d565b8160051b614ace828201614a63565b9283528481018201928281019087851115614ae857600080fd5b83870192505b8483101561437757823582529183019190830190614aee565b80151581146140ad57600080fd5b8035614a0d81614b07565b600080600060608486031215614b3557600080fd5b614b3e84614a36565b925060208401356001600160401b03811115614b5957600080fd5b614b6586828701614a93565b9250506040840135614b7681614b07565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614ba757600080fd5b5035919050565b60008060408385031215614bc157600080fd5b8235614bcc816149ed565b946020939093013593505050565b60008060408385031215614bed57600080fd5b8235614bf8816149ed565b91506020830135614c0881614b07565b809150509250929050565b600082601f830112614c2457600080fd5b604051608081018181106001600160401b0382111715614c4657614c46614a4d565b604052806080840185811115614c5b57600080fd5b845b81811015614c75578035835260209283019201614c5d565b509195945050505050565b600082601f830112614c9157600080fd5b81356001600160401b03811115614caa57614caa614a4d565b614cbd601f8201601f1916602001614a63565b818152846020838601011115614cd257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e031215614d1157600080fd5b8b35614d1c816149ed565b9a5060208c0135614d2c816149ed565b9950614d3a60408d01614a02565b9850614d4860608d01614a02565b9750614d5660808d01614a02565b9650614d6460a08d01614b15565b9550614d738d60c08e01614c13565b9450614d838d6101408e01614c13565b93506101c08c01356001600160401b03811115614d9f57600080fd5b614dab8e828f01614c80565b935050614dbb6101e08d01614a02565b9150614dca6102008d01614a02565b90509295989b509295989b9093969950565b600080600060608486031215614df157600080fd5b505081359360208301359350604090920135919050565b600060208284031215614e1a57600080fd5b61115e82614a36565b8060005b6004811015610bd0578151845260209384019390910190600101614e27565b608081016111618284614e23565b60008060408385031215614e6757600080fd5b8235614e72816149ed565b915060208301356001600160401b03811115614e8d57600080fd5b614e9985828601614c80565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614ed757634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614f076040830186614eb9565b9215156060820152608001529392505050565b600080600060608486031215614f2f57600080fd5b8335614f3a816149ed565b92506020840135915060408401356001600160401b03811115614f5c57600080fd5b614f6886828701614c80565b9150509250925092565b60008060408385031215614f8557600080fd5b614bcc83614a36565b600080600060608486031215614fa357600080fd5b8335614fae816149ed565b925060208401356001600160401b0381168114614fca57600080fd5b9150604084013560ff81168114614b7657600080fd5b6000806000806000806000610140888a031215614ffc57600080fd5b61500588614a36565b9650602088013561501581614b07565b955060408801359450606088013593506080880135925060a088013591506150408960c08a01614c13565b905092959891949750929550565b6000806040838503121561506157600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156150a95781516001600160a01b031687529582019590820190600101615084565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261510f610180850183615070565b60e08601516101008681019190915286015161012080870191909152860151909250610140615148818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561517857600080fd5b6151818a614a36565b985060208a013561519181614b07565b975060408a0135965060608a0135955060808a0135945060a08a013593506151bc8b60c08c01614c13565b92506101408a01356001600160401b03808211156151d957600080fd5b6151e58d838e01614c80565b93506101608c01359150808211156151fc57600080fd5b506152098c828d01614a93565b9150509295985092959850929598565b6000806040838503121561522c57600080fd5b8235915060208301356001600160401b03811115614e8d57600080fd5b60008060006060848603121561525e57600080fd5b833592506020840135915060408401356001600160401b03811115614f5c57600080fd5b60008083601f84011261529457600080fd5b5081356001600160401b038111156152ab57600080fd5b6020830191508360208285010111156152c357600080fd5b9250929050565b6000806000604084860312156152df57600080fd5b83356001600160401b038111156152f557600080fd5b61530186828701615282565b9094509250506020840135614b76816149ed565b60008060008060006080868803121561532d57600080fd5b8535945060208601356001600160401b0381111561534a57600080fd5b61535688828901615282565b909550935050604086013561536a816149ed565b949793965091946060013592915050565b60006020828403121561538d57600080fd5b81356001600160401b038111156153a357600080fd5b61336684828501614c80565b600080600080608085870312156153c557600080fd5b84356153d0816149ed565b93506153de60208601614a36565b92506040850135915060608501356153f581614b07565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161543e5761543e615416565b5060010190565b8181038181111561116157611161615416565b60006020828403121561546a57600080fd5b8151614a2f81614b07565b602081016111618284614eb9565b600181815b808511156154be5781600019048211156154a4576154a4615416565b808516156154b157918102915b93841c9390800290615488565b509250929050565b6000826154d557506001611161565b816154e257506000611161565b81600181146154f857600281146155025761551e565b6001915050611161565b60ff84111561551357615513615416565b50506001821b611161565b5060208310610133831016604e8410600b8410161715615541575081810a611161565b61554b8383615483565b806000190482111561555f5761555f615416565b029392505050565b600061115e60ff8416836154c6565b808202811582820484141761116157611161615416565b634e487b7160e01b600052601260045260246000fd5b6000826155b2576155b261558d565b500490565b6000806000606084860312156155cc57600080fd5b8351925060208401516155de81614b07565b6040850151909250614b7681614b07565b8082018082111561116157611161615416565b60006020828403121561561457600080fd5b5051919050565b60005b8381101561563657818101518382015260200161561e565b50506000910152565b6000825161565181846020870161561b565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261437760a0830184614e23565b600081518084526156a681602086016020860161561b565b601f01601f19169290920160200192915050565b828152604060208201526000613366604083018461568e565b60006101408083018a1515845260208a8186015289604086015288606086015287608086015261570660a0860188614e23565b6101208501929092528451908190526101608401918086019160005b8181101561573e57835185529382019392820192600101615722565b50929c9b505050505050505050505050565b84815283602082015260806040820152600061576f608083018561568e565b905082606083015295945050505050565b60006020828403121561579257600080fd5b8151614a2f816149ed565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016157cb576157cb615416565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b6000826158245761582461558d565b500690565b60008060006060848603121561583e57600080fd5b8351925060208401519150604084015160088110614b7657600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ffd4b8cc0150c09d914b76d2012f161e53d22e94660667769ec86952a8f5683364736f6c63430008120033", - "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 - }, - "storageLayout": { - "storage": [ - { - "astId": 338, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 340, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "guardian", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 343, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "pinakion", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)77" - }, - { - "astId": 345, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "jurorProsecutionModule", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 348, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "sortitionModule", - "offset": 0, - "slot": "4", - "type": "t_contract(ISortitionModule)4413" - }, - { - "astId": 352, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "courts", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(Court)257_storage)dyn_storage" - }, - { - "astId": 356, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disputeKits", - "offset": 0, - "slot": "6", - "type": "t_array(t_contract(IDisputeKit)4289)dyn_storage" - }, - { - "astId": 360, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disputes", - "offset": 0, - "slot": "7", - "type": "t_array(t_struct(Dispute)274_storage)dyn_storage" - }, - { - "astId": 366, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "currencyRates", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_contract(IERC20)77,t_struct(CurrencyRate)323_storage)" - }, - { - "astId": 368, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "paused", - "offset": 0, - "slot": "9", - "type": "t_bool" - }, - { - "astId": 3808, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "arbitrableWhitelist", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 3811, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "jurorNft", - "offset": 0, - "slot": "11", - "type": "t_contract(IERC721)193" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_contract(IDisputeKit)4289)dyn_storage": { - "base": "t_contract(IDisputeKit)4289", - "encoding": "dynamic_array", - "label": "contract IDisputeKit[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Court)257_storage)dyn_storage": { - "base": "t_struct(Court)257_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)274_storage)dyn_storage": { - "base": "t_struct(Dispute)274_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)299_storage)dyn_storage": { - "base": "t_struct(Round)299_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreBase.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)4046": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IDisputeKit)4289": { - "encoding": "inplace", - "label": "contract IDisputeKit", - "numberOfBytes": "20" - }, - "t_contract(IERC20)77": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_contract(IERC721)193": { - "encoding": "inplace", - "label": "contract IERC721", - "numberOfBytes": "20" - }, - "t_contract(ISortitionModule)4413": { - "encoding": "inplace", - "label": "contract ISortitionModule", - "numberOfBytes": "20" - }, - "t_enum(Period)231": { - "encoding": "inplace", - "label": "enum KlerosCoreBase.Period", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_contract(IERC20)77,t_struct(CurrencyRate)323_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)77", - "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)323_storage" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_struct(Court)257_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Court", - "members": [ - { - "astId": 233, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 235, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 238, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 240, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 242, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 244, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 246, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 250, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 254, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "supportedDisputeKits", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 256, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disabled", - "offset": 0, - "slot": "11", - "type": "t_bool" - } - ], - "numberOfBytes": "384" - }, - "t_struct(CurrencyRate)323_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.CurrencyRate", - "members": [ - { - "astId": 318, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 320, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 322, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)274_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Dispute", - "members": [ - { - "astId": 259, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 262, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)4046" - }, - { - "astId": 265, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)231" - }, - { - "astId": 267, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 269, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "lastPeriodChange", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 273, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "rounds", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Round)299_storage)dyn_storage" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Round)299_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreBase.Round", - "members": [ - { - "astId": 276, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "disputeKitID", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 278, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "pnkAtStakePerJuror", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 280, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 282, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "nbVotes", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 284, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "repartitions", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 286, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "pnkPenalties", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 289, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "drawnJurors", - "offset": 0, - "slot": "6", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 291, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 293, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "sumPnkRewardPaid", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 296, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "feeToken", - "offset": 0, - "slot": "9", - "type": "t_contract(IERC20)77" - }, - { - "astId": 298, - "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", - "label": "drawIterations", - "offset": 0, - "slot": "10", - "type": "t_uint256" - } - ], - "numberOfBytes": "352" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Proxy.json deleted file mode 100644 index ec265acca..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreNeo_Proxy.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "transactionIndex": 2, - "gasUsed": "670390", - "logsBloom": "0x00000000000000000000400020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000140000000004000000000000000000020000000000000010000800402000000008000008000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000028000000000000004000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711", - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000d40aa608801a639e292e10c235b90488d04070b1" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - }, - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 2, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - }, - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000001" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - }, - { - "transactionIndex": 2, - "blockNumber": 21125156, - "transactionHash": "0x7478f8ad2cb95e17467c9358a98fc0c0e22976df680fc1653071bdfb81303126", - "address": "0x26bf077037550e437605F07e25EfcAd510715C3A", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xe9bd2617efebaf3236bc6453bb375b951eebe064e3d70168838a449a7414e711" - } - ], - "blockNumber": 21125156, - "cumulativeGasUsed": "831421", - "status": 1, - "byzantium": true - }, - "args": [ - "0x419B8C9b13e7Ea358D0ACBfD2214a9Ec0f8e182e", - "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d40aa608801a639e292e10c235b90488d04070b1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000220000000000000000000000000809533c303c10915bb5c0585f2d8d738e2a4fb640000000000000000000000007dfcf7444a81d4a92a641ee292f36458cd9eb36500000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "db363a789eea4155c2105a5d4adf4ddb", - "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", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json deleted file mode 100644 index adb4c6b54..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json +++ /dev/null @@ -1,1617 +0,0 @@ -{ - "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NoRulerSet", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulerOnly", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "RulingModeNotSet", - "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": "UnsuccessfulCall", - "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": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "mode", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "AutoRuled", - "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]" - } - ], - "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": 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 KlerosCoreRuler.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_oldRuler", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "RulerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct KlerosCoreRuler.RulerSettings", - "name": "_settings", - "type": "tuple" - } - ], - "name": "RulerSettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "changeRuler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "_presetOverridden", - "type": "bool" - } - ], - "name": "changeRulingModeToAutomaticPreset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToAutomaticRandom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToManual", - "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]" - } - ], - "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": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreRuler.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "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" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getNextDisputeID", - "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": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - } - ], - "internalType": "struct KlerosCoreRuler.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "rulers", - "outputs": [ - { - "internalType": "address", - "name": "ruler", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "name": "rulingResults", - "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": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "settings", - "outputs": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "transactionIndex": 1, - "gasUsed": "366202", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000040000000000000100005000000000000000000000000000040008000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004800000000000000060000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33", - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 81776148, - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "topics": [ - "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 0, - "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" - }, - { - "transactionIndex": 1, - "blockNumber": 81776148, - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" - } - ], - "blockNumber": 81776148, - "cumulativeGasUsed": "366202", - "status": 1, - "byzantium": true - }, - "args": [ - "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" - ], - "numDeployments": 1, - "solcInputHash": "2c1a31d10a5f76f480d447fbb502d6fc", - "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\":{\"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\":\"shanghai\",\"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.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": "0x608060405234801561000f575f80fd5b506040516102e53803806102e583398101604081905261002e91610143565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5580515f14610106575f826001600160a01b031682604051610072919061020b565b5f60405180830381855af49150503d805f81146100aa576040519150601f19603f3d011682016040523d82523d5f602084013e6100af565b606091505b50509050806101045760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610226565b634e487b7160e01b5f52604160045260245ffd5b5f5b8381101561013b578181015183820152602001610123565b50505f910152565b5f8060408385031215610154575f80fd5b82516001600160a01b038116811461016a575f80fd5b60208401519092506001600160401b0380821115610186575f80fd5b818501915085601f830112610199575f80fd5b8151818111156101ab576101ab61010d565b604051601f8201601f19908116603f011681019083821181831017156101d3576101d361010d565b816040528281528860208487010111156101eb575f80fd5b6101fc836020830160208801610121565b80955050505050509250929050565b5f825161021c818460208701610121565b9190910192915050565b60b3806102325f395ff3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x34B944D42cAcfC8266955D07A80181D2054aa225", - [ - 0, - 10000, - { - "type": "BigNumber", - "hex": "0x016345785d8a0000" - }, - 16 - ] - ] - }, - "implementation": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json deleted file mode 100644 index e7b6087ec..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json +++ /dev/null @@ -1,2221 +0,0 @@ -{ - "address": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "AppealFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationFeesNotEnough", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeNotAppealable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidForkingCourtAsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NoRulerSet", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "RulerOnly", - "type": "error" - }, - { - "inputs": [], - "name": "RulingAlreadyExecuted", - "type": "error" - }, - { - "inputs": [], - "name": "RulingModeNotSet", - "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": "UnsuccessfulCall", - "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": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "mode", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "AutoRuled", - "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]" - } - ], - "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": 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 KlerosCoreRuler.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_oldRuler", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "RulerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct KlerosCoreRuler.RulerSettings", - "name": "_settings", - "type": "tuple" - } - ], - "name": "RulerSettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_roundID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_degreeOfCoherency", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_pnkAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_feeAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_jump", - "type": "bool" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "_accepted", - "type": "bool" - } - ], - "name": "changeAcceptedFeeTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeCourtParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_feeToken", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_rateInEth", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "_rateDecimals", - "type": "uint8" - } - ], - "name": "changeCurrencyRates", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "address", - "name": "_newRuler", - "type": "address" - } - ], - "name": "changeRuler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "_presetOverridden", - "type": "bool" - } - ], - "name": "changeRulingModeToAutomaticPreset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToAutomaticRandom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "changeRulingModeToManual", - "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]" - } - ], - "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": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "courtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrableV2", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "enum KlerosCoreRuler.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "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" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "tied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "overridden", - "type": "bool" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getNextDisputeID", - "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": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumFeeRewardPaid", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "feeToken", - "type": "address" - } - ], - "internalType": "struct KlerosCoreRuler.Round", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_courtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "_courtParameters", - "type": "uint256[4]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "rulers", - "outputs": [ - { - "internalType": "address", - "name": "ruler", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "name": "rulingResults", - "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": "contract IArbitrableV2", - "name": "arbitrable", - "type": "address" - } - ], - "name": "settings", - "outputs": [ - { - "internalType": "enum KlerosCoreRuler.RulingMode", - "name": "rulingMode", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "presetRuling", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "presetTied", - "type": "bool" - }, - { - "internalType": "bool", - "name": "presetOverridden", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x980897f012784c3078669e2fdda6b4a26f637cfb947b775a41d514941a94cd44", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - "transactionIndex": 1, - "gasUsed": "3342918", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000020000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0954a4104a3be063ea280671e52e5659c5218a334aa322367f9ed19993df3e25", - "transactionHash": "0x980897f012784c3078669e2fdda6b4a26f637cfb947b775a41d514941a94cd44", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 81776138, - "transactionHash": "0x980897f012784c3078669e2fdda6b4a26f637cfb947b775a41d514941a94cd44", - "address": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x0954a4104a3be063ea280671e52e5659c5218a334aa322367f9ed19993df3e25" - } - ], - "blockNumber": 81776138, - "cumulativeGasUsed": "3342918", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "2c1a31d10a5f76f480d447fbb502d6fc", - "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\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoRulerSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingModeNotSet\",\"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\":\"UnsuccessfulCall\",\"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\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"AutoRuled\",\"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]\"}],\"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\":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 KlerosCoreRuler.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldRuler\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"RulerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct KlerosCoreRuler.RulerSettings\",\"name\":\"_settings\",\"type\":\"tuple\"}],\"name\":\"RulerSettingsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"changeRuler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_presetOverridden\",\"type\":\"bool\"}],\"name\":\"changeRulingModeToAutomaticPreset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToAutomaticRandom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToManual\",\"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]\"}],\"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\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextDisputeID\",\"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\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"internalType\":\"struct KlerosCoreRuler.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"rulers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ruler\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"name\":\"rulingResults\",\"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\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"settings\",\"outputs\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"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\":{\"appeal(uint256,uint256,bytes,bool)\":{\"details\":\"Appeals the ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"}},\"appealCost(uint256,bool)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])\":{\"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.\",\"_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.\"}},\"execute(uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_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,uint256,bool,bool)\":{\"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.\"}},\"initialize(address,address,uint256[4])\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_governor\":\"The governor's address.\",\"_pinakion\":\"The address of the token 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.\"},\"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\":\"KlerosCoreRuler Core arbitrator contract for development and testing purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/KlerosCoreRuler.sol\":\"KlerosCoreRuler\"},\"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/devtools/KlerosCoreRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreRuler\\n/// Core arbitrator contract for development and testing purposes.\\ncontract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum RulingMode {\\n uninitialized,\\n manual, // executeRuling() is called manually.\\n automaticRandom, // The ruling is given randomly automatically.\\n automaticPreset // The ruling is given automatically with a preset value.\\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 RulerSettings {\\n RulingMode rulingMode; // The ruling mode of the arbitrator.\\n uint256 presetRuling; // The ruling to give in case of automatic ruling mode.\\n bool presetTied; // Whether the ruling is tied or not.\\n bool presetOverridden; // Whether the ruling is overridden or not.\\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 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 Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n struct RulingResult {\\n uint256 ruling;\\n bool tied;\\n bool overridden;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n IERC20 public pinakion; // The Pinakion token contract.\\n Court[] public courts; // The courts.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n mapping(IArbitrableV2 arbitrable => address ruler) public rulers; // The ruler of each arbitrable contract.\\n mapping(IArbitrableV2 arbitrable => RulerSettings) public settings; // The settings of each arbitrable contract.\\n mapping(uint256 disputeID => RulingResult) public rulingResults; // The ruling results of each dispute.\\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 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 );\\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 CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\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 AutoRuled(\\n IArbitrableV2 indexed _arbitrable,\\n RulingMode indexed mode,\\n uint256 indexed _disputeID,\\n uint256 _ruling,\\n bool tied,\\n bool overridden\\n );\\n event RulerSettingsChanged(IArbitrableV2 indexed _arbitrable, RulerSettings _settings);\\n event RulerChanged(IArbitrableV2 indexed _arbitrable, address indexed _oldRuler, address indexed _newRuler);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n function initialize(\\n address _governor,\\n IERC20 _pinakion,\\n uint256[4] memory _courtParameters\\n ) external reinitializer(1) {\\n governor = _governor;\\n pinakion = _pinakion;\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = false;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = [0, 0, 0, 0];\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n court.hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n court.timesPerPeriod\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `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 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 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 ) external onlyByGovernor {\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\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 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 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 function changeRulingModeToManual(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n \\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.manual;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticRandom(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticRandom;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticPreset(\\n IArbitrableV2 _arbitrable,\\n uint256 _presetRuling,\\n bool _presetTied,\\n bool _presetOverridden\\n ) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticPreset;\\n arbitratedSettings.presetRuling = _presetRuling;\\n arbitratedSettings.presetTied = _presetTied;\\n arbitratedSettings.presetOverridden = _presetOverridden;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRuler(IArbitrableV2 _arbitrable, address _newRuler) external {\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n rulers[_arbitrable] = _newRuler;\\n emit RulerChanged(_arbitrable, msg.sender, _newRuler);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , ) = _unpackExtraData(_extraData);\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n\\n Round storage round = dispute.rounds.push();\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n _autoRule(disputeID, _numberOfChoices);\\n\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n function _autoRule(uint256 _disputeID, uint256 _numberOfChoices) internal {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 roundID = dispute.rounds.length - 1;\\n RulerSettings storage arbitratedSettings = settings[dispute.arbitrated];\\n if (arbitratedSettings.rulingMode == RulingMode.uninitialized) revert RulingModeNotSet();\\n if (arbitratedSettings.rulingMode == RulingMode.manual) {\\n // NOP\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticPreset) {\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticPreset,\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.executeRuling(\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.execute(_disputeID, roundID);\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticRandom) {\\n uint256 pseudoRandomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1)))) %\\n _numberOfChoices; // Not secure but it's just a dev tool for testing, sue me\\n bool tied = pseudoRandomNumber & 4 == 0;\\n bool overridden = pseudoRandomNumber & 2 == 0;\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticRandom,\\n _disputeID,\\n pseudoRandomNumber,\\n tied,\\n overridden\\n );\\n this.executeRuling(_disputeID, pseudoRandomNumber, tied, overridden);\\n this.execute(_disputeID, roundID);\\n }\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n function appeal(\\n uint256 _disputeID,\\n uint256 _numberOfChoices,\\n bytes memory /*_extraData*/,\\n bool _jump\\n ) external payable {\\n if (msg.value < appealCost(_disputeID, _jump)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (rulers[dispute.arbitrated] != msg.sender) revert RulerOnly();\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n uint96 newCourtID = dispute.courtID;\\n\\n if (_jump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\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\\n Round storage extraRound = dispute.rounds.push();\\n extraRound.totalFeesForJurors = msg.value;\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n\\n _autoRule(_disputeID, _numberOfChoices);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n function execute(uint256 _disputeID, uint256 _round) external {\\n Dispute storage dispute = disputes[_disputeID];\\n address account = rulers[dispute.arbitrated];\\n if (account == address(0)) revert NoRulerSet();\\n\\n // Transfer the fees back to the ruler\\n Round storage round = dispute.rounds[_round];\\n uint256 feeReward = round.totalFeesForJurors;\\n round.sumFeeRewardPaid += feeReward;\\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(account, _disputeID, _round, 1, int256(0), int256(feeReward), round.feeToken);\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID, uint256 _ruling, bool tied, bool overridden) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n if (msg.sender != rulers[dispute.arbitrated] && msg.sender != address(this)) revert RulerOnly();\\n\\n rulingResults[_disputeID] = RulingResult(_ruling, tied, overridden);\\n dispute.ruled = true;\\n dispute.arbitrated.rule(_disputeID, _ruling);\\n\\n emit Ruling(dispute.arbitrated, _disputeID, _ruling);\\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, ) = _unpackExtraData(_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 /// @param _jump Whether to jump to the parent court or not.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID, bool _jump) 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 uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror;\\n if (_jump) {\\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 * ((nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((nbVotes * 2) + 1);\\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 RulingResult storage rulingResult = rulingResults[_disputeID];\\n return (rulingResult.ruling, rulingResult.tied, rulingResult.overridden);\\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 getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n function getNextDisputeID() external view returns (uint256) {\\n return disputes.length;\\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 Court storage court = courts[dispute.courtID];\\n return dispute.rounds[dispute.rounds.length - 1].totalFeesForJurors / court.feeForJuror;\\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 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 _unpackExtraData(\\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) {\\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 GovernorOrInstructorOnly();\\n error RulerOnly();\\n error NoRulerSet();\\n error RulingModeNotSet();\\n error UnsuccessfulCall();\\n error InvalidForkingCourtAsParent();\\n error ArbitrationFeesNotEnough();\\n error TokenNotAccepted();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error RulingAlreadyExecuted();\\n error TransferFailed();\\n}\\n\",\"keccak256\":\"0x32d56f223bd06209e9a90bcafec3af6a6d3da5be41e9cd288d72c67566309e0c\",\"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 _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\":\"0xf28c04c5c537d4f2faa02b03c389b6932a8b7061ae6fca91be8db53191c941f6\",\"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/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": "0x60a06040523060805234801562000014575f80fd5b506200001f62000025565b620000d8565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000755760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d55780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613232620000ff5f395f81816112df0152818161130801526114fc01526132325ff3fe6080604052600436106101e4575f3560e01c8063564a565d1161010f578063d98493f6116100a8578063e6d49cdf1161006d578063e6d49cdf14610700578063f6506db41461073e578063f7434ea91461075d578063fbf405b01461077c578063fc6f8f161461079b575f80fd5b8063d98493f614610643578063d9ee095f14610662578063db8a173b14610675578063e2373ab314610689578063e4c0aaf4146106e1575f80fd5b8063564a565d146104fd5780636736b70c1461052c578063751accd01461054b5780637934c0be1461056a57806382d022371461058957806386541b24146105a85780638a9bb02a146105c7578063c13517e114610611578063c71f425314610624575f80fd5b80632177470c116101815780632177470c146103db578063379f0a17146103fa5780633cfd11841461042e578063405d51ae1461045a57806343818d661461047957806347cdcc1d146104985780634f1ef286146104b757806352d1902d146104ca5780635601eaea146104de575f80fd5b8062f5822c146101e857806301fcf74d146102095780630219da791461023b57806305d3177d146102ac5780630c340a24146102cb5780630e3993a4146103015780631860592b146103205780631c3db16d1461033f5780631f5a0dd21461037b575b5f80fd5b3480156101f3575f80fd5b50610207610202366004612834565b6107ba565b005b348015610214575f80fd5b50610228610223366004612863565b610806565b6040519081526020015b60405180910390f35b348015610246575f80fd5b50610284610255366004612834565b60046020525f908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff1690820152606001610232565b3480156102b7575f80fd5b506102076102c636600461290f565b610958565b3480156102d6575f80fd5b505f546102e9906001600160a01b031681565b6040516001600160a01b039091168152602001610232565b34801561030c575f80fd5b5061020761031b366004612834565b610baf565b34801561032b575f80fd5b5061022861033a366004612954565b610cb6565b34801561034a575f80fd5b5061035e61035936600461297e565b610d0f565b604080519384529115156020840152151590820152606001610232565b348015610386575f80fd5b5061039a61039536600461297e565b610d38565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610232565b3480156103e6575f80fd5b506102076103f5366004612995565b610d95565b348015610405575f80fd5b506102e9610414366004612834565b60056020525f90815260409020546001600160a01b031681565b348015610439575f80fd5b5061044d6104483660046129f7565b610f53565b6040516102329190612a32565b348015610465575f80fd5b50610207610474366004612a40565b610fbc565b348015610484575f80fd5b50610207610493366004612834565b611179565b3480156104a3575f80fd5b506102076104b2366004612aa9565b61123a565b6102076104c5366004612b5d565b6112cb565b3480156104d5575f80fd5b506102286114f0565b3480156104e9575f80fd5b506102076104f8366004612ba9565b61154c565b348015610508575f80fd5b5061051c61051736600461297e565b6116b4565b6040516102329493929190612bf1565b348015610537575f80fd5b50610207610546366004612c2e565b611707565b348015610556575f80fd5b50610207610565366004612c63565b611814565b348015610575575f80fd5b50610207610584366004612cb7565b6118b9565b348015610594575f80fd5b506102076105a3366004612ce3565b611936565b3480156105b3575f80fd5b506102076105c2366004612a40565b6119f1565b3480156105d2575f80fd5b506105e66105e1366004612ba9565b611ae2565b604080518251815260208084015190820152918101516001600160a01b031690820152606001610232565b61022861061f366004612d3b565b611b89565b34801561062f575f80fd5b5061022861063e36600461297e565b611bbf565b34801561064e575f80fd5b5061022861065d366004612dac565b611c62565b610207610670366004612df3565b611ca5565b348015610680575f80fd5b50600354610228565b348015610694575f80fd5b506106d16106a3366004612834565b60066020525f908152604090208054600182015460029092015460ff91821692918181169161010090041684565b6040516102329493929190612e56565b3480156106ec575f80fd5b506102076106fb366004612834565b611eed565b34801561070b575f80fd5b5061035e61071a36600461297e565b60076020525f90815260409020805460019091015460ff8082169161010090041683565b348015610749575f80fd5b50610228610758366004612e81565b611f38565b348015610768575f80fd5b50610228610777366004612ee2565b61201a565b348015610787575f80fd5b506001546102e9906001600160a01b031681565b3480156107a6575f80fd5b506102286107b536600461297e565b612062565b5f546001600160a01b031633146107e45760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f806003848154811061081b5761081b612f13565b5f91825260208220600260039092020190810180549193509061084090600190612f3b565b8154811061085057610850612f13565b5f918252602082208454600280546003909402909201945090916001600160601b0390911690811061088457610884612f13565b905f5260205f2090600b020190505f8160040154835f01546108a69190612f62565b905085156109265783546001600160601b03165f19016108cf576001600160ff1b03945061094e565b6108da816002612f75565b6108e5906001612f8c565b82546002805490916001600160601b031690811061090557610905612f13565b905f5260205f2090600b02016004015461091f9190612f75565b945061094e565b610931816002612f75565b61093c906001612f8c565b826004015461094b9190612f75565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109a1575080546001600160401b03808416911610155b156109be5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781555f80546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610a76578160200160208202803683370190505b508051610a8d916001840191602090910190612745565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184525f808252948101859052928301849052820192909252610af29160068401919061278e565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b5895600160601b90930460ff1694919390929060068b0190612f9f565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b038181165f9081526005602052604090205416610bf5576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f90815260056020526040902054163314610c2e576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610caa9190612ff9565b60405180910390a25050565b6001600160a01b0382165f9081526004602052604081205461010081046001600160401b031690610cf290600160481b900460ff16600a61311d565b610cfc9084612f75565b610d069190612f62565b90505b92915050565b5f818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d47575f80fd5b5f9182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b5f60038581548110610da957610da9612f13565b905f5260205f20906003020190508060010160019054906101000a900460ff1615610de75760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b039081165f90815260056020526040902054163314801590610e195750333014155b15610e37576040516301627e2760e61b815260040160405180910390fd5b6040805160608101825285815284151560208083019182528515158385019081525f8a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c56906044015f604051808303815f87803b158015610eed575f80fd5b505af1158015610eff573d5f803e3d5ffd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610f5b6127c1565b6002826001600160601b031681548110610f7757610f77612f13565b5f918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610f9d5750505050509050919050565b5f546001600160a01b03163314610fe65760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661100d57604051631ef4f64960e01b815260040160405180910390fd5b600280546001810182555f9182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b161781559091604051908082528060200260200182016040528015611085578160200160208202803683370190505b50805161109c916001840191602090910190612745565b50805460ff60601b1916600160601b8915150217815560028101879055600381018690556004808201869055600582018590556110df90600683019085906127df565b506002896001600160601b0316815481106110fc576110fc612f13565b5f91825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76190611166908c908c908c908c908c908c9061312b565b60405180910390a3505050505050505050565b6001600160a01b038181165f90815260056020526040902054166111bf576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f908152600560205260409020541633146111f8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610c6c565b6001600160a01b038281165f90815260056020526040902054163314611273576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b038281165f8181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b6112d48261208f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061135157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113455f805160206131dd8339815191525490565b6001600160a01b031614155b1561136f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c9575060408051601f3d908101601f191682019092526113c69181019061315d565b60015b6113f657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b5f805160206131dd833981519152811461142657604051632a87526960e21b8152600481018290526024016113ed565b5f805160206131dd8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28151156114eb575f836001600160a01b03168360405161148a9190613174565b5f60405180830381855af49150503d805f81146114c2576040519150601f19603f3d011682016040523d82523d5f602084013e6114c7565b606091505b50509050806114e9576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b5f306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461153a5760405163703e46dd60e11b815260040160405180910390fd5b505f805160206131dd83398151915290565b5f6003838154811061156057611560612f13565b5f9182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806115b45760405163f4612fe560e01b815260040160405180910390fd5b5f8260020184815481106115ca576115ca612f13565b905f5260205f20906003020190505f815f0154905080826001015f8282546115f29190612f8c565b909155505060028201546001600160a01b0316611633576040516001600160a01b0384169082156108fc029083905f818181858888f193505050505061164e565b600282015461164c906001600160a01b031684836120bc565b505b600282015460408051600181525f60208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b600381815481106116c3575f80fd5b5f918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b038481165f908152600560205260409020541661174d576001600160a01b0384165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481165f90815260056020526040902054163314611786576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0384165f8181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f490611805908490612ff9565b60405180910390a25050505050565b5f546001600160a01b0316331461183e5760405163c383977560e01b815260040160405180910390fd5b5f836001600160a01b031683836040516118589190613174565b5f6040518083038185875af1925050503d805f8114611892576040519150601f19603f3d011682016040523d82523d5f602084013e611897565b606091505b50509050806114e9576040516322092f2f60e11b815260040160405180910390fd5b5f546001600160a01b031633146118e35760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0382165f81815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b5f546001600160a01b031633146119605760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0383165f81815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b5f546001600160a01b03163314611a1b5760405163c383977560e01b815260040160405180910390fd5b5f6002886001600160601b031681548110611a3857611a38612f13565b5f9182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611a8c90600683019084906127df565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611ad09695949392919061312b565b60405180910390a25050505050505050565b611b0c60405180606001604052805f81526020015f81526020015f6001600160a01b031681525090565b60038381548110611b1f57611b1f612f13565b905f5260205f2090600302016002018281548110611b3f57611b3f612f13565b5f918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b5f611b938261201a565b341015611bb357604051630e3360f160e21b815260040160405180910390fd5b610d0683835f34612180565b5f8060038381548110611bd457611bd4612f13565b5f91825260208220600390910201805460028054929450916001600160601b03909116908110611c0657611c06612f13565b905f5260205f2090600b0201905080600401548260020160018460020180549050611c319190612f3b565b81548110611c4157611c41612f13565b905f5260205f2090600302015f0154611c5a9190612f62565b949350505050565b5f611c5a8261033a86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061201a92505050565b611caf8482610806565b341015611ccf57604051633191f8f160e01b815260040160405180910390fd5b5f60038581548110611ce357611ce3612f13565b5f918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611d38576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611d5357611d53612bc9565b14611d71576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611e22576002816001600160601b031681548110611d9e57611d9e612f13565b5f9182526020909120600b909102015482546001600160601b039182169250168114611e2257815460028301546001600160601b0390911690611de390600190612f3b565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff1916905560028301805491820181555f90815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b915f604051611ed291906131a0565b60405180910390a2611ee48787612272565b50505050505050565b5f546001600160a01b03163314611f175760405163c383977560e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382165f9081526004602052604081205460ff16611f705760405163e51cf7bf60e01b815260040160405180910390fd5b611f7b858585611c62565b821015611f9b57604051630e3360f160e21b815260040160405180910390fd5b611fb06001600160a01b0384163330856125fc565b611fcd576040516312171d8360e31b815260040160405180910390fd5b6120108686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508892508791506121809050565b9695505050505050565b5f805f612026846126d3565b5091509150806002836001600160601b03168154811061204857612048612f13565b905f5260205f2090600b020160040154611c5a9190612f75565b5f6003828154811061207657612076612f13565b5f91825260209091206002600390920201015492915050565b5f546001600160a01b031633146120b95760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b038381166024830152604482018390525f91829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121189190613174565b5f604051808303815f865af19150503d805f8114612151576040519150601f19603f3d011682016040523d82523d5f602084013e612156565b606091505b509150915081801561201057508051158061201057508080602001905181019061201091906131ae565b5f8061218b856126d3565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d01805492830181555f9081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a161790559094509192509061223b8489612272565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed995905f90a3505050949350505050565b5f6003838154811061228657612286612f13565b905f5260205f20906003020190505f600182600201805490506122a99190612f3b565b8254600160601b90046001600160a01b03165f908152600660205260408120919250815460ff1660038111156122e1576122e1612bc9565b036122ff5760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff16600381111561231757612317612bc9565b146125f5576003815460ff16600381111561233457612334612bc9565b03612479578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c906084015f604051808303815f87803b15801561240b575f80fd5b505af115801561241d573d5f803e3d5ffd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea91506044015f604051808303815f87803b15801561245e575f80fd5b505af1158015612470573d5f803e3d5ffd5b505050506125f5565b6002815460ff16600381111561249157612491612bc9565b036125f5575f846124a3600143612f3b565b604080519140602083015201604051602081830303815290604052805190602001205f1c6124d191906131c9565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c906084015f604051808303815f87803b158015612588575f80fd5b505af115801561259a573d5f803e3d5ffd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea91506044015f604051808303815f87803b1580156125db575f80fd5b505af11580156125ed573d5f803e3d5ffd5b505050505050505b5050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516126609190613174565b5f604051808303815f865af19150503d805f8114612699576040519150601f19603f3d011682016040523d82523d5f602084013e61269e565b606091505b50915091508180156126c85750805115806126c85750808060200190518101906126c891906131ae565b979650505050505050565b5f805f6040845110612736575050506020810151604082015160608301516001600160601b038316158061271257506002546001600160601b03841610155b1561271c57600192505b815f0361272857600391505b80612731575060015b610d31565b50600193600393508492509050565b828054828255905f5260205f2090810192821561277e579160200282015b8281111561277e578251825591602001919060010190612763565b5061278a92915061280c565b5090565b826004810192821561277e579160200282015b8281111561277e578251829060ff169055916020019190600101906127a1565b60405180608001604052806004906020820280368337509192915050565b826004810192821561277e579160200282018281111561277e578251825591602001919060010190612763565b5b8082111561278a575f815560010161280d565b6001600160a01b03811681146120b9575f80fd5b5f60208284031215612844575f80fd5b813561284f81612820565b9392505050565b80151581146120b9575f80fd5b5f8060408385031215612874575f80fd5b82359150602083013561288681612856565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126128b4575f80fd5b604051608081018181106001600160401b03821117156128d6576128d6612891565b6040528060808401858111156128ea575f80fd5b845b818110156129045780358352602092830192016128ec565b509195945050505050565b5f805f60c08486031215612921575f80fd5b833561292c81612820565b9250602084013561293c81612820565b915061294b85604086016128a5565b90509250925092565b5f8060408385031215612965575f80fd5b823561297081612820565b946020939093013593505050565b5f6020828403121561298e575f80fd5b5035919050565b5f805f80608085870312156129a8575f80fd5b843593506020850135925060408501356129c181612856565b915060608501356129d181612856565b939692955090935050565b80356001600160601b03811681146129f2575f80fd5b919050565b5f60208284031215612a07575f80fd5b610d06826129dc565b805f5b60048110156114e9578151845260209384019390910190600101612a13565b60808101610d098284612a10565b5f805f805f805f610140888a031215612a57575f80fd5b612a60886129dc565b96506020880135612a7081612856565b955060408801359450606088013593506080880135925060a08801359150612a9b8960c08a016128a5565b905092959891949750929550565b5f8060408385031215612aba575f80fd5b8235612ac581612820565b9150602083013561288681612820565b5f82601f830112612ae4575f80fd5b81356001600160401b0380821115612afe57612afe612891565b604051601f8301601f19908116603f01168101908282118183101715612b2657612b26612891565b81604052838152866020858801011115612b3e575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215612b6e575f80fd5b8235612b7981612820565b915060208301356001600160401b03811115612b93575f80fd5b612b9f85828601612ad5565b9150509250929050565b5f8060408385031215612bba575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52602160045260245ffd5b60058110612bed57612bed612bc9565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612c1d6040830185612bdd565b821515606083015295945050505050565b5f805f8060808587031215612c41575f80fd5b8435612c4c81612820565b93506020850135925060408501356129c181612856565b5f805f60608486031215612c75575f80fd5b8335612c8081612820565b92506020840135915060408401356001600160401b03811115612ca1575f80fd5b612cad86828701612ad5565b9150509250925092565b5f8060408385031215612cc8575f80fd5b8235612cd381612820565b9150602083013561288681612856565b5f805f60608486031215612cf5575f80fd5b8335612d0081612820565b925060208401356001600160401b0381168114612d1b575f80fd5b9150604084013560ff81168114612d30575f80fd5b809150509250925092565b5f8060408385031215612d4c575f80fd5b8235915060208301356001600160401b03811115612b93575f80fd5b5f8083601f840112612d78575f80fd5b5081356001600160401b03811115612d8e575f80fd5b602083019150836020828501011115612da5575f80fd5b9250929050565b5f805f60408486031215612dbe575f80fd5b83356001600160401b03811115612dd3575f80fd5b612ddf86828701612d68565b9094509250506020840135612d3081612820565b5f805f8060808587031215612e06575f80fd5b843593506020850135925060408501356001600160401b03811115612e29575f80fd5b612e3587828801612ad5565b92505060608501356129d181612856565b60048110612bed57612bed612bc9565b60808101612e648287612e46565b602082019490945291151560408301521515606090910152919050565b5f805f805f60808688031215612e95575f80fd5b8535945060208601356001600160401b03811115612eb1575f80fd5b612ebd88828901612d68565b9095509350506040860135612ed181612820565b949793965091946060013592915050565b5f60208284031215612ef2575f80fd5b81356001600160401b03811115612f07575f80fd5b611c5a84828501612ad5565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b81810381811115610d0957610d09612f27565b634e487b7160e01b5f52601260045260245ffd5b5f82612f7057612f70612f4e565b500490565b8082028115828204841417610d0957610d09612f27565b80820180821115610d0957610d09612f27565b5f610120820190508715158252602087602084015286604084015285606084015284608084015260a08301845f5b6004811015612fea57815483529183019160019182019101612fcd565b50505050979650505050505050565b5f60808201905061300e8260ff855416612e46565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561307757815f190482111561305d5761305d612f27565b8085161561306a57918102915b93841c9390800290613042565b509250929050565b5f8261308d57506001610d09565b8161309957505f610d09565b81600181146130af57600281146130b9576130d5565b6001915050610d09565b60ff8411156130ca576130ca612f27565b50506001821b610d09565b5060208310610133831016604e8410600b84101617156130f8575081810a610d09565b613102838361303d565b805f190482111561311557613115612f27565b029392505050565b5f610d0660ff84168361307f565b5f6101208201905087151582528660208301528560408301528460608301528360808301526126c860a0830184612a10565b5f6020828403121561316d575f80fd5b5051919050565b5f82515f5b818110156131935760208186018101518583015201613179565b505f920191825250919050565b60208101610d098284612bdd565b5f602082840312156131be575f80fd5b815161284f81612856565b5f826131d7576131d7612f4e565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f2e22a0dce5ce1f5dee73c7f609484912562e77d9ae9b2964b5eeed771279c2464736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106101e4575f3560e01c8063564a565d1161010f578063d98493f6116100a8578063e6d49cdf1161006d578063e6d49cdf14610700578063f6506db41461073e578063f7434ea91461075d578063fbf405b01461077c578063fc6f8f161461079b575f80fd5b8063d98493f614610643578063d9ee095f14610662578063db8a173b14610675578063e2373ab314610689578063e4c0aaf4146106e1575f80fd5b8063564a565d146104fd5780636736b70c1461052c578063751accd01461054b5780637934c0be1461056a57806382d022371461058957806386541b24146105a85780638a9bb02a146105c7578063c13517e114610611578063c71f425314610624575f80fd5b80632177470c116101815780632177470c146103db578063379f0a17146103fa5780633cfd11841461042e578063405d51ae1461045a57806343818d661461047957806347cdcc1d146104985780634f1ef286146104b757806352d1902d146104ca5780635601eaea146104de575f80fd5b8062f5822c146101e857806301fcf74d146102095780630219da791461023b57806305d3177d146102ac5780630c340a24146102cb5780630e3993a4146103015780631860592b146103205780631c3db16d1461033f5780631f5a0dd21461037b575b5f80fd5b3480156101f3575f80fd5b50610207610202366004612834565b6107ba565b005b348015610214575f80fd5b50610228610223366004612863565b610806565b6040519081526020015b60405180910390f35b348015610246575f80fd5b50610284610255366004612834565b60046020525f908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff1690820152606001610232565b3480156102b7575f80fd5b506102076102c636600461290f565b610958565b3480156102d6575f80fd5b505f546102e9906001600160a01b031681565b6040516001600160a01b039091168152602001610232565b34801561030c575f80fd5b5061020761031b366004612834565b610baf565b34801561032b575f80fd5b5061022861033a366004612954565b610cb6565b34801561034a575f80fd5b5061035e61035936600461297e565b610d0f565b604080519384529115156020840152151590820152606001610232565b348015610386575f80fd5b5061039a61039536600461297e565b610d38565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610232565b3480156103e6575f80fd5b506102076103f5366004612995565b610d95565b348015610405575f80fd5b506102e9610414366004612834565b60056020525f90815260409020546001600160a01b031681565b348015610439575f80fd5b5061044d6104483660046129f7565b610f53565b6040516102329190612a32565b348015610465575f80fd5b50610207610474366004612a40565b610fbc565b348015610484575f80fd5b50610207610493366004612834565b611179565b3480156104a3575f80fd5b506102076104b2366004612aa9565b61123a565b6102076104c5366004612b5d565b6112cb565b3480156104d5575f80fd5b506102286114f0565b3480156104e9575f80fd5b506102076104f8366004612ba9565b61154c565b348015610508575f80fd5b5061051c61051736600461297e565b6116b4565b6040516102329493929190612bf1565b348015610537575f80fd5b50610207610546366004612c2e565b611707565b348015610556575f80fd5b50610207610565366004612c63565b611814565b348015610575575f80fd5b50610207610584366004612cb7565b6118b9565b348015610594575f80fd5b506102076105a3366004612ce3565b611936565b3480156105b3575f80fd5b506102076105c2366004612a40565b6119f1565b3480156105d2575f80fd5b506105e66105e1366004612ba9565b611ae2565b604080518251815260208084015190820152918101516001600160a01b031690820152606001610232565b61022861061f366004612d3b565b611b89565b34801561062f575f80fd5b5061022861063e36600461297e565b611bbf565b34801561064e575f80fd5b5061022861065d366004612dac565b611c62565b610207610670366004612df3565b611ca5565b348015610680575f80fd5b50600354610228565b348015610694575f80fd5b506106d16106a3366004612834565b60066020525f908152604090208054600182015460029092015460ff91821692918181169161010090041684565b6040516102329493929190612e56565b3480156106ec575f80fd5b506102076106fb366004612834565b611eed565b34801561070b575f80fd5b5061035e61071a36600461297e565b60076020525f90815260409020805460019091015460ff8082169161010090041683565b348015610749575f80fd5b50610228610758366004612e81565b611f38565b348015610768575f80fd5b50610228610777366004612ee2565b61201a565b348015610787575f80fd5b506001546102e9906001600160a01b031681565b3480156107a6575f80fd5b506102286107b536600461297e565b612062565b5f546001600160a01b031633146107e45760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f806003848154811061081b5761081b612f13565b5f91825260208220600260039092020190810180549193509061084090600190612f3b565b8154811061085057610850612f13565b5f918252602082208454600280546003909402909201945090916001600160601b0390911690811061088457610884612f13565b905f5260205f2090600b020190505f8160040154835f01546108a69190612f62565b905085156109265783546001600160601b03165f19016108cf576001600160ff1b03945061094e565b6108da816002612f75565b6108e5906001612f8c565b82546002805490916001600160601b031690811061090557610905612f13565b905f5260205f2090600b02016004015461091f9190612f75565b945061094e565b610931816002612f75565b61093c906001612f8c565b826004015461094b9190612f75565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109a1575080546001600160401b03808416911610155b156109be5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781555f80546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610a76578160200160208202803683370190505b508051610a8d916001840191602090910190612745565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184525f808252948101859052928301849052820192909252610af29160068401919061278e565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b5895600160601b90930460ff1694919390929060068b0190612f9f565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b038181165f9081526005602052604090205416610bf5576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f90815260056020526040902054163314610c2e576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610caa9190612ff9565b60405180910390a25050565b6001600160a01b0382165f9081526004602052604081205461010081046001600160401b031690610cf290600160481b900460ff16600a61311d565b610cfc9084612f75565b610d069190612f62565b90505b92915050565b5f818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d47575f80fd5b5f9182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b5f60038581548110610da957610da9612f13565b905f5260205f20906003020190508060010160019054906101000a900460ff1615610de75760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b039081165f90815260056020526040902054163314801590610e195750333014155b15610e37576040516301627e2760e61b815260040160405180910390fd5b6040805160608101825285815284151560208083019182528515158385019081525f8a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c56906044015f604051808303815f87803b158015610eed575f80fd5b505af1158015610eff573d5f803e3d5ffd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610f5b6127c1565b6002826001600160601b031681548110610f7757610f77612f13565b5f918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610f9d5750505050509050919050565b5f546001600160a01b03163314610fe65760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661100d57604051631ef4f64960e01b815260040160405180910390fd5b600280546001810182555f9182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b161781559091604051908082528060200260200182016040528015611085578160200160208202803683370190505b50805161109c916001840191602090910190612745565b50805460ff60601b1916600160601b8915150217815560028101879055600381018690556004808201869055600582018590556110df90600683019085906127df565b506002896001600160601b0316815481106110fc576110fc612f13565b5f91825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76190611166908c908c908c908c908c908c9061312b565b60405180910390a3505050505050505050565b6001600160a01b038181165f90815260056020526040902054166111bf576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f908152600560205260409020541633146111f8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610c6c565b6001600160a01b038281165f90815260056020526040902054163314611273576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b038281165f8181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b6112d48261208f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061135157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113455f805160206131dd8339815191525490565b6001600160a01b031614155b1561136f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c9575060408051601f3d908101601f191682019092526113c69181019061315d565b60015b6113f657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b5f805160206131dd833981519152811461142657604051632a87526960e21b8152600481018290526024016113ed565b5f805160206131dd8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28151156114eb575f836001600160a01b03168360405161148a9190613174565b5f60405180830381855af49150503d805f81146114c2576040519150601f19603f3d011682016040523d82523d5f602084013e6114c7565b606091505b50509050806114e9576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b5f306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461153a5760405163703e46dd60e11b815260040160405180910390fd5b505f805160206131dd83398151915290565b5f6003838154811061156057611560612f13565b5f9182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806115b45760405163f4612fe560e01b815260040160405180910390fd5b5f8260020184815481106115ca576115ca612f13565b905f5260205f20906003020190505f815f0154905080826001015f8282546115f29190612f8c565b909155505060028201546001600160a01b0316611633576040516001600160a01b0384169082156108fc029083905f818181858888f193505050505061164e565b600282015461164c906001600160a01b031684836120bc565b505b600282015460408051600181525f60208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b600381815481106116c3575f80fd5b5f918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b038481165f908152600560205260409020541661174d576001600160a01b0384165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481165f90815260056020526040902054163314611786576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0384165f8181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f490611805908490612ff9565b60405180910390a25050505050565b5f546001600160a01b0316331461183e5760405163c383977560e01b815260040160405180910390fd5b5f836001600160a01b031683836040516118589190613174565b5f6040518083038185875af1925050503d805f8114611892576040519150601f19603f3d011682016040523d82523d5f602084013e611897565b606091505b50509050806114e9576040516322092f2f60e11b815260040160405180910390fd5b5f546001600160a01b031633146118e35760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0382165f81815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b5f546001600160a01b031633146119605760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0383165f81815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b5f546001600160a01b03163314611a1b5760405163c383977560e01b815260040160405180910390fd5b5f6002886001600160601b031681548110611a3857611a38612f13565b5f9182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611a8c90600683019084906127df565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611ad09695949392919061312b565b60405180910390a25050505050505050565b611b0c60405180606001604052805f81526020015f81526020015f6001600160a01b031681525090565b60038381548110611b1f57611b1f612f13565b905f5260205f2090600302016002018281548110611b3f57611b3f612f13565b5f918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b5f611b938261201a565b341015611bb357604051630e3360f160e21b815260040160405180910390fd5b610d0683835f34612180565b5f8060038381548110611bd457611bd4612f13565b5f91825260208220600390910201805460028054929450916001600160601b03909116908110611c0657611c06612f13565b905f5260205f2090600b0201905080600401548260020160018460020180549050611c319190612f3b565b81548110611c4157611c41612f13565b905f5260205f2090600302015f0154611c5a9190612f62565b949350505050565b5f611c5a8261033a86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061201a92505050565b611caf8482610806565b341015611ccf57604051633191f8f160e01b815260040160405180910390fd5b5f60038581548110611ce357611ce3612f13565b5f918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611d38576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611d5357611d53612bc9565b14611d71576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611e22576002816001600160601b031681548110611d9e57611d9e612f13565b5f9182526020909120600b909102015482546001600160601b039182169250168114611e2257815460028301546001600160601b0390911690611de390600190612f3b565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff1916905560028301805491820181555f90815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b915f604051611ed291906131a0565b60405180910390a2611ee48787612272565b50505050505050565b5f546001600160a01b03163314611f175760405163c383977560e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382165f9081526004602052604081205460ff16611f705760405163e51cf7bf60e01b815260040160405180910390fd5b611f7b858585611c62565b821015611f9b57604051630e3360f160e21b815260040160405180910390fd5b611fb06001600160a01b0384163330856125fc565b611fcd576040516312171d8360e31b815260040160405180910390fd5b6120108686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508892508791506121809050565b9695505050505050565b5f805f612026846126d3565b5091509150806002836001600160601b03168154811061204857612048612f13565b905f5260205f2090600b020160040154611c5a9190612f75565b5f6003828154811061207657612076612f13565b5f91825260209091206002600390920201015492915050565b5f546001600160a01b031633146120b95760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b038381166024830152604482018390525f91829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121189190613174565b5f604051808303815f865af19150503d805f8114612151576040519150601f19603f3d011682016040523d82523d5f602084013e612156565b606091505b509150915081801561201057508051158061201057508080602001905181019061201091906131ae565b5f8061218b856126d3565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d01805492830181555f9081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a161790559094509192509061223b8489612272565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed995905f90a3505050949350505050565b5f6003838154811061228657612286612f13565b905f5260205f20906003020190505f600182600201805490506122a99190612f3b565b8254600160601b90046001600160a01b03165f908152600660205260408120919250815460ff1660038111156122e1576122e1612bc9565b036122ff5760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff16600381111561231757612317612bc9565b146125f5576003815460ff16600381111561233457612334612bc9565b03612479578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c906084015f604051808303815f87803b15801561240b575f80fd5b505af115801561241d573d5f803e3d5ffd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea91506044015f604051808303815f87803b15801561245e575f80fd5b505af1158015612470573d5f803e3d5ffd5b505050506125f5565b6002815460ff16600381111561249157612491612bc9565b036125f5575f846124a3600143612f3b565b604080519140602083015201604051602081830303815290604052805190602001205f1c6124d191906131c9565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c906084015f604051808303815f87803b158015612588575f80fd5b505af115801561259a573d5f803e3d5ffd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea91506044015f604051808303815f87803b1580156125db575f80fd5b505af11580156125ed573d5f803e3d5ffd5b505050505050505b5050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516126609190613174565b5f604051808303815f865af19150503d805f8114612699576040519150601f19603f3d011682016040523d82523d5f602084013e61269e565b606091505b50915091508180156126c85750805115806126c85750808060200190518101906126c891906131ae565b979650505050505050565b5f805f6040845110612736575050506020810151604082015160608301516001600160601b038316158061271257506002546001600160601b03841610155b1561271c57600192505b815f0361272857600391505b80612731575060015b610d31565b50600193600393508492509050565b828054828255905f5260205f2090810192821561277e579160200282015b8281111561277e578251825591602001919060010190612763565b5061278a92915061280c565b5090565b826004810192821561277e579160200282015b8281111561277e578251829060ff169055916020019190600101906127a1565b60405180608001604052806004906020820280368337509192915050565b826004810192821561277e579160200282018281111561277e578251825591602001919060010190612763565b5b8082111561278a575f815560010161280d565b6001600160a01b03811681146120b9575f80fd5b5f60208284031215612844575f80fd5b813561284f81612820565b9392505050565b80151581146120b9575f80fd5b5f8060408385031215612874575f80fd5b82359150602083013561288681612856565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126128b4575f80fd5b604051608081018181106001600160401b03821117156128d6576128d6612891565b6040528060808401858111156128ea575f80fd5b845b818110156129045780358352602092830192016128ec565b509195945050505050565b5f805f60c08486031215612921575f80fd5b833561292c81612820565b9250602084013561293c81612820565b915061294b85604086016128a5565b90509250925092565b5f8060408385031215612965575f80fd5b823561297081612820565b946020939093013593505050565b5f6020828403121561298e575f80fd5b5035919050565b5f805f80608085870312156129a8575f80fd5b843593506020850135925060408501356129c181612856565b915060608501356129d181612856565b939692955090935050565b80356001600160601b03811681146129f2575f80fd5b919050565b5f60208284031215612a07575f80fd5b610d06826129dc565b805f5b60048110156114e9578151845260209384019390910190600101612a13565b60808101610d098284612a10565b5f805f805f805f610140888a031215612a57575f80fd5b612a60886129dc565b96506020880135612a7081612856565b955060408801359450606088013593506080880135925060a08801359150612a9b8960c08a016128a5565b905092959891949750929550565b5f8060408385031215612aba575f80fd5b8235612ac581612820565b9150602083013561288681612820565b5f82601f830112612ae4575f80fd5b81356001600160401b0380821115612afe57612afe612891565b604051601f8301601f19908116603f01168101908282118183101715612b2657612b26612891565b81604052838152866020858801011115612b3e575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215612b6e575f80fd5b8235612b7981612820565b915060208301356001600160401b03811115612b93575f80fd5b612b9f85828601612ad5565b9150509250929050565b5f8060408385031215612bba575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52602160045260245ffd5b60058110612bed57612bed612bc9565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612c1d6040830185612bdd565b821515606083015295945050505050565b5f805f8060808587031215612c41575f80fd5b8435612c4c81612820565b93506020850135925060408501356129c181612856565b5f805f60608486031215612c75575f80fd5b8335612c8081612820565b92506020840135915060408401356001600160401b03811115612ca1575f80fd5b612cad86828701612ad5565b9150509250925092565b5f8060408385031215612cc8575f80fd5b8235612cd381612820565b9150602083013561288681612856565b5f805f60608486031215612cf5575f80fd5b8335612d0081612820565b925060208401356001600160401b0381168114612d1b575f80fd5b9150604084013560ff81168114612d30575f80fd5b809150509250925092565b5f8060408385031215612d4c575f80fd5b8235915060208301356001600160401b03811115612b93575f80fd5b5f8083601f840112612d78575f80fd5b5081356001600160401b03811115612d8e575f80fd5b602083019150836020828501011115612da5575f80fd5b9250929050565b5f805f60408486031215612dbe575f80fd5b83356001600160401b03811115612dd3575f80fd5b612ddf86828701612d68565b9094509250506020840135612d3081612820565b5f805f8060808587031215612e06575f80fd5b843593506020850135925060408501356001600160401b03811115612e29575f80fd5b612e3587828801612ad5565b92505060608501356129d181612856565b60048110612bed57612bed612bc9565b60808101612e648287612e46565b602082019490945291151560408301521515606090910152919050565b5f805f805f60808688031215612e95575f80fd5b8535945060208601356001600160401b03811115612eb1575f80fd5b612ebd88828901612d68565b9095509350506040860135612ed181612820565b949793965091946060013592915050565b5f60208284031215612ef2575f80fd5b81356001600160401b03811115612f07575f80fd5b611c5a84828501612ad5565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b81810381811115610d0957610d09612f27565b634e487b7160e01b5f52601260045260245ffd5b5f82612f7057612f70612f4e565b500490565b8082028115828204841417610d0957610d09612f27565b80820180821115610d0957610d09612f27565b5f610120820190508715158252602087602084015286604084015285606084015284608084015260a08301845f5b6004811015612fea57815483529183019160019182019101612fcd565b50505050979650505050505050565b5f60808201905061300e8260ff855416612e46565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561307757815f190482111561305d5761305d612f27565b8085161561306a57918102915b93841c9390800290613042565b509250929050565b5f8261308d57506001610d09565b8161309957505f610d09565b81600181146130af57600281146130b9576130d5565b6001915050610d09565b60ff8411156130ca576130ca612f27565b50506001821b610d09565b5060208310610133831016604e8410600b84101617156130f8575081810a610d09565b613102838361303d565b805f190482111561311557613115612f27565b029392505050565b5f610d0660ff84168361307f565b5f6101208201905087151582528660208301528560408301528460608301528360808301526126c860a0830184612a10565b5f6020828403121561316d575f80fd5b5051919050565b5f82515f5b818110156131935760208186018101518583015201613179565b505f920191825250919050565b60208101610d098284612bdd565b5f602082840312156131be575f80fd5b815161284f81612856565b5f826131d7576131d7612f4e565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f2e22a0dce5ce1f5dee73c7f609484912562e77d9ae9b2964b5eeed771279c2464736f6c63430008180033", - "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": { - "appeal(uint256,uint256,bytes,bool)": { - "details": "Appeals the ruling of a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute.", - "_jump": "Whether to jump to the parent court or not." - } - }, - "appealCost(uint256,bool)": { - "details": "Gets the cost of appealing a specified dispute.", - "params": { - "_disputeID": "The ID of the dispute.", - "_jump": "Whether to jump to the parent court or not." - }, - "returns": { - "cost": "The appeal cost." - } - }, - "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." - }, - "returns": { - "cost": "The arbitration cost in ETH." - } - }, - "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", - "params": { - "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", - "_feeToken": "The ERC20 token used to pay fees." - }, - "returns": { - "cost": "The arbitration cost in `_feeToken`." - } - }, - "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", - "params": { - "_accepted": "Whether the token is supported or not as a method of fee payment.", - "_feeToken": "The fee token." - } - }, - "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", - "params": { - "_feeToken": "The fee token.", - "_rateDecimals": "The new decimals of the fee token rate.", - "_rateInEth": "The new rate of the fee token in ETH." - } - }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, - "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", - "params": { - "_pinakion": "The new value for the `pinakion` storage variable." - } - }, - "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." - }, - "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])": { - "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.", - "_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." - } - }, - "execute(uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", - "params": { - "_disputeID": "The ID of the dispute.", - "_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,uint256,bool,bool)": { - "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." - } - }, - "initialize(address,address,uint256[4])": { - "details": "Initializer (constructor equivalent for upgradable contracts).", - "params": { - "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", - "_governor": "The governor's address.", - "_pinakion": "The address of the token 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." - }, - "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": "KlerosCoreRuler Core arbitrator contract for development and testing purposes.", - "version": 1 - }, - "userdoc": { - "errors": { - "FailedDelegateCall()": [ - { - "notice": "Failed Delegated call" - } - ], - "InvalidImplementation(address)": [ - { - "notice": "The `implementation` is not UUPS-compliant" - } - ] - }, - "events": { - "Upgraded(address)": { - "notice": "Emitted when the `implementation` has been successfully upgraded." - } - }, - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 14410, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 14413, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "pinakion", - "offset": 0, - "slot": "1", - "type": "t_contract(IERC20)1229" - }, - { - "astId": 14417, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "courts", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Court)14361_storage)dyn_storage" - }, - { - "astId": 14421, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "disputes", - "offset": 0, - "slot": "3", - "type": "t_array(t_struct(Dispute)14376_storage)dyn_storage" - }, - { - "astId": 14427, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "currencyRates", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)14391_storage)" - }, - { - "astId": 14432, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulers", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_contract(IArbitrableV2)21560,t_address)" - }, - { - "astId": 14438, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "settings", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_contract(IArbitrableV2)21560,t_struct(RulerSettings)14339_storage)" - }, - { - "astId": 14443, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulingResults", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_uint256,t_struct(RulingResult)14398_storage)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Court)14361_storage)dyn_storage": { - "base": "t_struct(Court)14361_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Court[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Dispute)14376_storage)dyn_storage": { - "base": "t_struct(Dispute)14376_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Dispute[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Round)14384_storage)dyn_storage": { - "base": "t_struct(Round)14384_storage", - "encoding": "dynamic_array", - "label": "struct KlerosCoreRuler.Round[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)4_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[4]", - "numberOfBytes": "128" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IArbitrableV2)21560": { - "encoding": "inplace", - "label": "contract IArbitrableV2", - "numberOfBytes": "20" - }, - "t_contract(IERC20)1229": { - "encoding": "inplace", - "label": "contract IERC20", - "numberOfBytes": "20" - }, - "t_enum(Period)14329": { - "encoding": "inplace", - "label": "enum KlerosCoreRuler.Period", - "numberOfBytes": "1" - }, - "t_enum(RulingMode)14323": { - "encoding": "inplace", - "label": "enum KlerosCoreRuler.RulingMode", - "numberOfBytes": "1" - }, - "t_mapping(t_contract(IArbitrableV2)21560,t_address)": { - "encoding": "mapping", - "key": "t_contract(IArbitrableV2)21560", - "label": "mapping(contract IArbitrableV2 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_contract(IArbitrableV2)21560,t_struct(RulerSettings)14339_storage)": { - "encoding": "mapping", - "key": "t_contract(IArbitrableV2)21560", - "label": "mapping(contract IArbitrableV2 => struct KlerosCoreRuler.RulerSettings)", - "numberOfBytes": "32", - "value": "t_struct(RulerSettings)14339_storage" - }, - "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)14391_storage)": { - "encoding": "mapping", - "key": "t_contract(IERC20)1229", - "label": "mapping(contract IERC20 => struct KlerosCoreRuler.CurrencyRate)", - "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)14391_storage" - }, - "t_mapping(t_uint256,t_struct(RulingResult)14398_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct KlerosCoreRuler.RulingResult)", - "numberOfBytes": "32", - "value": "t_struct(RulingResult)14398_storage" - }, - "t_struct(Court)14361_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Court", - "members": [ - { - "astId": 14341, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "parent", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 14343, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "hiddenVotes", - "offset": 12, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 14346, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "children", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 14348, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "minStake", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 14350, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "alpha", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 14352, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feeForJuror", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 14354, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "jurorsForCourtJump", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 14358, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "timesPerPeriod", - "offset": 0, - "slot": "6", - "type": "t_array(t_uint256)4_storage" - }, - { - "astId": 14360, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "disabled", - "offset": 0, - "slot": "10", - "type": "t_bool" - } - ], - "numberOfBytes": "352" - }, - "t_struct(CurrencyRate)14391_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.CurrencyRate", - "members": [ - { - "astId": 14386, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feePaymentAccepted", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 14388, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rateInEth", - "offset": 1, - "slot": "0", - "type": "t_uint64" - }, - { - "astId": 14390, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rateDecimals", - "offset": 9, - "slot": "0", - "type": "t_uint8" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Dispute)14376_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Dispute", - "members": [ - { - "astId": 14363, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "courtID", - "offset": 0, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 14366, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "arbitrated", - "offset": 12, - "slot": "0", - "type": "t_contract(IArbitrableV2)21560" - }, - { - "astId": 14369, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "period", - "offset": 0, - "slot": "1", - "type": "t_enum(Period)14329" - }, - { - "astId": 14371, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "ruled", - "offset": 1, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 14375, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rounds", - "offset": 0, - "slot": "2", - "type": "t_array(t_struct(Round)14384_storage)dyn_storage" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Round)14384_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.Round", - "members": [ - { - "astId": 14378, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "totalFeesForJurors", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 14380, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "sumFeeRewardPaid", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 14383, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "feeToken", - "offset": 0, - "slot": "2", - "type": "t_contract(IERC20)1229" - } - ], - "numberOfBytes": "96" - }, - "t_struct(RulerSettings)14339_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.RulerSettings", - "members": [ - { - "astId": 14332, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "rulingMode", - "offset": 0, - "slot": "0", - "type": "t_enum(RulingMode)14323" - }, - { - "astId": 14334, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetRuling", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 14336, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetTied", - "offset": 0, - "slot": "2", - "type": "t_bool" - }, - { - "astId": 14338, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "presetOverridden", - "offset": 1, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(RulingResult)14398_storage": { - "encoding": "inplace", - "label": "struct KlerosCoreRuler.RulingResult", - "members": [ - { - "astId": 14393, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "ruling", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 14395, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "tied", - "offset": 0, - "slot": "1", - "type": "t_bool" - }, - { - "astId": 14397, - "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", - "label": "overridden", - "offset": 1, - "slot": "1", - "type": "t_bool" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint64": { - "encoding": "inplace", - "label": "uint64", - "numberOfBytes": "8" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json deleted file mode 100644 index bff9fda17..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "transactionIndex": 1, - "gasUsed": "366202", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000040000000000000100005000000000000000000000000000040008000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004800000000000000060000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33", - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 81776148, - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "topics": [ - "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 0, - "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" - }, - { - "transactionIndex": 1, - "blockNumber": 81776148, - "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", - "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 1, - "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" - } - ], - "blockNumber": 81776148, - "cumulativeGasUsed": "366202", - "status": 1, - "byzantium": true - }, - "args": [ - "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" - ], - "numDeployments": 1, - "solcInputHash": "2c1a31d10a5f76f480d447fbb502d6fc", - "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\":{\"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\":\"shanghai\",\"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.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": "0x608060405234801561000f575f80fd5b506040516102e53803806102e583398101604081905261002e91610143565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5580515f14610106575f826001600160a01b031682604051610072919061020b565b5f60405180830381855af49150503d805f81146100aa576040519150601f19603f3d011682016040523d82523d5f602084013e6100af565b606091505b50509050806101045760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610226565b634e487b7160e01b5f52604160045260245ffd5b5f5b8381101561013b578181015183820152602001610123565b50505f910152565b5f8060408385031215610154575f80fd5b82516001600160a01b038116811461016a575f80fd5b60208401519092506001600160401b0380821115610186575f80fd5b818501915085601f830112610199575f80fd5b8151818111156101ab576101ab61010d565b604051601f8201601f19908116603f011681019083821181831017156101d3576101d361010d565b816040528281528860208487010111156101eb575f80fd5b6101fc836020830160208801610121565b80955050505050509250929050565b5f825161021c818460208701610121565b9190910192915050565b60b3806102325f395ff3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json index f02b3234c..c554b6f0f 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json @@ -1,5 +1,5 @@ { - "address": "0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091", + "address": "0xa2425b724B32D40cbB85ea6e181cfb023CE9c014", "abi": [ { "inputs": [ @@ -128,31 +128,31 @@ "type": "function" } ], - "transactionHash": "0x021bfe3731521c0619fa56f401c3873dad4e4b330d34f727bb401226b8120edf", + "transactionHash": "0x4c61b704395ff32de35b5da7ed8f969034d3c7c74cbecb151ac24e9c8093d825", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091", - "transactionIndex": 1, - "gasUsed": "363333", + "contractAddress": "0xa2425b724B32D40cbB85ea6e181cfb023CE9c014", + "transactionIndex": 4, + "gasUsed": "346893", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc565952e226bb538ebd218e89b7923eb2517fb3ffcf5202fb1e1ccacbc1c30e5", - "transactionHash": "0x021bfe3731521c0619fa56f401c3873dad4e4b330d34f727bb401226b8120edf", + "blockHash": "0x9dcfe50c4b1f0b35d0bcc01bbae28e43b43fa18eb553b9b365ea52a0160747e9", + "transactionHash": "0x4c61b704395ff32de35b5da7ed8f969034d3c7c74cbecb151ac24e9c8093d825", "logs": [], - "blockNumber": 121346480, - "cumulativeGasUsed": "363333", + "blockNumber": 141215302, + "cumulativeGasUsed": "646902", "status": 1, "byzantium": true }, "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8" + "0x4838e31E0ea315232c431598110FE677cAF2D6E6" ], "numDeployments": 1, - "solcInputHash": "ede3f7f4426109631936df3b8acee8f2", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balanceOf(address)\":{\"details\":\"Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\",\"params\":{\"_account\":\"The address to query.\"},\"returns\":{\"totalStaked\":\"Total amount staked in V2 by the address.\"}},\"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\",\"params\":{\"_core\":\"KlerosCore to read the balance from.\",\"_governor\":\"The governor of the contract.\"}}},\"title\":\"KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":\"KlerosCoreSnapshotProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface IKlerosCore {\\n function sortitionModule() external view returns (ISortitionModule);\\n}\\n\\n/// @title KlerosCoreSnapshotProxy\\n/// Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\\ncontract KlerosCoreSnapshotProxy {\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n IKlerosCore public core;\\n address public governor;\\n string public constant name = \\\"Staked Pinakion\\\";\\n string public constant symbol = \\\"stPNK\\\";\\n uint8 public constant decimals = 18;\\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\\n /// @param _governor The governor of the contract.\\n /// @param _core KlerosCore to read the balance from.\\n constructor(address _governor, IKlerosCore _core) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\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 /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(IKlerosCore _core) external onlyByGovernor {\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Returns the amount of PNK staked in KlerosV2 for a particular address.\\n /// Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\\n /// @param _account The address to query.\\n /// @return totalStaked Total amount staked in V2 by the address.\\n function balanceOf(address _account) external view returns (uint256 totalStaked) {\\n (totalStaked, , , ) = core.sortitionModule().getJurorBalance(_account, 0);\\n }\\n}\\n\",\"keccak256\":\"0xf9516838d21bc8b4d8776d8d8b0b17d46ebb3d0940c055c09944f7f35adfd99d\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161053338038061053383398101604081905261002f91610078565b600180546001600160a01b039384166001600160a01b031991821617909155600080549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b610472806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea2646970667358221220ae7b8da51562210a09a90e77fc37c7a9669fa0ff5f919ec51b43ac365aace78464736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea2646970667358221220ae7b8da51562210a09a90e77fc37c7a9669fa0ff5f919ec51b43ac365aace78464736f6c63430008180033", + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract IKlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balanceOf(address)\":{\"details\":\"Returns the amount of PNK staked in KlerosV2 for a particular address. Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\",\"params\":{\"_account\":\"The address to query.\"},\"returns\":{\"totalStaked\":\"Total amount staked in V2 by the address.\"}},\"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\",\"params\":{\"_core\":\"KlerosCore to read the balance from.\",\"_governor\":\"The governor of the contract.\"}}},\"title\":\"KlerosCoreSnapshotProxy Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":\"KlerosCoreSnapshotProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/view/KlerosCoreSnapshotProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface IKlerosCore {\\n function sortitionModule() external view returns (ISortitionModule);\\n}\\n\\n/// @title KlerosCoreSnapshotProxy\\n/// Proxy contract for V2 that exposes staked PNK with balanceOf() function for Snapshot voting.\\ncontract KlerosCoreSnapshotProxy {\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n IKlerosCore public core;\\n address public governor;\\n string public constant name = \\\"Staked Pinakion\\\";\\n string public constant symbol = \\\"stPNK\\\";\\n uint8 public constant decimals = 18;\\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\\n /// @param _governor The governor of the contract.\\n /// @param _core KlerosCore to read the balance from.\\n constructor(address _governor, IKlerosCore _core) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\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 /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(IKlerosCore _core) external onlyByGovernor {\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Returns the amount of PNK staked in KlerosV2 for a particular address.\\n /// Note: Proxy doesn't need to differentiate between courts so we pass 0 as courtID.\\n /// @param _account The address to query.\\n /// @return totalStaked Total amount staked in V2 by the address.\\n function balanceOf(address _account) external view returns (uint256 totalStaked) {\\n (totalStaked, , , ) = core.sortitionModule().getJurorBalance(_account, 0);\\n }\\n}\\n\",\"keccak256\":\"0xf98e9b681d495f60547cf367b9dd7caba3e4c94a61a54f06d13dff3adafa9899\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161053338038061053383398101604081905261002f91610078565b600180546001600160a01b039384166001600160a01b031991821617909155600080549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b610472806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea26469706673582212200d4ad479bc691b6c0d2310bcf8e00a0e5778d70739f4c994bb6a224962a6d67264736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100785760003560e01c806306fdde031461007d5780630c340a24146100c1578063313ce567146100ec57806370a08231146101065780638e4264601461012757806395d89b411461013c578063e4c0aaf414610160578063f2f4eb2614610173575b600080fd5b6100ab6040518060400160405280600f81526020016e29ba30b5b2b2102834b730b5b4b7b760891b81525081565b6040516100b8919061031c565b60405180910390f35b6001546100d4906001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b6100f4601281565b60405160ff90911681526020016100b8565b610119610114366004610383565b610186565b6040519081526020016100b8565b61013a610135366004610383565b61027b565b005b6100ab604051806040016040528060058152602001647374504e4b60d81b81525081565b61013a61016e366004610383565b6102d0565b6000546100d4906001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906103a7565b604051631a383be960e31b81526001600160a01b03848116600483015260006024830152919091169063d1c1df4890604401608060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027191906103c4565b5091949350505050565b6001546001600160a01b031633146102ae5760405162461bcd60e51b81526004016102a5906103fa565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146102fa5760405162461bcd60e51b81526004016102a5906103fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006020808352835180602085015260005b8181101561034a5785810183015185820160400152820161032e565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461038057600080fd5b50565b60006020828403121561039557600080fd5b81356103a08161036b565b9392505050565b6000602082840312156103b957600080fd5b81516103a08161036b565b600080600080608085870312156103da57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b60608201526080019056fea26469706673582212200d4ad479bc691b6c0d2310bcf8e00a0e5778d70739f4c994bb6a224962a6d67264736f6c63430008180033", "devdoc": { "kind": "dev", "methods": { @@ -196,15 +196,15 @@ "storageLayout": { "storage": [ { - "astId": 216, + "astId": 27408, "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", "label": "core", "offset": 0, "slot": "0", - "type": "t_contract(IKlerosCore)212" + "type": "t_contract(IKlerosCore)27404" }, { - "astId": 218, + "astId": 27410, "contract": "src/arbitration/view/KlerosCoreSnapshotProxy.sol:KlerosCoreSnapshotProxy", "label": "governor", "offset": 0, @@ -218,7 +218,7 @@ "label": "address", "numberOfBytes": "20" }, - "t_contract(IKlerosCore)212": { + "t_contract(IKlerosCore)27404": { "encoding": "inplace", "label": "contract IKlerosCore", "numberOfBytes": "20" diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json index 57eee1d19..9d30a5728 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + "address": "0xb6839061C3aD03c208EFd697409453bf9900cAb2", "abi": [ { "inputs": [], @@ -1865,38 +1865,38 @@ "type": "function" } ], - "transactionHash": "0x64bc78858fd3fb168aa3ebd5d2f169c7d400b06b73cb82f356b5c6439d8ec811", + "transactionHash": "0x9bcfebaa13fdbab9653e88bf3b8433a4a1059a1e2e4e74289488978358aa93ad", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", - "transactionIndex": 3, + "contractAddress": "0xb6839061C3aD03c208EFd697409453bf9900cAb2", + "transactionIndex": 2, "gasUsed": "5090884", - "logsBloom": "0x00000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfc469c83d8ece71c6431b5330771e8b4b2d4bb5ea86be13f52362698610b3a50", - "transactionHash": "0x64bc78858fd3fb168aa3ebd5d2f169c7d400b06b73cb82f356b5c6439d8ec811", + "logsBloom": "0x00800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000040000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1c73cc9efaeb0e40110bd2a25e7306b9d7e927bc8d662e7b96873bb03fa7fd6e", + "transactionHash": "0x9bcfebaa13fdbab9653e88bf3b8433a4a1059a1e2e4e74289488978358aa93ad", "logs": [ { - "transactionIndex": 3, - "blockNumber": 139232366, - "transactionHash": "0x64bc78858fd3fb168aa3ebd5d2f169c7d400b06b73cb82f356b5c6439d8ec811", - "address": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + "transactionIndex": 2, + "blockNumber": 141215227, + "transactionHash": "0x9bcfebaa13fdbab9653e88bf3b8433a4a1059a1e2e4e74289488978358aa93ad", + "address": "0xb6839061C3aD03c208EFd697409453bf9900cAb2", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 4, - "blockHash": "0xfc469c83d8ece71c6431b5330771e8b4b2d4bb5ea86be13f52362698610b3a50" + "logIndex": 1, + "blockHash": "0x1c73cc9efaeb0e40110bd2a25e7306b9d7e927bc8d662e7b96873bb03fa7fd6e" } ], - "blockNumber": 139232366, - "cumulativeGasUsed": "9457611", + "blockNumber": 141215227, + "cumulativeGasUsed": "5121156", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitNotSupportedByCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeKitOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputePeriodIsFinal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeStillDrawing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EvidenceNotPassedAndNotAppeal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibeInThisCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingZeroWhenNoStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnstakingTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedDisputeKit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VotePeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` 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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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)\":{\"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.\",\"_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.\",\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCore 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\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/KlerosCore.sol\":\"KlerosCore\"},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615aa2620001036000396000818161173d01528181611766015261195d0152615aa26000f3fe6080604052600436106102b35760003560e01c806382d0223711610170578063cf0c38f8116100cc578063ec918b6511610085578063ec918b6514610920578063f6506db414610935578063f7434ea914610955578063fbb519e714610975578063fbf405b014610995578063fc6f8f16146109b5578063fe524c39146109d557600080fd5b8063cf0c38f81461086b578063d07368bd1461088b578063d2b8035a146108ab578063d4d1d76a146108cb578063d98493f6146108e0578063e4c0aaf41461090057600080fd5b8063acdbf51d11610129578063acdbf51d14610790578063afe15cfb146107b0578063b0049637146107e5578063c13517e114610805578063c258bb1914610818578063c356990214610838578063c71f42531461084b57600080fd5b806382d02237146106ce5780638456cb59146106ee57806386541b24146107035780638a9bb02a146107235780638bb0487514610750578063a072b86c1461077057600080fd5b80633cfd11841161021f578063564a565d116101d8578063564a565d146105e357806359ec827e146106145780635c975abb14610634578063751accd01461064e5780637717a6e81461066e5780637934c0be1461068e5780637b4f3cc5146106ae57600080fd5b80633cfd11841461051b5780633f4ba83a14610548578063452a93201461055d5780634f1ef2861461057d57806352d1902d1461059057806354fd4d50146105a557600080fd5b806319b815291161027157806319b81529146103ed5780631c3db16d1461041d5780631f5a0dd21461045a5780632d29a47b146104bb5780632e1daf2f146104db5780632fcb4f04146104fb57600080fd5b8062f5822c146102b85780630219da79146102da5780630b7414bc146103525780630c340a2414610372578063115d53761461039f5780631860592b146103bf575b600080fd5b3480156102c457600080fd5b506102d86102d3366004614be9565b6109f5565b005b3480156102e657600080fd5b506103256102f5366004614be9565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561035e57600080fd5b506102d861036d366004614cfc565b610a42565b34801561037e57600080fd5b50600054610392906001600160a01b031681565b6040516103499190614d5d565b3480156103ab57600080fd5b506102d86103ba366004614d71565b610b79565b3480156103cb57600080fd5b506103df6103da366004614d8a565b6110b0565b604051908152602001610349565b3480156103f957600080fd5b5061040d610408366004614d71565b61110a565b6040519015158152602001610349565b34801561042957600080fd5b5061043d610438366004614d71565b611203565b604080519384529115156020840152151590820152606001610349565b34801561046657600080fd5b5061047a610475366004614d71565b611304565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610349565b3480156104c757600080fd5b506102d86104d6366004614db6565b611363565b3480156104e757600080fd5b50600454610392906001600160a01b031681565b34801561050757600080fd5b506102d8610516366004614be9565b6115ef565b34801561052757600080fd5b5061053b610536366004614ded565b61163c565b6040516103499190614e2b565b34801561055457600080fd5b506102d86116a6565b34801561056957600080fd5b50600154610392906001600160a01b031681565b6102d861058b366004614ea8565b611729565b34801561059c57600080fd5b506103df611950565b3480156105b157600080fd5b506105d6604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516103499190614f47565b3480156105ef57600080fd5b506106036105fe366004614d71565b6119ae565b604051610349959493929190614f92565b34801561062057600080fd5b506103df61062f366004614d71565b611a0a565b34801561064057600080fd5b5060095461040d9060ff1681565b34801561065a57600080fd5b506102d8610669366004614fd1565b611b5f565b34801561067a57600080fd5b506102d8610689366004615029565b611c09565b34801561069a57600080fd5b506102d86106a9366004615045565b611c3b565b3480156106ba57600080fd5b506102d86106c93660046150eb565b611cba565b3480156106da57600080fd5b506102d86106e93660046151cc565b611d92565b3480156106fa57600080fd5b506102d8611e4f565b34801561070f57600080fd5b506102d861071e36600461521e565b611eef565b34801561072f57600080fd5b5061074361073e36600461528c565b6120cc565b60405161034991906152f3565b34801561075c57600080fd5b506102d861076b366004614d71565b612258565b34801561077c57600080fd5b506102d861078b366004615398565b6123bc565b34801561079c57600080fd5b506103926107ab366004614d71565b6126f4565b3480156107bc57600080fd5b506107d06107cb366004614d71565b61271e565b60408051928352602083019190915201610349565b3480156107f157600080fd5b506102d8610800366004614be9565b6127ca565b6103df610813366004615458565b612817565b34801561082457600080fd5b506102d8610833366004614be9565b61284f565b6102d8610846366004615488565b61289c565b34801561085757600080fd5b506103df610866366004614d71565b612d70565b34801561087757600080fd5b50600354610392906001600160a01b031681565b34801561089757600080fd5b506102d86108a6366004614be9565b612dd8565b3480156108b757600080fd5b506102d86108c636600461528c565b612e81565b3480156108d757600080fd5b506006546103df565b3480156108ec57600080fd5b506103df6108fb366004615509565b613196565b34801561090c57600080fd5b506102d861091b366004614be9565b6131e3565b34801561092c57600080fd5b506102d8613230565b34801561094157600080fd5b506103df610950366004615554565b6132e1565b34801561096157600080fd5b506103df6109703660046155ba565b6133c7565b34801561098157600080fd5b506102d86109903660046155ee565b613413565b3480156109a157600080fd5b50600254610392906001600160a01b031681565b3480156109c157600080fd5b506103df6109d0366004614d71565b613453565b3480156109e157600080fd5b5061040d6109f0366004615029565b613482565b6000546001600160a01b03163314610a205760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a6d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b73578115610b0c57828181518110610a9157610a9161563f565b602002602001015160001480610ac457506006548351849083908110610ab957610ab961563f565b602002602001015110155b15610ae257604051633d58a98960e11b815260040160405180910390fd5b610b0784848381518110610af857610af861563f565b602002602001015160016134ca565b610b6b565b6001838281518110610b2057610b2061563f565b602002602001015103610b46576040516356d111fd60e11b815260040160405180910390fd5b610b6b84848381518110610b5c57610b5c61563f565b602002602001015160006134ca565b600101610a70565b50505050565b600060078281548110610b8e57610b8e61563f565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610bc157610bc161563f565b6000918252602082206003850154600c909202019250610be39060019061566b565b90506000836003018281548110610bfc57610bfc61563f565b600091825260208220600b909102019150600185015460ff166004811115610c2657610c26614f5a565b03610d015781158015610c7557506001840154600684019060ff166004811115610c5257610c52614f5a565b60048110610c6257610c6261563f565b01546002850154610c73904261566b565b105b15610c9357604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610cbb576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610cd2576002610cd5565b60015b60018086018054909160ff1990911690836004811115610cf757610cf7614f5a565b0217905550611062565b60018085015460ff166004811115610d1b57610d1b614f5a565b03610e2b576001840154600684019060ff166004811115610d3e57610d3e614f5a565b60048110610d4e57610d4e61563f565b01546002850154610d5f904261566b565b108015610df657506006816000015481548110610d7e57610d7e61563f565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061567e565b155b15610e1457604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610cf7565b6002600185015460ff166004811115610e4657610e46614f5a565b03610f94576001840154600684019060ff166004811115610e6957610e69614f5a565b60048110610e7957610e7961563f565b01546002850154610e8a904261566b565b108015610f2157506006816000015481548110610ea957610ea961563f565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f919061567e565b155b15610f3f57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611062565b6003600185015460ff166004811115610faf57610faf614f5a565b03611029576001840154600684019060ff166004811115610fd257610fd2614f5a565b60048110610fe257610fe261563f565b01546002850154610ff3904261566b565b101561101257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610cf7565b6004600185015460ff16600481111561104457611044614f5a565b03611062576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110a19160ff169061569b565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b0316906110ed90600160481b900460ff16600a61578d565b6110f7908461579c565b61110191906157c9565b90505b92915050565b600080600783815481106111205761112061563f565b60009182526020822060036004909202019081018054919350906111469060019061566b565b815481106111565761115661563f565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061118b5761118b61563f565b90600052602060002090600c020190508060050154826003015410156111b657506000949350505050565b80546005805490916001600160601b03169081106111d6576111d661563f565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061121c5761121c61563f565b60009182526020822060036004909202019081018054919350906112429060019061566b565b815481106112525761125261563f565b90600052602060002090600b020190506000600682600001548154811061127b5761127b61563f565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906157dd565b9199909850909650945050505050565b6005818154811061131457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561138757604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061139d5761139d61563f565b600091825260209091206004918202019150600182015460ff1660048111156113c8576113c8614f5a565b146113e657604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106113fb576113fb61563f565b6000918252602082206004600b9092020190810154909350915061141f8483615815565b60058401546006850154600286015492935090916000906114419083906157c9565b905060008660010154905060008060068960000154815481106114665761146661563f565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190615828565b9150508060000361150257838611156114fd578395505b611522565b61150d84600261579c565b8611156115225761151f84600261579c565b95505b60048801869055865b868110156115ce57848110156115845761157d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613552565b95506115c6565b6115c66040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a23565b60010161152b565b50848860050154146115e257600588018590555b5050505050505050505050565b6000546001600160a01b0316331461161a5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611644614b29565b6005826001600160601b0316815481106116605761166061563f565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116116875750505050509050919050565b6000546001600160a01b031633146116d15760405163c383977560e01b815260040160405180910390fd5b60095460ff166116f45760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61173282613f5b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117b057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a4600080516020615a4d8339815191525490565b6001600160a01b031614155b156117ce5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611828575060408051601f3d908101601f1916820190925261182591810190615828565b60015b6118505781604051630c76093760e01b81526004016118479190614d5d565b60405180910390fd5b600080516020615a4d833981519152811461188157604051632a87526960e21b815260048101829052602401611847565b600080516020615a4d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561194a576000836001600160a01b0316836040516118e89190615841565b600060405180830381855af49150503d8060008114611923576040519150601f19603f3d011682016040523d82523d6000602084013e611928565b606091505b5050905080610b73576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461199b5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615a4d83398151915290565b600781815481106119be57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611a2057611a2061563f565b6000918252602082206003600490920201908101805491935090611a469060019061566b565b81548110611a5657611a5661563f565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a8b57611a8b61563f565b90600052602060002090600c020190508060050154826003015410611b2a5782546001600160601b031660001901611acc576001600160ff1b039350611b57565b6003820154611adc90600261579c565b611ae7906001615815565b81546005805490916001600160601b0316908110611b0757611b0761563f565b90600052602060002090600c020160040154611b23919061579c565b9350611b57565b6003820154611b3a90600261579c565b611b45906001615815565b8160040154611b54919061579c565b93505b505050919050565b6000546001600160a01b03163314611b8a5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611ba59190615841565b60006040518083038185875af1925050503d8060008114611be2576040519150601f19603f3d011682016040523d82523d6000602084013e611be7565b606091505b5050905080610b73576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611c2d57604051636f1dac1d60e01b815260040160405180910390fd5b61194a338383600080613f89565b6000546001600160a01b03163314611c665760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b60016000611cc6614144565b8054909150600160401b900460ff1680611ced575080546001600160401b03808416911610155b15611d0a5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611d3d8c8c8c8c8c8c8c8c8c8c614168565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611dbd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e7557506000546001600160a01b03163314155b15611e9357604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611eb757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611f1a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611f3857611f3861563f565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f9a575080546005805488926001600160601b0316908110611f8657611f8661563f565b90600052602060002090600c020160020154115b15611fb857604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561203357866005836001018381548110611fdf57611fdf61563f565b906000526020600020015481548110611ffa57611ffa61563f565b90600052602060002090600c020160020154101561202b57604051639717078960e01b815260040160405180910390fd5b600101611fbb565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120769060068301908490614b47565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516120ba9695949392919061585d565b60405180910390a25050505050505050565b61213260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106121455761214561563f565b906000526020600020906004020160030182815481106121675761216761563f565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561221657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121f8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061226d5761226d61563f565b600091825260209091206004918202019150600182015460ff16600481111561229857612298614f5a565b146122b657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156122e15760405163c977f8d360e01b815260040160405180910390fd5b60006122ec83611203565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123e75760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106124045761240461563f565b90600052602060002090600c020160020154111561243557604051639717078960e01b815260040160405180910390fd5b80516000036124575760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661247e57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612540578381815181106124d1576124d161563f565b602002602001015160001480612504575060065484518590839081106124f9576124f961563f565b602002602001015110155b1561252257604051633d58a98960e11b815260040160405180910390fd5b61253883858381518110610af857610af861563f565b6001016124b6565b5060016000908152600a8201602052604090205460ff16612574576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125ac916001840191614b85565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125ef9060068301908790614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612621918691899101615890565b600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061266f5761266f61563f565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906126df908e908e908e908e908e908e908d906158a9565b60405180910390a35050505050505050505050565b6006818154811061270457600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106127365761273661563f565b6000918252602090912060049091020190506003600182015460ff16600481111561276357612763614f5a565b036127bb576002810154815460058054929550916001600160601b039091169081106127915761279161563f565b600091825260209091206009600c90920201015460028201546127b49190615815565b91506127c4565b60009250600091505b50915091565b6000546001600160a01b031633146127f55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612822826133c7565b34101561284257604051630e3360f160e21b815260040160405180910390fd5b6111018383600034614488565b6000546001600160a01b0316331461287a5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6128a583611a0a565b3410156128c557604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128da576128da61563f565b6000918252602090912060049091020190506003600182015460ff16600481111561290757612907614f5a565b14612925576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061293b9060019061566b565b8154811061294b5761294b61563f565b90600052602060002090600b0201905060068160000154815481106129725761297261563f565b6000918252602090912001546001600160a01b031633146129a65760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129e9576129e961563f565b90600052602060002090600c020160050154846003015410612af2576005836001600160601b031681548110612a2157612a2161563f565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a5457612a5461563f565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a8057600191505b84546001600160601b03848116911614612af257845460038601546001600160601b0390911690612ab39060019061566b565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b3557612b3561563f565b90600052602060002090600c02019050806004015434612b5591906157c9565b826003018190555061271081600301548260020154612b74919061579c565b612b7e91906157c9565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612bb59161566b565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bf357600080fd5b505af1158015612c07573d6000803e3d6000fd5b505086548454149150612ced90505784546003870154612c299060019061566b565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c7757612c7761563f565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612cba918d918d918d9190600401615928565b600060405180830381600087803b158015612cd457600080fd5b505af1158015612ce8573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d5d919061569b565b60405180910390a2505050505050505050565b60008060078381548110612d8657612d8661563f565b906000526020600020906004020190508060030160018260030180549050612dae919061566b565b81548110612dbe57612dbe61563f565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e035760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e9657612e9661563f565b90600052602060002090600402019050600060018260030180549050612ebc919061566b565b90506000826003018281548110612ed557612ed561563f565b600091825260208220600b909102019150600184015460ff166004811115612eff57612eff614f5a565b14612f1d57604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f3657612f3661563f565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f6b575060038401546006850154105b156131735760006001600160a01b03841663d2b8035a8a84612f8c81615958565b9550612f989087615815565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fff9190615971565b90506001600160a01b0381166130155750612f55565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261304b92869290910161598e565b600060405180830381600087803b15801561306557600080fd5b505af1158015613079573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130c6918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361316d5760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561315457600080fd5b505af1158015613168573d6000803e3d6000fd5b505050505b50612f55565b8084600a0160008282546131879190615815565b90915550505050505050505050565b60006131db826103da86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133c792505050565b949350505050565b6000546001600160a01b0316331461320e5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003600061323c614144565b8054909150600160401b900460ff1680613263575080546001600160401b03808416911610155b156132805760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03821660009081526008602052604081205460ff1661331a5760405163e51cf7bf60e01b815260040160405180910390fd5b613325858585613196565b82101561334557604051630e3360f160e21b815260040160405180910390fd5b61335a6001600160a01b03841633308561476f565b613377576040516312171d8360e31b815260040160405180910390fd5b6133bb8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506144889050565b90505b95945050505050565b60008060006133d58461484b565b5091509150806005836001600160601b0316815481106133f7576133f761563f565b90600052602060002090600c0201600401546131db919061579c565b6004546001600160a01b0316331461343e57604051639d6cab9960e01b815260040160405180910390fd5b61344c848484846001613f89565b5050505050565b6000600782815481106134685761346861563f565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134a0576134a061563f565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134e7576134e761563f565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061356c5761356c61563f565b906000526020600020906004020190506000816003018460200151815481106135975761359761563f565b90600052602060002090600b02019050600060068260000154815481106135c0576135c061563f565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061366a9190615828565b905061271081111561367b57506127105b600061271061368a838261566b565b8560010154613699919061579c565b6136a391906157c9565b9050808760c0018181516136b79190615815565b90525060e08701516006850180546000929081106136d7576136d761563f565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161371891859187910161598e565b600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061377b91859187910161598e565b600060405180830381600087803b15801561379557600080fd5b505af11580156137a9573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137e9876159a7565b60098b015460405161380b9392916000916001600160a01b03909116906159c3565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613896919061567e565b6138fc576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138c991859101614d5d565b600060405180830381600087803b1580156138e357600080fd5b505af11580156138f7573d6000803e3d6000fd5b505050505b6001886060015161390d919061566b565b8860e0015114801561392157506040880151155b15613a125760098501546001600160a01b031661396a576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613991565b6000546002860154600987015461398f926001600160a01b03918216929116906148d2565b505b60005460c08901516002546139b4926001600160a01b03918216929116906148d2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a0993909290916001600160a01b03909116906159e7565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a3c57613a3c61563f565b90600052602060002090600402019050600081600301836020015181548110613a6757613a6761563f565b90600052602060002090600b0201905060006006826000015481548110613a9057613a9061563f565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613acf91615a06565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b539190615828565b9050612710811115613b6457506127105b60008360060186606001518760e00151613b7e9190615a06565b81548110613b8e57613b8e61563f565b600091825260208220015460018601546001600160a01b03909116925061271090613bba90859061579c565b613bc491906157c9565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613bf691869186910161598e565b600060405180830381600087803b158015613c1057600080fd5b505af1158015613c24573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c5791869101614d5d565b602060405180830381865afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c98919061567e565b613cb557600254613cb3906001600160a01b031683836148d2565b505b60006127108489604001518a60c00151613ccf91906157c9565b613cd9919061579c565b613ce391906157c9565b905080866008016000828254613cf99190615815565b925050819055506000612710858a604001518960020154613d1a91906157c9565b613d24919061579c565b613d2e91906157c9565b905080876007016000828254613d449190615815565b9091555050600254613d60906001600160a01b031685846148d2565b5060098701546001600160a01b0316613d9e576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613db9565b6009870154613db7906001600160a01b031685836148d2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e09928c928a928a92909116906159c3565b60405180910390a4600189606001516002613e24919061579c565b613e2e919061566b565b8960e0015103613f5057600087600801548a60c00151613e4e919061566b565b9050600088600701548960020154613e66919061566b565b905081151580613e7557508015155b156115e2578115613e9f57600054600254613e9d916001600160a01b039182169116846148d2565b505b8015613f065760098901546001600160a01b0316613ee557600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f06565b60005460098a0154613f04916001600160a01b039182169116836148d2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126df91879187916001600160a01b03909116906159e7565b505050505050505050565b6000546001600160a01b03163314613f865760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fac57506005546001600160601b03861610155b15613fc457613fbc82600461499f565b5060006133be565b8315801590613fff57506005856001600160601b031681548110613fea57613fea61563f565b90600052602060002090600c02016002015484105b1561400f57613fbc82600561499f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a69190615a1a565b9194509250905060008160088111156140c1576140c1614f5a565b146140dc576140d0858261499f565b600093505050506133be565b8215614109576002546140fa906001600160a01b03168a308661476f565b614109576140d085600161499f565b811561413557600254614126906001600160a01b03168a846148d2565b614135576140d085600261499f565b50600198975050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614170614ae8565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261426292879101615890565b600060405180830381600087803b15801561427c57600080fd5b505af1158015614290573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516142fe916001840191602090910190614b85565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561434d9060068301908690614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161438091600191889101615890565b600060405180830381600087803b15801561439a57600080fd5b505af11580156143ae573d6000803e3d6000fd5b5060009250600191506143be9050565b6040519080825280602002602001820160405280156143e7578160200160208202803683370190505b5090506001816000815181106143ff576143ff61563f565b60209081029190910181019190915282548751918801516040808a015160608b015191516001600160601b03909416946001947f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee694614465948f9491928e908b906158a9565b60405180910390a361447a60018060016134ca565b505050505050505050505050565b60008060006144968661484b565b92505091506005826001600160601b0316815481106144b7576144b761563f565b60009182526020808320848452600a600c90930201919091019052604090205460ff166144f75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106145825761458261563f565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106145b8576145b861563f565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614603576145fe8a84600401546110b0565b614609565b82600401545b9050614615818a6157c9565b6003808401919091558683558301546002840154612710916146369161579c565b61464091906157c9565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156146b357600080fd5b505af11580156146c7573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147019493929190615928565b600060405180830381600087803b15801561471b57600080fd5b505af115801561472f573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516147d49190615841565b6000604051808303816000865af19150503d8060008114614811576040519150601f19603f3d011682016040523d82523d6000602084013e614816565b606091505b5091509150818015614840575080511580614840575080806020019051810190614840919061567e565b979650505050505050565b600080600060408451106148c0575050506020810151604082015160608301516001600160601b038316158061488c57506005546001600160601b03841610155b1561489657600192505b816000036148a357600391505b8015806148b257506006548110155b156148bb575060015b6148cb565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016148f492919061598e565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516149299190615841565b6000604051808303816000865af19150503d8060008114614966576040519150601f19603f3d011682016040523d82523d6000602084013e61496b565b606091505b5091509150818015614995575080511580614995575080806020019051810190614995919061567e565b9695505050505050565b60018260018111156149b3576149b3614f5a565b036149bc575050565b60018160088111156149d0576149d0614f5a565b036149ee57604051630f323ed960e11b815260040160405180910390fd5b6002816008811115614a0257614a02614f5a565b03614a205760405163e45e13a360e01b815260040160405180910390fd5b6003816008811115614a3457614a34614f5a565b03614a5257604051631d91d0ed60e31b815260040160405180910390fd5b6004816008811115614a6657614a66614f5a565b03614a84576040516321f1774b60e11b815260040160405180910390fd5b6005816008811115614a9857614a98614f5a565b03614ab657604051630caac6b360e31b815260040160405180910390fd5b6008816008811115614aca57614aca614f5a565b0361194c57604051633e57962f60e21b815260040160405180910390fd5b614af0614b0f565b614b0d57604051631afcd79f60e31b815260040160405180910390fd5b565b6000614b19614144565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614b75579160200282015b82811115614b75578251825591602001919060010190614b5a565b50614b81929150614bbf565b5090565b828054828255906000526020600020908101928215614b755791602002820182811115614b75578251825591602001919060010190614b5a565b5b80821115614b815760008155600101614bc0565b6001600160a01b0381168114613f8657600080fd5b600060208284031215614bfb57600080fd5b8135614c0681614bd4565b9392505050565b80356001600160601b0381168114614c2457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614c6757614c67614c29565b604052919050565b600082601f830112614c8057600080fd5b813560206001600160401b03821115614c9b57614c9b614c29565b8160051b614caa828201614c3f565b9283528481018201928281019087851115614cc457600080fd5b83870192505b8483101561484057823582529183019190830190614cca565b8015158114613f8657600080fd5b8035614c2481614ce3565b600080600060608486031215614d1157600080fd5b614d1a84614c0d565b925060208401356001600160401b03811115614d3557600080fd5b614d4186828701614c6f565b9250506040840135614d5281614ce3565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614d8357600080fd5b5035919050565b60008060408385031215614d9d57600080fd5b8235614da881614bd4565b946020939093013593505050565b600080600060608486031215614dcb57600080fd5b505081359360208301359350604090920135919050565b8035614c2481614bd4565b600060208284031215614dff57600080fd5b61110182614c0d565b8060005b6004811015610b73578151845260209384019390910190600101614e0c565b608081016111048284614e08565b600082601f830112614e4a57600080fd5b81356001600160401b03811115614e6357614e63614c29565b614e76601f8201601f1916602001614c3f565b818152846020838601011115614e8b57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ebb57600080fd5b8235614ec681614bd4565b915060208301356001600160401b03811115614ee157600080fd5b614eed85828601614e39565b9150509250929050565b60005b83811015614f12578181015183820152602001614efa565b50506000910152565b60008151808452614f33816020860160208601614ef7565b601f01601f19169290920160200192915050565b6020815260006111016020830184614f1b565b634e487b7160e01b600052602160045260246000fd5b60058110614f8e57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614fbe6040830186614f70565b9215156060820152608001529392505050565b600080600060608486031215614fe657600080fd5b8335614ff181614bd4565b92506020840135915060408401356001600160401b0381111561501357600080fd5b61501f86828701614e39565b9150509250925092565b6000806040838503121561503c57600080fd5b614da883614c0d565b6000806040838503121561505857600080fd5b823561506381614bd4565b9150602083013561507381614ce3565b809150509250929050565b600082601f83011261508f57600080fd5b604051608081018181106001600160401b03821117156150b1576150b1614c29565b6040528060808401858111156150c657600080fd5b845b818110156150e05780358352602092830192016150c8565b509195945050505050565b6000806000806000806000806000806102008b8d03121561510b57600080fd5b8a3561511681614bd4565b995060208b013561512681614bd4565b985060408b013561513681614bd4565b975060608b013561514681614bd4565b965060808b013561515681614bd4565b955061516460a08c01614cf1565b94506151738c60c08d0161507e565b93506151838c6101408d0161507e565b92506101c08b01356001600160401b0381111561519f57600080fd5b6151ab8d828e01614e39565b9250506151bb6101e08c01614de2565b90509295989b9194979a5092959850565b6000806000606084860312156151e157600080fd5b83356151ec81614bd4565b925060208401356001600160401b038116811461520857600080fd5b9150604084013560ff81168114614d5257600080fd5b6000806000806000806000610140888a03121561523a57600080fd5b61524388614c0d565b9650602088013561525381614ce3565b955060408801359450606088013593506080880135925060a0880135915061527e8960c08a0161507e565b905092959891949750929550565b6000806040838503121561529f57600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156152e85781516001600160a01b0316875295820195908201906001016152c3565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261534e6101808501836152ae565b60e08601516101008681019190915286015161012080870191909152860151909250610140615387818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c0312156153b757600080fd5b6153c08a614c0d565b985060208a01356153d081614ce3565b975060408a0135965060608a0135955060808a0135945060a08a013593506153fb8b60c08c0161507e565b92506101408a01356001600160401b038082111561541857600080fd5b6154248d838e01614e39565b93506101608c013591508082111561543b57600080fd5b506154488c828d01614c6f565b9150509295985092959850929598565b6000806040838503121561546b57600080fd5b8235915060208301356001600160401b03811115614ee157600080fd5b60008060006060848603121561549d57600080fd5b833592506020840135915060408401356001600160401b0381111561501357600080fd5b60008083601f8401126154d357600080fd5b5081356001600160401b038111156154ea57600080fd5b60208301915083602082850101111561550257600080fd5b9250929050565b60008060006040848603121561551e57600080fd5b83356001600160401b0381111561553457600080fd5b615540868287016154c1565b9094509250506020840135614d5281614bd4565b60008060008060006080868803121561556c57600080fd5b8535945060208601356001600160401b0381111561558957600080fd5b615595888289016154c1565b90955093505060408601356155a981614bd4565b949793965091946060013592915050565b6000602082840312156155cc57600080fd5b81356001600160401b038111156155e257600080fd5b6131db84828501614e39565b6000806000806080858703121561560457600080fd5b843561560f81614bd4565b935061561d60208601614c0d565b925060408501359150606085013561563481614ce3565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561110457611104615655565b60006020828403121561569057600080fd5b8151614c0681614ce3565b602081016111048284614f70565b600181815b808511156156e45781600019048211156156ca576156ca615655565b808516156156d757918102915b93841c93908002906156ae565b509250929050565b6000826156fb57506001611104565b8161570857506000611104565b816001811461571e576002811461572857615744565b6001915050611104565b60ff84111561573957615739615655565b50506001821b611104565b5060208310610133831016604e8410600b8410161715615767575081810a611104565b61577183836156a9565b806000190482111561578557615785615655565b029392505050565b600061110160ff8416836156ec565b808202811582820484141761110457611104615655565b634e487b7160e01b600052601260045260246000fd5b6000826157d8576157d86157b3565b500490565b6000806000606084860312156157f257600080fd5b83519250602084015161580481614ce3565b6040850151909250614d5281614ce3565b8082018082111561110457611104615655565b60006020828403121561583a57600080fd5b5051919050565b60008251615853818460208701614ef7565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261484060a0830184614e08565b8281526040602082015260006131db6040830184614f1b565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526158dd60a0860188614e08565b610120850192909252845190819052610160840191602086019160005b81811015615916578351855293820193928201926001016158fa565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006159476080830185614f1b565b905082606083015295945050505050565b60006001820161596a5761596a615655565b5060010190565b60006020828403121561598357600080fd5b8151614c0681614bd4565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016159bc576159bc615655565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615a1557615a156157b3565b500690565b600080600060608486031215615a2f57600080fd5b8351925060208401519150604084015160098110614d5257600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209d3f5f848e5c977c06ce8a04a67787edb996e48a4f1a486ddef204a4e19f4a0664736f6c63430008180033", "deployedBytecode": "0x6080604052600436106102b35760003560e01c806382d0223711610170578063cf0c38f8116100cc578063ec918b6511610085578063ec918b6514610920578063f6506db414610935578063f7434ea914610955578063fbb519e714610975578063fbf405b014610995578063fc6f8f16146109b5578063fe524c39146109d557600080fd5b8063cf0c38f81461086b578063d07368bd1461088b578063d2b8035a146108ab578063d4d1d76a146108cb578063d98493f6146108e0578063e4c0aaf41461090057600080fd5b8063acdbf51d11610129578063acdbf51d14610790578063afe15cfb146107b0578063b0049637146107e5578063c13517e114610805578063c258bb1914610818578063c356990214610838578063c71f42531461084b57600080fd5b806382d02237146106ce5780638456cb59146106ee57806386541b24146107035780638a9bb02a146107235780638bb0487514610750578063a072b86c1461077057600080fd5b80633cfd11841161021f578063564a565d116101d8578063564a565d146105e357806359ec827e146106145780635c975abb14610634578063751accd01461064e5780637717a6e81461066e5780637934c0be1461068e5780637b4f3cc5146106ae57600080fd5b80633cfd11841461051b5780633f4ba83a14610548578063452a93201461055d5780634f1ef2861461057d57806352d1902d1461059057806354fd4d50146105a557600080fd5b806319b815291161027157806319b81529146103ed5780631c3db16d1461041d5780631f5a0dd21461045a5780632d29a47b146104bb5780632e1daf2f146104db5780632fcb4f04146104fb57600080fd5b8062f5822c146102b85780630219da79146102da5780630b7414bc146103525780630c340a2414610372578063115d53761461039f5780631860592b146103bf575b600080fd5b3480156102c457600080fd5b506102d86102d3366004614be9565b6109f5565b005b3480156102e657600080fd5b506103256102f5366004614be9565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561035e57600080fd5b506102d861036d366004614cfc565b610a42565b34801561037e57600080fd5b50600054610392906001600160a01b031681565b6040516103499190614d5d565b3480156103ab57600080fd5b506102d86103ba366004614d71565b610b79565b3480156103cb57600080fd5b506103df6103da366004614d8a565b6110b0565b604051908152602001610349565b3480156103f957600080fd5b5061040d610408366004614d71565b61110a565b6040519015158152602001610349565b34801561042957600080fd5b5061043d610438366004614d71565b611203565b604080519384529115156020840152151590820152606001610349565b34801561046657600080fd5b5061047a610475366004614d71565b611304565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610349565b3480156104c757600080fd5b506102d86104d6366004614db6565b611363565b3480156104e757600080fd5b50600454610392906001600160a01b031681565b34801561050757600080fd5b506102d8610516366004614be9565b6115ef565b34801561052757600080fd5b5061053b610536366004614ded565b61163c565b6040516103499190614e2b565b34801561055457600080fd5b506102d86116a6565b34801561056957600080fd5b50600154610392906001600160a01b031681565b6102d861058b366004614ea8565b611729565b34801561059c57600080fd5b506103df611950565b3480156105b157600080fd5b506105d6604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516103499190614f47565b3480156105ef57600080fd5b506106036105fe366004614d71565b6119ae565b604051610349959493929190614f92565b34801561062057600080fd5b506103df61062f366004614d71565b611a0a565b34801561064057600080fd5b5060095461040d9060ff1681565b34801561065a57600080fd5b506102d8610669366004614fd1565b611b5f565b34801561067a57600080fd5b506102d8610689366004615029565b611c09565b34801561069a57600080fd5b506102d86106a9366004615045565b611c3b565b3480156106ba57600080fd5b506102d86106c93660046150eb565b611cba565b3480156106da57600080fd5b506102d86106e93660046151cc565b611d92565b3480156106fa57600080fd5b506102d8611e4f565b34801561070f57600080fd5b506102d861071e36600461521e565b611eef565b34801561072f57600080fd5b5061074361073e36600461528c565b6120cc565b60405161034991906152f3565b34801561075c57600080fd5b506102d861076b366004614d71565b612258565b34801561077c57600080fd5b506102d861078b366004615398565b6123bc565b34801561079c57600080fd5b506103926107ab366004614d71565b6126f4565b3480156107bc57600080fd5b506107d06107cb366004614d71565b61271e565b60408051928352602083019190915201610349565b3480156107f157600080fd5b506102d8610800366004614be9565b6127ca565b6103df610813366004615458565b612817565b34801561082457600080fd5b506102d8610833366004614be9565b61284f565b6102d8610846366004615488565b61289c565b34801561085757600080fd5b506103df610866366004614d71565b612d70565b34801561087757600080fd5b50600354610392906001600160a01b031681565b34801561089757600080fd5b506102d86108a6366004614be9565b612dd8565b3480156108b757600080fd5b506102d86108c636600461528c565b612e81565b3480156108d757600080fd5b506006546103df565b3480156108ec57600080fd5b506103df6108fb366004615509565b613196565b34801561090c57600080fd5b506102d861091b366004614be9565b6131e3565b34801561092c57600080fd5b506102d8613230565b34801561094157600080fd5b506103df610950366004615554565b6132e1565b34801561096157600080fd5b506103df6109703660046155ba565b6133c7565b34801561098157600080fd5b506102d86109903660046155ee565b613413565b3480156109a157600080fd5b50600254610392906001600160a01b031681565b3480156109c157600080fd5b506103df6109d0366004614d71565b613453565b3480156109e157600080fd5b5061040d6109f0366004615029565b613482565b6000546001600160a01b03163314610a205760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a6d5760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b73578115610b0c57828181518110610a9157610a9161563f565b602002602001015160001480610ac457506006548351849083908110610ab957610ab961563f565b602002602001015110155b15610ae257604051633d58a98960e11b815260040160405180910390fd5b610b0784848381518110610af857610af861563f565b602002602001015160016134ca565b610b6b565b6001838281518110610b2057610b2061563f565b602002602001015103610b46576040516356d111fd60e11b815260040160405180910390fd5b610b6b84848381518110610b5c57610b5c61563f565b602002602001015160006134ca565b600101610a70565b50505050565b600060078281548110610b8e57610b8e61563f565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610bc157610bc161563f565b6000918252602082206003850154600c909202019250610be39060019061566b565b90506000836003018281548110610bfc57610bfc61563f565b600091825260208220600b909102019150600185015460ff166004811115610c2657610c26614f5a565b03610d015781158015610c7557506001840154600684019060ff166004811115610c5257610c52614f5a565b60048110610c6257610c6261563f565b01546002850154610c73904261566b565b105b15610c9357604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610cbb576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610cd2576002610cd5565b60015b60018086018054909160ff1990911690836004811115610cf757610cf7614f5a565b0217905550611062565b60018085015460ff166004811115610d1b57610d1b614f5a565b03610e2b576001840154600684019060ff166004811115610d3e57610d3e614f5a565b60048110610d4e57610d4e61563f565b01546002850154610d5f904261566b565b108015610df657506006816000015481548110610d7e57610d7e61563f565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061567e565b155b15610e1457604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610cf7565b6002600185015460ff166004811115610e4657610e46614f5a565b03610f94576001840154600684019060ff166004811115610e6957610e69614f5a565b60048110610e7957610e7961563f565b01546002850154610e8a904261566b565b108015610f2157506006816000015481548110610ea957610ea961563f565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f919061567e565b155b15610f3f57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611062565b6003600185015460ff166004811115610faf57610faf614f5a565b03611029576001840154600684019060ff166004811115610fd257610fd2614f5a565b60048110610fe257610fe261563f565b01546002850154610ff3904261566b565b101561101257604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610cf7565b6004600185015460ff16600481111561104457611044614f5a565b03611062576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110a19160ff169061569b565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b0316906110ed90600160481b900460ff16600a61578d565b6110f7908461579c565b61110191906157c9565b90505b92915050565b600080600783815481106111205761112061563f565b60009182526020822060036004909202019081018054919350906111469060019061566b565b815481106111565761115661563f565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061118b5761118b61563f565b90600052602060002090600c020190508060050154826003015410156111b657506000949350505050565b80546005805490916001600160601b03169081106111d6576111d661563f565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061121c5761121c61563f565b60009182526020822060036004909202019081018054919350906112429060019061566b565b815481106112525761125261563f565b90600052602060002090600b020190506000600682600001548154811061127b5761127b61563f565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa1580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906157dd565b9199909850909650945050505050565b6005818154811061131457600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60095460ff161561138757604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061139d5761139d61563f565b600091825260209091206004918202019150600182015460ff1660048111156113c8576113c8614f5a565b146113e657604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106113fb576113fb61563f565b6000918252602082206004600b9092020190810154909350915061141f8483615815565b60058401546006850154600286015492935090916000906114419083906157c9565b905060008660010154905060008060068960000154815481106114665761146661563f565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190615828565b9150508060000361150257838611156114fd578395505b611522565b61150d84600261579c565b8611156115225761151f84600261579c565b95505b60048801869055865b868110156115ce57848110156115845761157d6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613552565b95506115c6565b6115c66040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a23565b60010161152b565b50848860050154146115e257600588018590555b5050505050505050505050565b6000546001600160a01b0316331461161a5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611644614b29565b6005826001600160601b0316815481106116605761166061563f565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116116875750505050509050919050565b6000546001600160a01b031633146116d15760405163c383977560e01b815260040160405180910390fd5b60095460ff166116f45760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61173282613f5b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117b057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a4600080516020615a4d8339815191525490565b6001600160a01b031614155b156117ce5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611828575060408051601f3d908101601f1916820190925261182591810190615828565b60015b6118505781604051630c76093760e01b81526004016118479190614d5d565b60405180910390fd5b600080516020615a4d833981519152811461188157604051632a87526960e21b815260048101829052602401611847565b600080516020615a4d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561194a576000836001600160a01b0316836040516118e89190615841565b600060405180830381855af49150503d8060008114611923576040519150601f19603f3d011682016040523d82523d6000602084013e611928565b606091505b5050905080610b73576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461199b5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615a4d83398151915290565b600781815481106119be57600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611a2057611a2061563f565b6000918252602082206003600490920201908101805491935090611a469060019061566b565b81548110611a5657611a5661563f565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611a8b57611a8b61563f565b90600052602060002090600c020190508060050154826003015410611b2a5782546001600160601b031660001901611acc576001600160ff1b039350611b57565b6003820154611adc90600261579c565b611ae7906001615815565b81546005805490916001600160601b0316908110611b0757611b0761563f565b90600052602060002090600c020160040154611b23919061579c565b9350611b57565b6003820154611b3a90600261579c565b611b45906001615815565b8160040154611b54919061579c565b93505b505050919050565b6000546001600160a01b03163314611b8a5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611ba59190615841565b60006040518083038185875af1925050503d8060008114611be2576040519150601f19603f3d011682016040523d82523d6000602084013e611be7565b606091505b5050905080610b73576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611c2d57604051636f1dac1d60e01b815260040160405180910390fd5b61194a338383600080613f89565b6000546001600160a01b03163314611c665760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b60016000611cc6614144565b8054909150600160401b900460ff1680611ced575080546001600160401b03808416911610155b15611d0a5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611d3d8c8c8c8c8c8c8c8c8c8c614168565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050505050565b6000546001600160a01b03163314611dbd5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611e7557506000546001600160a01b03163314155b15611e9357604051636b29334f60e01b815260040160405180910390fd5b60095460ff1615611eb757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b03163314611f1a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611f3857611f3861563f565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611f9a575080546005805488926001600160601b0316908110611f8657611f8661563f565b90600052602060002090600c020160020154115b15611fb857604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561203357866005836001018381548110611fdf57611fdf61563f565b906000526020600020015481548110611ffa57611ffa61563f565b90600052602060002090600c020160020154101561202b57604051639717078960e01b815260040160405180910390fd5b600101611fbb565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556120769060068301908490614b47565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516120ba9695949392919061585d565b60405180910390a25050505050505050565b61213260405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106121455761214561563f565b906000526020600020906004020160030182815481106121675761216761563f565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561221657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121f8575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b60006007828154811061226d5761226d61563f565b600091825260209091206004918202019150600182015460ff16600481111561229857612298614f5a565b146122b657604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff16156122e15760405163c977f8d360e01b815260040160405180910390fd5b60006122ec83611203565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146123e75760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b0316815481106124045761240461563f565b90600052602060002090600c020160020154111561243557604051639717078960e01b815260040160405180910390fd5b80516000036124575760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661247e57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612540578381815181106124d1576124d161563f565b602002602001015160001480612504575060065484518590839081106124f9576124f961563f565b602002602001015110155b1561252257604051633d58a98960e11b815260040160405180910390fd5b61253883858381518110610af857610af861563f565b6001016124b6565b5060016000908152600a8201602052604090205460ff16612574576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c1617815560408051600081526020810191829052516125ac916001840191614b85565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556125ef9060068301908790614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c91612621918691899101615890565b600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b5050505060058b6001600160601b03168154811061266f5761266f61563f565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b03808d1691908416907f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6906126df908e908e908e908e908e908e908d906158a9565b60405180910390a35050505050505050505050565b6006818154811061270457600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106127365761273661563f565b6000918252602090912060049091020190506003600182015460ff16600481111561276357612763614f5a565b036127bb576002810154815460058054929550916001600160601b039091169081106127915761279161563f565b600091825260209091206009600c90920201015460028201546127b49190615815565b91506127c4565b60009250600091505b50915091565b6000546001600160a01b031633146127f55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000612822826133c7565b34101561284257604051630e3360f160e21b815260040160405180910390fd5b6111018383600034614488565b6000546001600160a01b0316331461287a5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6128a583611a0a565b3410156128c557604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106128da576128da61563f565b6000918252602090912060049091020190506003600182015460ff16600481111561290757612907614f5a565b14612925576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061293b9060019061566b565b8154811061294b5761294b61563f565b90600052602060002090600b0201905060068160000154815481106129725761297261563f565b6000918252602090912001546001600160a01b031633146129a65760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106129e9576129e961563f565b90600052602060002090600c020160050154846003015410612af2576005836001600160601b031681548110612a2157612a2161563f565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612a5457612a5461563f565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612a8057600191505b84546001600160601b03848116911614612af257845460038601546001600160601b0390911690612ab39060019061566b565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612b3557612b3561563f565b90600052602060002090600c02019050806004015434612b5591906157c9565b826003018190555061271081600301548260020154612b74919061579c565b612b7e91906157c9565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612bb59161566b565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612bf357600080fd5b505af1158015612c07573d6000803e3d6000fd5b505086548454149150612ced90505784546003870154612c299060019061566b565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612c7757612c7761563f565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612cba918d918d918d9190600401615928565b600060405180830381600087803b158015612cd457600080fd5b505af1158015612ce8573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612d5d919061569b565b60405180910390a2505050505050505050565b60008060078381548110612d8657612d8661563f565b906000526020600020906004020190508060030160018260030180549050612dae919061566b565b81548110612dbe57612dbe61563f565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612e035760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110612e9657612e9661563f565b90600052602060002090600402019050600060018260030180549050612ebc919061566b565b90506000826003018281548110612ed557612ed561563f565b600091825260208220600b909102019150600184015460ff166004811115612eff57612eff614f5a565b14612f1d57604051638285c4ef60e01b815260040160405180910390fd5b60006006826000015481548110612f3657612f3661563f565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015612f6b575060038401546006850154105b156131735760006001600160a01b03841663d2b8035a8a84612f8c81615958565b9550612f989087615815565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015612fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fff9190615971565b90506001600160a01b0381166130155750612f55565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261304b92869290910161598e565b600060405180830381600087803b15801561306557600080fd5b505af1158015613079573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916130c6918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600386015490540361316d5760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561315457600080fd5b505af1158015613168573d6000803e3d6000fd5b505050505b50612f55565b8084600a0160008282546131879190615815565b90915550505050505050505050565b60006131db826103da86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133c792505050565b949350505050565b6000546001600160a01b0316331461320e5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003600061323c614144565b8054909150600160401b900460ff1680613263575080546001600160401b03808416911610155b156132805760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001600160a01b03821660009081526008602052604081205460ff1661331a5760405163e51cf7bf60e01b815260040160405180910390fd5b613325858585613196565b82101561334557604051630e3360f160e21b815260040160405180910390fd5b61335a6001600160a01b03841633308561476f565b613377576040516312171d8360e31b815260040160405180910390fd5b6133bb8686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506144889050565b90505b95945050505050565b60008060006133d58461484b565b5091509150806005836001600160601b0316815481106133f7576133f761563f565b90600052602060002090600c0201600401546131db919061579c565b6004546001600160a01b0316331461343e57604051639d6cab9960e01b815260040160405180910390fd5b61344c848484846001613f89565b5050505050565b6000600782815481106134685761346861563f565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134a0576134a061563f565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134e7576134e761563f565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080600783600001518154811061356c5761356c61563f565b906000526020600020906004020190506000816003018460200151815481106135975761359761563f565b90600052602060002090600b02019050600060068260000154815481106135c0576135c061563f565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061366a9190615828565b905061271081111561367b57506127105b600061271061368a838261566b565b8560010154613699919061579c565b6136a391906157c9565b9050808760c0018181516136b79190615815565b90525060e08701516006850180546000929081106136d7576136d761563f565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161371891859187910161598e565b600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061377b91859187910161598e565b600060405180830381600087803b15801561379557600080fd5b505af11580156137a9573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137e9876159a7565b60098b015460405161380b9392916000916001600160a01b03909116906159c3565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613896919061567e565b6138fc576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138c991859101614d5d565b600060405180830381600087803b1580156138e357600080fd5b505af11580156138f7573d6000803e3d6000fd5b505050505b6001886060015161390d919061566b565b8860e0015114801561392157506040880151155b15613a125760098501546001600160a01b031661396a576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613991565b6000546002860154600987015461398f926001600160a01b03918216929116906148d2565b505b60005460c08901516002546139b4926001600160a01b03918216929116906148d2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a0993909290916001600160a01b03909116906159e7565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a3c57613a3c61563f565b90600052602060002090600402019050600081600301836020015181548110613a6757613a6761563f565b90600052602060002090600b0201905060006006826000015481548110613a9057613a9061563f565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613acf91615a06565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b539190615828565b9050612710811115613b6457506127105b60008360060186606001518760e00151613b7e9190615a06565b81548110613b8e57613b8e61563f565b600091825260208220015460018601546001600160a01b03909116925061271090613bba90859061579c565b613bc491906157c9565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613bf691869186910161598e565b600060405180830381600087803b158015613c1057600080fd5b505af1158015613c24573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c5791869101614d5d565b602060405180830381865afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c98919061567e565b613cb557600254613cb3906001600160a01b031683836148d2565b505b60006127108489604001518a60c00151613ccf91906157c9565b613cd9919061579c565b613ce391906157c9565b905080866008016000828254613cf99190615815565b925050819055506000612710858a604001518960020154613d1a91906157c9565b613d24919061579c565b613d2e91906157c9565b905080876007016000828254613d449190615815565b9091555050600254613d60906001600160a01b031685846148d2565b5060098701546001600160a01b0316613d9e576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613db9565b6009870154613db7906001600160a01b031685836148d2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e09928c928a928a92909116906159c3565b60405180910390a4600189606001516002613e24919061579c565b613e2e919061566b565b8960e0015103613f5057600087600801548a60c00151613e4e919061566b565b9050600088600701548960020154613e66919061566b565b905081151580613e7557508015155b156115e2578115613e9f57600054600254613e9d916001600160a01b039182169116846148d2565b505b8015613f065760098901546001600160a01b0316613ee557600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f06565b60005460098a0154613f04916001600160a01b039182169116836148d2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916126df91879187916001600160a01b03909116906159e7565b505050505050505050565b6000546001600160a01b03163314613f865760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fac57506005546001600160601b03861610155b15613fc457613fbc82600461499f565b5060006133be565b8315801590613fff57506005856001600160601b031681548110613fea57613fea61563f565b90600052602060002090600c02016002015484105b1561400f57613fbc82600561499f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a69190615a1a565b9194509250905060008160088111156140c1576140c1614f5a565b146140dc576140d0858261499f565b600093505050506133be565b8215614109576002546140fa906001600160a01b03168a308661476f565b614109576140d085600161499f565b811561413557600254614126906001600160a01b03168a846148d2565b614135576140d085600261499f565b50600198975050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b614170614ae8565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261426292879101615890565b600060405180830381600087803b15801561427c57600080fd5b505af1158015614290573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b0319168155604080518381526020810190915290935091505080516142fe916001840191602090910190614b85565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561434d9060068301908690614b47565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161438091600191889101615890565b600060405180830381600087803b15801561439a57600080fd5b505af11580156143ae573d6000803e3d6000fd5b5060009250600191506143be9050565b6040519080825280602002602001820160405280156143e7578160200160208202803683370190505b5090506001816000815181106143ff576143ff61563f565b60209081029190910181019190915282548751918801516040808a015160608b015191516001600160601b03909416946001947f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee694614465948f9491928e908b906158a9565b60405180910390a361447a60018060016134ca565b505050505050505050505050565b60008060006144968661484b565b92505091506005826001600160601b0316815481106144b7576144b761563f565b60009182526020808320848452600a600c90930201919091019052604090205460ff166144f75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a9091015560068054929650909291849081106145825761458261563f565b6000918252602082200154600580546001600160a01b039092169350906001600160601b0387169081106145b8576145b861563f565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614603576145fe8a84600401546110b0565b614609565b82600401545b9050614615818a6157c9565b6003808401919091558683558301546002840154612710916146369161579c565b61464091906157c9565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b1580156146b357600080fd5b505af11580156146c7573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016147019493929190615928565b600060405180830381600087803b15801561471b57600080fd5b505af115801561472f573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516147d49190615841565b6000604051808303816000865af19150503d8060008114614811576040519150601f19603f3d011682016040523d82523d6000602084013e614816565b606091505b5091509150818015614840575080511580614840575080806020019051810190614840919061567e565b979650505050505050565b600080600060408451106148c0575050506020810151604082015160608301516001600160601b038316158061488c57506005546001600160601b03841610155b1561489657600192505b816000036148a357600391505b8015806148b257506006548110155b156148bb575060015b6148cb565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016148f492919061598e565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516149299190615841565b6000604051808303816000865af19150503d8060008114614966576040519150601f19603f3d011682016040523d82523d6000602084013e61496b565b606091505b5091509150818015614995575080511580614995575080806020019051810190614995919061567e565b9695505050505050565b60018260018111156149b3576149b3614f5a565b036149bc575050565b60018160088111156149d0576149d0614f5a565b036149ee57604051630f323ed960e11b815260040160405180910390fd5b6002816008811115614a0257614a02614f5a565b03614a205760405163e45e13a360e01b815260040160405180910390fd5b6003816008811115614a3457614a34614f5a565b03614a5257604051631d91d0ed60e31b815260040160405180910390fd5b6004816008811115614a6657614a66614f5a565b03614a84576040516321f1774b60e11b815260040160405180910390fd5b6005816008811115614a9857614a98614f5a565b03614ab657604051630caac6b360e31b815260040160405180910390fd5b6008816008811115614aca57614aca614f5a565b0361194c57604051633e57962f60e21b815260040160405180910390fd5b614af0614b0f565b614b0d57604051631afcd79f60e31b815260040160405180910390fd5b565b6000614b19614144565b54600160401b900460ff16919050565b60405180608001604052806004906020820280368337509192915050565b8260048101928215614b75579160200282015b82811115614b75578251825591602001919060010190614b5a565b50614b81929150614bbf565b5090565b828054828255906000526020600020908101928215614b755791602002820182811115614b75578251825591602001919060010190614b5a565b5b80821115614b815760008155600101614bc0565b6001600160a01b0381168114613f8657600080fd5b600060208284031215614bfb57600080fd5b8135614c0681614bd4565b9392505050565b80356001600160601b0381168114614c2457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614c6757614c67614c29565b604052919050565b600082601f830112614c8057600080fd5b813560206001600160401b03821115614c9b57614c9b614c29565b8160051b614caa828201614c3f565b9283528481018201928281019087851115614cc457600080fd5b83870192505b8483101561484057823582529183019190830190614cca565b8015158114613f8657600080fd5b8035614c2481614ce3565b600080600060608486031215614d1157600080fd5b614d1a84614c0d565b925060208401356001600160401b03811115614d3557600080fd5b614d4186828701614c6f565b9250506040840135614d5281614ce3565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614d8357600080fd5b5035919050565b60008060408385031215614d9d57600080fd5b8235614da881614bd4565b946020939093013593505050565b600080600060608486031215614dcb57600080fd5b505081359360208301359350604090920135919050565b8035614c2481614bd4565b600060208284031215614dff57600080fd5b61110182614c0d565b8060005b6004811015610b73578151845260209384019390910190600101614e0c565b608081016111048284614e08565b600082601f830112614e4a57600080fd5b81356001600160401b03811115614e6357614e63614c29565b614e76601f8201601f1916602001614c3f565b818152846020838601011115614e8b57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614ebb57600080fd5b8235614ec681614bd4565b915060208301356001600160401b03811115614ee157600080fd5b614eed85828601614e39565b9150509250929050565b60005b83811015614f12578181015183820152602001614efa565b50506000910152565b60008151808452614f33816020860160208601614ef7565b601f01601f19169290920160200192915050565b6020815260006111016020830184614f1b565b634e487b7160e01b600052602160045260246000fd5b60058110614f8e57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614fbe6040830186614f70565b9215156060820152608001529392505050565b600080600060608486031215614fe657600080fd5b8335614ff181614bd4565b92506020840135915060408401356001600160401b0381111561501357600080fd5b61501f86828701614e39565b9150509250925092565b6000806040838503121561503c57600080fd5b614da883614c0d565b6000806040838503121561505857600080fd5b823561506381614bd4565b9150602083013561507381614ce3565b809150509250929050565b600082601f83011261508f57600080fd5b604051608081018181106001600160401b03821117156150b1576150b1614c29565b6040528060808401858111156150c657600080fd5b845b818110156150e05780358352602092830192016150c8565b509195945050505050565b6000806000806000806000806000806102008b8d03121561510b57600080fd5b8a3561511681614bd4565b995060208b013561512681614bd4565b985060408b013561513681614bd4565b975060608b013561514681614bd4565b965060808b013561515681614bd4565b955061516460a08c01614cf1565b94506151738c60c08d0161507e565b93506151838c6101408d0161507e565b92506101c08b01356001600160401b0381111561519f57600080fd5b6151ab8d828e01614e39565b9250506151bb6101e08c01614de2565b90509295989b9194979a5092959850565b6000806000606084860312156151e157600080fd5b83356151ec81614bd4565b925060208401356001600160401b038116811461520857600080fd5b9150604084013560ff81168114614d5257600080fd5b6000806000806000806000610140888a03121561523a57600080fd5b61524388614c0d565b9650602088013561525381614ce3565b955060408801359450606088013593506080880135925060a0880135915061527e8960c08a0161507e565b905092959891949750929550565b6000806040838503121561529f57600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156152e85781516001600160a01b0316875295820195908201906001016152c3565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e085015261534e6101808501836152ae565b60e08601516101008681019190915286015161012080870191909152860151909250610140615387818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c0312156153b757600080fd5b6153c08a614c0d565b985060208a01356153d081614ce3565b975060408a0135965060608a0135955060808a0135945060a08a013593506153fb8b60c08c0161507e565b92506101408a01356001600160401b038082111561541857600080fd5b6154248d838e01614e39565b93506101608c013591508082111561543b57600080fd5b506154488c828d01614c6f565b9150509295985092959850929598565b6000806040838503121561546b57600080fd5b8235915060208301356001600160401b03811115614ee157600080fd5b60008060006060848603121561549d57600080fd5b833592506020840135915060408401356001600160401b0381111561501357600080fd5b60008083601f8401126154d357600080fd5b5081356001600160401b038111156154ea57600080fd5b60208301915083602082850101111561550257600080fd5b9250929050565b60008060006040848603121561551e57600080fd5b83356001600160401b0381111561553457600080fd5b615540868287016154c1565b9094509250506020840135614d5281614bd4565b60008060008060006080868803121561556c57600080fd5b8535945060208601356001600160401b0381111561558957600080fd5b615595888289016154c1565b90955093505060408601356155a981614bd4565b949793965091946060013592915050565b6000602082840312156155cc57600080fd5b81356001600160401b038111156155e257600080fd5b6131db84828501614e39565b6000806000806080858703121561560457600080fd5b843561560f81614bd4565b935061561d60208601614c0d565b925060408501359150606085013561563481614ce3565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561110457611104615655565b60006020828403121561569057600080fd5b8151614c0681614ce3565b602081016111048284614f70565b600181815b808511156156e45781600019048211156156ca576156ca615655565b808516156156d757918102915b93841c93908002906156ae565b509250929050565b6000826156fb57506001611104565b8161570857506000611104565b816001811461571e576002811461572857615744565b6001915050611104565b60ff84111561573957615739615655565b50506001821b611104565b5060208310610133831016604e8410600b8410161715615767575081810a611104565b61577183836156a9565b806000190482111561578557615785615655565b029392505050565b600061110160ff8416836156ec565b808202811582820484141761110457611104615655565b634e487b7160e01b600052601260045260246000fd5b6000826157d8576157d86157b3565b500490565b6000806000606084860312156157f257600080fd5b83519250602084015161580481614ce3565b6040850151909250614d5281614ce3565b8082018082111561110457611104615655565b60006020828403121561583a57600080fd5b5051919050565b60008251615853818460208701614ef7565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261484060a0830184614e08565b8281526040602082015260006131db6040830184614f1b565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526158dd60a0860188614e08565b610120850192909252845190819052610160840191602086019160005b81811015615916578351855293820193928201926001016158fa565b50929c9b505050505050505050505050565b8481528360208201526080604082015260006159476080830185614f1b565b905082606083015295945050505050565b60006001820161596a5761596a615655565b5060010190565b60006020828403121561598357600080fd5b8151614c0681614bd4565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b82016159bc576159bc615655565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615a1557615a156157b3565b500690565b600080600060608486031215615a2f57600080fd5b8351925060208401519150604084015160098110614d5257600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212209d3f5f848e5c977c06ce8a04a67787edb996e48a4f1a486ddef204a4e19f4a0664736f6c63430008180033", @@ -2297,7 +2297,7 @@ "label": "sortitionModule", "offset": 0, "slot": "4", - "type": "t_contract(ISortitionModule)23277" + "type": "t_contract(ISortitionModule)23000" }, { "astId": 8630, @@ -2313,7 +2313,7 @@ "label": "disputeKits", "offset": 0, "slot": "6", - "type": "t_array(t_contract(IDisputeKit)23114)dyn_storage" + "type": "t_array(t_contract(IDisputeKit)22837)dyn_storage" }, { "astId": 8638, @@ -2352,8 +2352,8 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_contract(IDisputeKit)23114)dyn_storage": { - "base": "t_contract(IDisputeKit)23114", + "t_array(t_contract(IDisputeKit)22837)dyn_storage": { + "base": "t_contract(IDisputeKit)22837", "encoding": "dynamic_array", "label": "contract IDisputeKit[]", "numberOfBytes": "32" @@ -2393,12 +2393,12 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IArbitrableV2)22871": { + "t_contract(IArbitrableV2)22594": { "encoding": "inplace", "label": "contract IArbitrableV2", "numberOfBytes": "20" }, - "t_contract(IDisputeKit)23114": { + "t_contract(IDisputeKit)22837": { "encoding": "inplace", "label": "contract IDisputeKit", "numberOfBytes": "20" @@ -2408,7 +2408,7 @@ "label": "contract IERC20", "numberOfBytes": "20" }, - "t_contract(ISortitionModule)23277": { + "t_contract(ISortitionModule)23000": { "encoding": "inplace", "label": "contract ISortitionModule", "numberOfBytes": "20" @@ -2568,7 +2568,7 @@ "label": "arbitrated", "offset": 12, "slot": "0", - "type": "t_contract(IArbitrableV2)22871" + "type": "t_contract(IArbitrableV2)22594" }, { "astId": 8543, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json index fd3fae16d..aed7f8091 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "abi": [ { "inputs": [ @@ -26,50 +26,50 @@ "type": "receive" } ], - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - "transactionIndex": 1, - "gasUsed": "5235914", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000004000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040008000000000000000000000000020000000000000010000800402000000000000008000000080000000000000000000000000800000000000000000000000080000000000000000000000000000000004008000000000000000000000000000000000100000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb", - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "contractAddress": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", + "transactionIndex": 6, + "gasUsed": "579826", + "logsBloom": "0x00000000000000000000000020000000000000000000100000000000020000000000000000000000000000000000200000000040000000000000000000440000000000000000000000000000000000000000000000040000000000000000000000000000020000000000000010000800402000000000000000000000000004000000800000000000000800000010000000000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001000000000000800000000000000000000000000000000000000000000", + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779", + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b" + "0x0000000000000000000000002246821e1313a93e2f8cdf7a3422d078f560b457" ], "data": "0x", - "logIndex": 0, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "logIndex": 9, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" }, { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", + "0x550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000" ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 10, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" }, { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -77,51 +77,39 @@ "0x0000000000000000000000000000000000000000000000000000000000000001" ], "data": "0x", - "logIndex": 2, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "logIndex": 11, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" }, { - "transactionIndex": 1, - "blockNumber": 3638878, - "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", - "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 6, + "blockNumber": 141215236, + "transactionHash": "0xbdff2bba2e395bf5342b78b32a6148e6f7d9a1b52b79904c934aab3a311815fd", + "address": "0x4838e31E0ea315232c431598110FE677cAF2D6E6", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + "logIndex": 12, + "blockHash": "0x5391b11c9b2be606408d419e6870b8aabe0886ee21f9f857dd20807b4f321779" } ], - "blockNumber": 3638878, - "cumulativeGasUsed": "5235914", + "blockNumber": 141215236, + "cumulativeGasUsed": "1057697", "status": 1, "byzantium": true }, "args": [ - "0x91a373BBdE0532F86410682F362e2Cf685e95085", - "0x994b27af000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000019cb28bab40c3585955798f5eeabd71eec14471c00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" + "0xb6839061C3aD03c208EFd697409453bf9900cAb2", + "0x7b4f3cc5000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000002246821e1313a93e2f8cdf7a3422d078f560b457000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000b34651b65a40553c444c6f0d27286c80ec34fbfd00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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": "c66a072bc17d18807b6e81f338ff0fab", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", "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/arbitrumSepoliaDevnet/PolicyRegistry.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json index 4cbefc9b7..fa7c7bb01 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "address": "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", "abi": [ { "stateMutability": "payable", @@ -251,49 +251,51 @@ "type": "constructor" } ], - "transactionHash": "0xef6e43f7d3ea2175f5e10670a58a8df80a1ac1c55d189d0a27608ab5dd166b2a", + "transactionHash": "0x35d7a7c66915b2839b69e04d52e1841ad3e13cf120372f46ec998f8d8e326210", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", - "transactionIndex": 1, - "gasUsed": "175189", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000004000000000000000000000000000000000000000", - "blockHash": "0xbe53ead690ecc30663a1500d067ac05b04ccd082bff5f4bf43e72a6df95e4969", - "transactionHash": "0xef6e43f7d3ea2175f5e10670a58a8df80a1ac1c55d189d0a27608ab5dd166b2a", + "contractAddress": "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", + "transactionIndex": 4, + "gasUsed": "175391", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000008000000000000000000000000000000", + "blockHash": "0xf483d9ea426a63df705c28f414aca5b2b3bc6a86463d15fe5827bffd61b9b216", + "transactionHash": "0x35d7a7c66915b2839b69e04d52e1841ad3e13cf120372f46ec998f8d8e326210", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3084568, - "transactionHash": "0xef6e43f7d3ea2175f5e10670a58a8df80a1ac1c55d189d0a27608ab5dd166b2a", - "address": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "transactionIndex": 4, + "blockNumber": 141215158, + "transactionHash": "0x35d7a7c66915b2839b69e04d52e1841ad3e13cf120372f46ec998f8d8e326210", + "address": "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xbe53ead690ecc30663a1500d067ac05b04ccd082bff5f4bf43e72a6df95e4969" + "logIndex": 8, + "blockHash": "0xf483d9ea426a63df705c28f414aca5b2b3bc6a86463d15fe5827bffd61b9b216" } ], - "blockNumber": 3084568, - "cumulativeGasUsed": "175189", + "blockNumber": 141215158, + "cumulativeGasUsed": "468503", "status": 1, "byzantium": true }, "args": [ - "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", "execute": { - "methodName": "initialize2", - "args": [] + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59" + ] }, - "implementation": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", + "implementation": "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json index 28ed3acb4..c3bc62965 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", + "address": "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", "abi": [ { "inputs": [], @@ -232,38 +232,38 @@ "type": "function" } ], - "transactionHash": "0x3dd223be8d1474c4936ad70c762f9eb31db332674f590bdac13dcf50df3ac755", + "transactionHash": "0x9aea5e28bb82f150bc08c7fae008355ea9463e769413554f04458092620a8237", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", - "transactionIndex": 2, + "contractAddress": "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", + "transactionIndex": 6, "gasUsed": "781799", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000200000000000000000000000000000000000000000000000000000000", - "blockHash": "0x87a55ebc4f2479d4a72885ecc369f34e72ffca71e8c60e55f44d1cfbdd713227", - "transactionHash": "0x3dd223be8d1474c4936ad70c762f9eb31db332674f590bdac13dcf50df3ac755", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000010000000000000000000000000000000000000000040000", + "blockHash": "0xc0d389747dad2f888db1151d97004cbadaf90bf9fc7f0de0423e1b038478cc5f", + "transactionHash": "0x9aea5e28bb82f150bc08c7fae008355ea9463e769413554f04458092620a8237", "logs": [ { - "transactionIndex": 2, - "blockNumber": 139232389, - "transactionHash": "0x3dd223be8d1474c4936ad70c762f9eb31db332674f590bdac13dcf50df3ac755", - "address": "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", + "transactionIndex": 6, + "blockNumber": 141215149, + "transactionHash": "0x9aea5e28bb82f150bc08c7fae008355ea9463e769413554f04458092620a8237", + "address": "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0x87a55ebc4f2479d4a72885ecc369f34e72ffca71e8c60e55f44d1cfbdd713227" + "logIndex": 1, + "blockHash": "0xc0d389747dad2f888db1151d97004cbadaf90bf9fc7f0de0423e1b038478cc5f" } ], - "blockNumber": 139232389, - "cumulativeGasUsed": "883514", + "blockNumber": 141215149, + "cumulativeGasUsed": "1063902", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":[],\"name\":\"initialize2\",\"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\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract to maintain a policy for each court.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"PolicyRegistry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"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 string public constant override version = \\\"0.8.0\\\";\\n\\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 /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize2() external reinitializer(2) {\\n // NOP\\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\":\"0x3616d00a695cf960373d73a56d727fba4988a6c67f4e9084d1aab18f6db72e73\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610cb66100fc6000396000818161029e015281816102c701526104c40152610cb66000f3fe6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", "deployedBytecode": "0x6080604052600436106100765760003560e01c80630c340a241461007b578063472abf68146100b85780634f1ef286146100cf57806352d1902d146100e257806354fd4d5014610105578063bdf7378014610143578063c4d66de814610163578063d3e8948314610183578063e4c0aaf4146101a3575b600080fd5b34801561008757600080fd5b5060005461009b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c457600080fd5b506100cd6101c3565b005b6100cd6100dd3660046107db565b61028a565b3480156100ee57600080fd5b506100f76104b7565b6040519081526020016100af565b34801561011157600080fd5b50610136604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516100af91906108c0565b34801561014f57600080fd5b506100cd61015e36600461093b565b610515565b34801561016f57600080fd5b506100cd61017e3660046109b4565b6105ae565b34801561018f57600080fd5b5061013661019e3660046109d6565b610696565b3480156101af57600080fd5b506100cd6101be3660046109b4565b610730565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061020c575080546001600160401b03808416911610155b156102295760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6102938261077c565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061031157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610305600080516020610c618339815191525490565b6001600160a01b031614155b1561032f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610389575060408051601f3d908101601f19168201909252610386918101906109ef565b60015b6103b657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610c6183398151915281146103e757604051632a87526960e21b8152600481018290526024016103ad565b600080516020610c618339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156104b2576000836001600160a01b03168360405161044e9190610a08565b600060405180830381855af49150503d8060008114610489576040519150601f19603f3d011682016040523d82523d6000602084013e61048e565b606091505b50509050806104b0576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105025760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610c6183398151915290565b6000546001600160a01b0316331461053f5760405162461bcd60e51b81526004016103ad90610a24565b6000858152600160205260409020610558828483610ae1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161059f93929190610ba1565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806105f7575080546001600160401b03808416911610155b156106145760405162dc149f60e41b815260040160405180910390fd5b8054600160401b6001600160401b03841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b600160205260009081526040902080546106af90610a57565b80601f01602080910402602001604051908101604052809291908181526020018280546106db90610a57565b80156107285780601f106106fd57610100808354040283529160200191610728565b820191906000526020600020905b81548152906001019060200180831161070b57829003601f168201915b505050505081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b81526004016103ad90610a24565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a65760405162461bcd60e51b81526004016103ad90610a24565b50565b80356001600160a01b03811681146107c057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107ee57600080fd5b6107f7836107a9565b915060208301356001600160401b038082111561081357600080fd5b818501915085601f83011261082757600080fd5b813581811115610839576108396107c5565b604051601f8201601f19908116603f01168101908382118183101715610861576108616107c5565b8160405282815288602084870101111561087a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108b757818101518382015260200161089f565b50506000910152565b60208152600082518060208401526108df81604085016020870161089c565b601f01601f19169190910160400192915050565b60008083601f84011261090557600080fd5b5081356001600160401b0381111561091c57600080fd5b60208301915083602082850101111561093457600080fd5b9250929050565b60008060008060006060868803121561095357600080fd5b8535945060208601356001600160401b038082111561097157600080fd5b61097d89838a016108f3565b9096509450604088013591508082111561099657600080fd5b506109a3888289016108f3565b969995985093965092949392505050565b6000602082840312156109c657600080fd5b6109cf826107a9565b9392505050565b6000602082840312156109e857600080fd5b5035919050565b600060208284031215610a0157600080fd5b5051919050565b60008251610a1a81846020870161089c565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c90821680610a6b57607f821691505b602082108103610a8b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b2576000816000526020600020601f850160051c81016020861015610aba5750805b601f850160051c820191505b81811015610ad957828155600101610ac6565b505050505050565b6001600160401b03831115610af857610af86107c5565b610b0c83610b068354610a57565b83610a91565b6000601f841160018114610b405760008515610b285750838201355b600019600387901b1c1916600186901b178355610b9a565b600083815260209020601f19861690835b82811015610b715786850135825560209485019460019092019101610b51565b5086821015610b8e5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610be181610a57565b8060608601526080600180841660008114610c035760018114610c1f57610c4f565b60ff1985166080890152608084151560051b8901019550610c4f565b8a600052602060002060005b85811015610c465781548a8201860152908301908801610c2b565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220daf17c4b96da6ae73cf27c808d549557e5bcc5ff14feeae77520de70bd7269c864736f6c63430008180033", diff --git a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json index b27e100f1..38cbd361b 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "address": "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0xef6e43f7d3ea2175f5e10670a58a8df80a1ac1c55d189d0a27608ab5dd166b2a", + "transactionHash": "0x35d7a7c66915b2839b69e04d52e1841ad3e13cf120372f46ec998f8d8e326210", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", - "transactionIndex": 1, - "gasUsed": "175189", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000004000000000000000000000000000000000000000", - "blockHash": "0xbe53ead690ecc30663a1500d067ac05b04ccd082bff5f4bf43e72a6df95e4969", - "transactionHash": "0xef6e43f7d3ea2175f5e10670a58a8df80a1ac1c55d189d0a27608ab5dd166b2a", + "contractAddress": "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", + "transactionIndex": 4, + "gasUsed": "175391", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000008000000000000000000000000000000", + "blockHash": "0xf483d9ea426a63df705c28f414aca5b2b3bc6a86463d15fe5827bffd61b9b216", + "transactionHash": "0x35d7a7c66915b2839b69e04d52e1841ad3e13cf120372f46ec998f8d8e326210", "logs": [ { - "transactionIndex": 1, - "blockNumber": 3084568, - "transactionHash": "0xef6e43f7d3ea2175f5e10670a58a8df80a1ac1c55d189d0a27608ab5dd166b2a", - "address": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "transactionIndex": 4, + "blockNumber": 141215158, + "transactionHash": "0x35d7a7c66915b2839b69e04d52e1841ad3e13cf120372f46ec998f8d8e326210", + "address": "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xbe53ead690ecc30663a1500d067ac05b04ccd082bff5f4bf43e72a6df95e4969" + "logIndex": 8, + "blockHash": "0xf483d9ea426a63df705c28f414aca5b2b3bc6a86463d15fe5827bffd61b9b216" } ], - "blockNumber": 3084568, - "cumulativeGasUsed": "175189", + "blockNumber": 141215158, + "cumulativeGasUsed": "468503", "status": 1, "byzantium": true }, "args": [ - "0xAA637C9E2831614158d7eB193D03af4a7223C56E", + "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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": "c66a072bc17d18807b6e81f338ff0fab", + "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 DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122043d3f208f41a2b0235b1f7fb49b19f47c8dc193649734f6affb15445be74913164736f6c63430008180033", "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/arbitrumSepoliaDevnet/RandomizerRNG.json b/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG.json deleted file mode 100644 index d00c25a5a..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG.json +++ /dev/null @@ -1,397 +0,0 @@ -{ - "address": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": 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" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0xf543e62b3b8ad026e5b00f0976d46b3d1410cd3d1512c6aea9be565d4c859160", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "transactionIndex": 1, - "gasUsed": "220058", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400020000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9a62b4f9fef98d5cbf41d8efe1729176416007c156509d9bc2c995f4329500d2", - "transactionHash": "0xf543e62b3b8ad026e5b00f0976d46b3d1410cd3d1512c6aea9be565d4c859160", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3084582, - "transactionHash": "0xf543e62b3b8ad026e5b00f0976d46b3d1410cd3d1512c6aea9be565d4c859160", - "address": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x9a62b4f9fef98d5cbf41d8efe1729176416007c156509d9bc2c995f4329500d2" - } - ], - "blockNumber": 3084582, - "cumulativeGasUsed": "220058", - "status": 1, - "byzantium": true - }, - "args": [ - "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - "0x485cc955000000000000000000000000e775d7fde1d0d09ae627c0131040012ccbcc4b9b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", - "execute": { - "methodName": "initialize", - "args": [ - "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - "0xf1C7c037891525E360C59f708739Ac09A7670c59" - ] - }, - "implementation": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Implementation.json deleted file mode 100644 index b91e04100..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Implementation.json +++ /dev/null @@ -1,533 +0,0 @@ -{ - "address": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - "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" - } - ], - "transactionHash": "0xd0495671b6a89573df16c54469800afc1e2c7b143523f906292f51f9efab6014", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - "transactionIndex": 1, - "gasUsed": "699434", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000400000000000000000000000000000100000000000080", - "blockHash": "0xf38a5e092f244d67d971ea16f5ef80b728c5767c6cbc2b9a91893eb40cb4d361", - "transactionHash": "0xd0495671b6a89573df16c54469800afc1e2c7b143523f906292f51f9efab6014", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3084575, - "transactionHash": "0xd0495671b6a89573df16c54469800afc1e2c7b143523f906292f51f9efab6014", - "address": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xf38a5e092f244d67d971ea16f5ef80b728c5767c6cbc2b9a91893eb40cb4d361" - } - ], - "blockNumber": 3084575, - "cumulativeGasUsed": "699434", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", - "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 - }, - "storageLayout": { - "storage": [ - { - "astId": 24301, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 24303, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "callbackGasLimit", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 24306, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "randomizer", - "offset": 0, - "slot": "2", - "type": "t_contract(IRandomizer)24229" - }, - { - "astId": 24310, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "randomNumbers", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 24314, - "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", - "label": "requesterToID", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_address,t_uint256)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IRandomizer)24229": { - "encoding": "inplace", - "label": "contract IRandomizer", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Proxy.json deleted file mode 100644 index 39c2ea724..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/RandomizerRNG_Proxy.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "address": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xf543e62b3b8ad026e5b00f0976d46b3d1410cd3d1512c6aea9be565d4c859160", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "transactionIndex": 1, - "gasUsed": "220058", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400020000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9a62b4f9fef98d5cbf41d8efe1729176416007c156509d9bc2c995f4329500d2", - "transactionHash": "0xf543e62b3b8ad026e5b00f0976d46b3d1410cd3d1512c6aea9be565d4c859160", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 3084582, - "transactionHash": "0xf543e62b3b8ad026e5b00f0976d46b3d1410cd3d1512c6aea9be565d4c859160", - "address": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x9a62b4f9fef98d5cbf41d8efe1729176416007c156509d9bc2c995f4329500d2" - } - ], - "blockNumber": 3084582, - "cumulativeGasUsed": "220058", - "status": 1, - "byzantium": true - }, - "args": [ - "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - "0x485cc955000000000000000000000000e775d7fde1d0d09ae627c0131040012ccbcc4b9b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" - ], - "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json index f82b04689..43ab7047e 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json @@ -1,5 +1,5 @@ { - "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "address": "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", "abi": [ { "stateMutability": "payable", @@ -987,49 +987,56 @@ "type": "constructor" } ], - "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "transactionHash": "0xe52f21157b081710df5d51cc246b0f61bcb7043f6e63bb31bfc305e0bdaa2211", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", - "transactionIndex": 2, - "gasUsed": "4675242", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000800000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae", - "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "contractAddress": "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", + "transactionIndex": 1, + "gasUsed": "332725", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbfeb3d4bcb89b9c2f6be8118d259f1727c2a3315bf2929127c1650c7cf4e81ca", + "transactionHash": "0xe52f21157b081710df5d51cc246b0f61bcb7043f6e63bb31bfc305e0bdaa2211", "logs": [ { - "transactionIndex": 2, - "blockNumber": 3638850, - "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", - "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "transactionIndex": 1, + "blockNumber": 141215215, + "transactionHash": "0xe52f21157b081710df5d51cc246b0f61bcb7043f6e63bb31bfc305e0bdaa2211", + "address": "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae" + "blockHash": "0xbfeb3d4bcb89b9c2f6be8118d259f1727c2a3315bf2929127c1650c7cf4e81ca" } ], - "blockNumber": 3638850, - "cumulativeGasUsed": "5561170", + "blockNumber": 141215215, + "cumulativeGasUsed": "332725", "status": 1, "byzantium": true }, "args": [ - "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", - "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a54e7a16d7460e38a8f324ef46782fb520d58ce800000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf48360000000000000000000000000000000000000000000000000000000000000014" + "0xB37919A50d3BddA9982e3c84aA47e501c454364B", + "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000004838e31e0ea315232c431598110fe677caf2d6e600000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000002580000000000000000000000006c40d7f5d5be3492fe9ef70e4ecb2bd773c12af80000000000000000000000000000000000000000000000000000000000000014" ], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", "execute": { - "methodName": "initialize3", - "args": [] + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "0x4838e31E0ea315232c431598110FE677cAF2D6E6", + 180, + 600, + "0x6c40D7F5d5bE3492fe9EF70e4eCb2BD773c12AF8", + 20 + ] }, - "implementation": "0x45129beB9B84BFb07bA885085C1D60437494a93f", + "implementation": "0xB37919A50d3BddA9982e3c84aA47e501c454364B", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo.json deleted file mode 100644 index 099e5a401..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo.json +++ /dev/null @@ -1,1110 +0,0 @@ -{ - "address": "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "abi": [ - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "FailedDelegateCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "enum ISortitionModule.Phase", - "name": "_phase", - "type": "uint8" - } - ], - "name": "NewPhase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_courtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "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" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "transactionHash": "0x17e9da82087a7337876173d5d1d5567253299c1225a23270cfcbd5d8a2c5b288", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "transactionIndex": 1, - "gasUsed": "441279", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000400000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbb3cd01584873e92a524a9f825ae4f5b910ac8b27c46dd6f395a3124f982ac4d", - "transactionHash": "0x17e9da82087a7337876173d5d1d5567253299c1225a23270cfcbd5d8a2c5b288", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 21125139, - "transactionHash": "0x17e9da82087a7337876173d5d1d5567253299c1225a23270cfcbd5d8a2c5b288", - "address": "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xbb3cd01584873e92a524a9f825ae4f5b910ac8b27c46dd6f395a3124f982ac4d" - } - ], - "blockNumber": 21125139, - "cumulativeGasUsed": "441279", - "status": 1, - "byzantium": true - }, - "args": [ - "0x109E569f39945ea0843cF82E4E44553089AB779D", - "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000026bf077037550e437605f07e25efcad510715c3a00000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf4836000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" - ], - "numDeployments": 2, - "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", - "execute": { - "methodName": "initialize", - "args": [ - "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x26bf077037550e437605F07e25EfcAd510715C3A", - 180, - 600, - "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - 20, - { - "type": "BigNumber", - "hex": "0x6c6b935b8bbd400000" - }, - { - "type": "BigNumber", - "hex": "0x01a784379d99db42000000" - } - ] - }, - "implementation": "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Implementation.json deleted file mode 100644 index 7d3c77db5..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Implementation.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "address": "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", - "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" - } - ], - "transactionHash": "0x82fc0d4c0b2b3fb0a09be2779550c1fe51405f0c3d5009b9fb6a746b4be50c36", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", - "transactionIndex": 2, - "gasUsed": "3576280", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000200000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000400000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7c9434f9bbed64f6e857d5099f88d370fc93e14ee36856aedf38304a2d918d20", - "transactionHash": "0x82fc0d4c0b2b3fb0a09be2779550c1fe51405f0c3d5009b9fb6a746b4be50c36", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 21492592, - "transactionHash": "0x82fc0d4c0b2b3fb0a09be2779550c1fe51405f0c3d5009b9fb6a746b4be50c36", - "address": "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 3, - "blockHash": "0x7c9434f9bbed64f6e857d5099f88d370fc93e14ee36856aedf38304a2d918d20" - } - ], - "blockNumber": 21492592, - "cumulativeGasUsed": "4749335", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "6fd6c790736e49d63654c469638eeab5", - "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 Pause();\\n event Unpause();\\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 Pause();\\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 Unpause();\\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\":\"0xcc0e0ecc6a01f8c2adf8d271e8e928db2f1bcbdbcf3943b08ddf22f087d6ac92\",\"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/// 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\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516131686200010360003960008181611481015281816114aa01526116a201526131686000f3fe6080604052600436106102675760003560e01c80637dc38f1411610144578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b014610731578063dd5e5cb51461077d578063e534710d1461079d578063f216de4c146107d5578063f2f4eb26146107f5578063f6b4d82d1461081557600080fd5b8063c157261814610685578063ccbac9f51461069b578063d09f392d146106b1578063d1c1df48146106d1578063d605787b1461071157600080fd5b8063a2473cc111610108578063a2473cc1146105bc578063a5861b90146105dc578063b1c9fe6e1461060b578063b5d69e9914610639578063b888adfa14610659578063c057eca71461066f57600080fd5b80637dc38f1414610530578063817b1cd214610546578063823cfd701461055c5780638d3771bb1461057c578063965af6c71461059c57600080fd5b8063498c752c116101dd578063543f8a36116101a1578063543f8a361461044c57806356acb050146104795780635a68c1541461048f5780635d2d7846146104a55780636624192f146104c557806376fa9fc51461051057600080fd5b8063498c752c146103c45780634c70a0d6146103e45780634dbbebbc146104045780634f1ef2861461042457806352d1902d1461043757600080fd5b80631b92bbbe1161022f5780631b92bbbe1461031a57806321e1625e1461033057806321ea9b3f1461035057806323f61de41461036e57806335975f4a14610384578063477a655c146103a457600080fd5b8063034327441461026c57806306dfc967146102955780630b274f2e146102b75780630c340a24146102cc5780630e083ec914610304575b600080fd5b34801561027857600080fd5b5061028260065481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612af8565b61087f565b005b3480156102c357600080fd5b506102b56108b7565b3480156102d857600080fd5b506000546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161028c565b34801561031057600080fd5b50610282600a5481565b34801561032657600080fd5b5061028260035481565b34801561033c57600080fd5b506102b561034b366004612b26565b610c8a565b34801561035c57600080fd5b506102b561036b366004612af8565b50565b34801561037a57600080fd5b5061028260105481565b34801561039057600080fd5b506102b561039f366004612af8565b610d2d565b3480156103b057600080fd5b506102b56103bf366004612bf5565b610f6f565b3480156103d057600080fd5b506102b56103df366004612c3c565b611066565b3480156103f057600080fd5b506102ec6103ff366004612cb4565b6111a0565b34801561041057600080fd5b506102b561041f366004612b26565b611384565b6102b5610432366004612ce0565b61146d565b34801561044357600080fd5b50610282611695565b34801561045857600080fd5b5061046c610467366004612d1a565b6116f3565b60405161028c9190612d37565b34801561048557600080fd5b50610282600b5481565b34801561049b57600080fd5b5061028260115481565b3480156104b157600080fd5b506102b56104c0366004612d84565b611791565b3480156104d157600080fd5b506105006104e0366004612d1a565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161028c565b34801561051c57600080fd5b5061028261052b366004612d84565b6117d4565b34801561053c57600080fd5b5061028260095481565b34801561055257600080fd5b5061028260125481565b34801561056857600080fd5b506102b5610577366004612af8565b61182f565b34801561058857600080fd5b506102b5610597366004612af8565b61185e565b3480156105a857600080fd5b506102b56105b7366004612b26565b61188d565b3480156105c857600080fd5b506102826105d7366004612dbb565b611928565b3480156105e857600080fd5b506105fc6105f7366004612e02565b611952565b60405161028c93929190612e6b565b34801561061757600080fd5b5060015461062c90600160a01b900460ff1681565b60405161028c9190612e97565b34801561064557600080fd5b506102b5610654366004612d1a565b61199f565b34801561066557600080fd5b5061028260045481565b34801561067b57600080fd5b5061028260025481565b34801561069157600080fd5b5061028260055481565b3480156106a757600080fd5b5061028260085481565b3480156106bd57600080fd5b506102b56106cc366004612d84565b611a81565b3480156106dd57600080fd5b506106f16106ec366004612dbb565b611abb565b60408051948552602085019390935291830152606082015260800161028c565b34801561071d57600080fd5b506007546102ec906001600160a01b031681565b34801561073d57600080fd5b5061076861074c366004612d1a565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161028c565b34801561078957600080fd5b506102b5610798366004612af8565b611afa565b3480156107a957600080fd5b506102826107b8366004612dbb565b600f60209081526000928352604080842090915290825290205481565b3480156107e157600080fd5b506102b56107f0366004612b26565b611b29565b34801561080157600080fd5b506001546102ec906001600160a01b031681565b34801561082157600080fd5b5061086f610830366004612af8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161028c9493929190612eb1565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016108a990612ee2565b60405180910390fd5b601055565b6000600154600160a01b900460ff1660028111156108d7576108d7612e55565b03610a45576002546004546108ec9042612f3a565b101561094f5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016108a9565b6000600654116109b15760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a9565b6007546009546001600160a01b0390911690637363ae1f906109d39043612f4d565b6040518263ffffffff1660e01b81526004016109f191815260200190565b600060405180830381600087803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c3f565b60018054600160a01b900460ff166002811115610a6457610a64612e55565b03610b5c576007546009546005546001600160a01b03909216916313cf905491610a8d91612f4d565b6040518263ffffffff1660e01b8152600401610aab91815260200190565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190612f60565b6008819055600003610b425760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a9565b600180546002919060ff60a01b1916600160a01b83610a3b565b6002600154600160a01b900460ff166002811115610b7c57610b7c612e55565b03610c3f576006541580610b9e5750600354600454610b9b9042612f3a565b10155b610c315760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a9565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c8091600160a01b90910460ff1690612e97565b60405180910390a1565b6001546001600160a01b03163314610cb45760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d602052604081206002018054839290610cdf908490612f4d565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610d4d57610d4d612e55565b14610d9a5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a9565b600b54600a541015610dee5760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108a9565b6000600a54600183600b54610e039190612f4d565b610e0d9190612f3a565b11610e185781610e33565b600b54600a54610e289190612f3a565b610e33906001612f4d565b9050600081600b54610e459190612f4d565b600b549091505b81811015610f67576000818152600e6020526040902080546001600160a01b031615610f545760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610ec89490821693600160a01b9092046001600160601b031692909160ff1690600401612eb1565b600060405180830381600087803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b5080610f5f81612fbd565b915050610e4c565b50600b555050565b6001546001600160a01b03163314610f995760405162461bcd60e51b81526004016108a990612f79565b6000828152600c6020526040812090610fb183611ba1565b825490915015610ffa5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a9565b6001811161104a5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a9565b8155600201805460018101825560009182526020822001555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806110b05750805467ffffffffffffffff808416911610155b156110cd5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038c81166001600160a01b031992831617909255600180548c841690831617815560028b905560038a90554260045560078054938a16939092169290921790556009869055600b5560108490556011839055805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff1660028111156111c2576111c2612e55565b146111fe5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a9565b6000848152600c602052604081206002810180549192909161122257611222612fd6565b906000526020600020015460000361123e57600091505061137d565b60008160020160008154811061125657611256612fd6565b90600052602060002001546008548686604051602001611289939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6112ac9190613002565b905060005b600283015483546112c3908390613016565b6112ce906001612f4d565b101561135d5760015b83548111611357576000818386600001546112f29190613016565b6112fc9190612f4d565b9050600085600201828154811061131557611315612fd6565b9060005260206000200154905080851061133a576113338186612f3a565b9450611342565b509150611357565b5050808061134f90612fbd565b9150506112d7565b506112b1565b600081815260048401602052604090205461137790611bbc565b93505050505b9392505050565b6000546001600160a01b031633146113ae5760405162461bcd60e51b81526004016108a990612ee2565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156113ed576113ed612e55565b03611469576007546009546001600160a01b0390911690637363ae1f906114149043612f4d565b6040518263ffffffff1660e01b815260040161143291815260200190565b600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b50504360055550505b5050565b61147682611be7565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114f457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114e86000805160206131138339815191525490565b6001600160a01b031614155b156115125760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561156c575060408051601f3d908101601f1916820190925261156991810190612f60565b60015b61159457604051630c76093760e01b81526001600160a01b03831660048201526024016108a9565b60008051602061311383398151915281146115c557604051632a87526960e21b8152600481018290526024016108a9565b6000805160206131138339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611690576000836001600160a01b03168360405161162c919061302d565b600060405180830381855af49150503d8060008114611667576040519150601f19603f3d011682016040523d82523d6000602084013e61166c565b606091505b505090508061168e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e05760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061311383398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561178557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116117425790505b50505050509050919050565b6001546001600160a01b031633146117bb5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb8361305c565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361180457600092505050611829565b81600201818154811061181957611819612fd6565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146118595760405162461bcd60e51b81526004016108a990612ee2565b600255565b6000546001600160a01b031633146118885760405162461bcd60e51b81526004016108a990612ee2565b601155565b6001546001600160a01b031633146118b75760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040812060020180548392906118e2908490612f3a565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610d21565b6000806119358484611c11565b905061194a6001600160601b038416826117d4565b949350505050565b600154600090819081906001600160a01b031633146119835760405162461bcd60e51b81526004016108a990612f79565b61198f87878787611c59565b9199909850909650945050505050565b6001546001600160a01b031633146119c95760405162461bcd60e51b81526004016108a990612f79565b60006119d4826116f3565b80519091505b801561169057600180546001600160a01b03169063fbb519e79085908590611a029086612f3a565b81518110611a1257611a12612fd6565b60200260200101516000806040518563ffffffff1660e01b8152600401611a3c9493929190612eb1565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b505050508080611a799061305c565b9150506119da565b6001546001600160a01b03163314611aab5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb83612fbd565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611aed8787611928565b9054949793965094505050565b6000546001600160a01b03163314611b245760405162461bcd60e51b81526004016108a990612ee2565b600355565b6001546001600160a01b03163314611b535760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040902060018101548211611b955781816001016000828254611b8a9190612f3a565b909155506116909050565b60006001820155505050565b60006020825110611bb457506020015190565b506006919050565b600060405160005b6014811015611bdf5783811a81600c84010153600101611bc4565b505192915050565b6000546001600160a01b0316331461036b5760405162461bcd60e51b81526004016108a990612ee2565b600060405160005b6014811015611c34578481600c011a81830153600101611c19565b5060145b6020811015611c505783811a81830153600101611c38565b50519392505050565b600154600090819081906001600160a01b03163314611c8a5760405162461bcd60e51b81526004016108a990612f79565b6000611c968888611928565b9050808611600081611cb157611cac8884612f3a565b611cbb565b611cbb8389612f3a565b6001600160a01b038b166000908152600d60205260409020909150828015611ce1575087155b15611d3e57601054828260010154611cf99190612f4d565b1115611d1357600080600696509650965050505050611db6565b60115482601254611d249190612f4d565b1115611d3e57600080600796509650965050505050611db6565b6000600154600160a01b900460ff166002811115611d5e57611d5e612e55565b03611d9e578215611d86578160126000828254611d7b9190612f4d565b90915550611d9e9050565b8160126000828254611d989190612f3a565b90915550505b611daa8b8b8b8b611dc0565b91985096509450505050505b9450945094915050565b6001600160a01b0384166000908152600d602052604081208190819081611de78989611928565b825490915087158015611e035750600481101580611e03575081155b15611e1b576000806003955095509550505050611db6565b6000600154600160a01b900460ff166002811115611e3b57611e3b612e55565b14611ff557611e4a898b612159565b94506000600e6000600a60008154611e6190612fbd565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611f995760028101805460ff19166001179055611f44848b8b86612410565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611fe7565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611db692505050565b81881061201557866120105761200d838a8a85612410565b95505b61202e565b612021838a8a856124f0565b61202b9086612f4d565b94505b600061203a8b8b611c11565b905060008a5b816120f8576120596001600160601b0382168c856126e7565b6000196001600160601b038216016120745760019150612040565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa1580156120c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e99190613073565b50949550612040945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050509450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b03861684529091528120548015612409576000818152600e60205260409020600281015460ff16156123bc5760006121b38587611928565b905060008183600101546121c79190612f3a565b6001600160a01b0387166000908152600d6020526040902060018101549196508692509082106121f957806001015495505b8581600101600082825461220d9190612f3a565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036123b85780545b80156123b6576001600160601b03891682612282600184612f3a565b8154811061229257612292612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123a457815482906122ce90600190612f3a565b815481106122de576122de612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123129084612f3a565b8154811061232257612322612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508160000180548061236e5761236e6130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123b6565b806123ae8161305c565b915050612266565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561242a57600061243e565b8560010154866002015461243e9190612f3a565b905061244a8184612f4d565b84101561245857600061246d565b806124638486612f3a565b61246d9190612f3a565b9150826000036124b2578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124c457836124df565b838387600101546124d59190612f3a565b6124df9190612f4d565b866001018190555050949350505050565b60028401546000906125028484612f3a565b61250c9190612f4d565b856001015410612527576125208383612f3a565b905061254d565b846002015485600101541061254d578460020154856001015461254a9190612f3a565b90505b826000036126aa5784545b80156126a8576001600160601b03851686612574600184612f3a565b8154811061258457612584612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361269657855486906125c090600190612f3a565b815481106125d0576125d0612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906126049084612f3a565b8154811061261457612614612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555085600001805480612660576126606130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556126a8565b806126a08161305c565b915050612558565b505b81856001015410156126bc57826126d7565b828286600101546126cd9190612f3a565b6126d79190612f4d565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128b45783156128af57600182015460000361280257506002810180546001808201835560009283526020909220810185905590811480159061276157508154612755600183612f3a565b61275f9190613002565b155b156127fd57815460009061277590836130fe565b6000818152600485016020526040812054919250612794846001612f4d565b9050846002018560020184815481106127af576127af612fd6565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b61287d565b60018083018054909161281491612f3a565b8154811061282457612824612fd6565b9060005260206000200154905081600101805480612844576128446130e8565b600190038181906000526020600020016000905590558382600201828154811061287057612870612fd6565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556128af8582600187612a3b565b612a34565b836000036129525760008260020182815481106128d3576128d3612fd6565b9060005260206000200154905060008360020183815481106128f7576128f7612fd6565b600091825260208083209091019290925560018086018054918201815582528282200184905585815260038501825260408082208290558482526004860190925290812081905561294c908790849084612a3b565b50612a34565b81600201818154811061296757612967612fd6565b90600052602060002001548414612a345760008483600201838154811061299057612990612fd6565b9060005260206000200154111590506000816129d657858460020184815481106129bc576129bc612fd6565b90600052602060002001546129d19190612f3a565b612a01565b8360020183815481106129eb576129eb612fd6565b906000526020600020015486612a019190612f3a565b905085846002018481548110612a1957612a19612fd6565b600091825260209091200155612a3187848484612a3b565b50505b5050505050565b6000848152600c60205260409020835b8015612af0578154612a5e600183612f3a565b612a6891906130fe565b905083612a9f5782826002018281548110612a8557612a85612fd6565b9060005260206000200154612a9a9190612f3a565b612aca565b82826002018281548110612ab557612ab5612fd6565b9060005260206000200154612aca9190612f4d565b826002018281548110612adf57612adf612fd6565b600091825260209091200155612a4b565b505050505050565b600060208284031215612b0a57600080fd5b5035919050565b6001600160a01b038116811461036b57600080fd5b60008060408385031215612b3957600080fd5b8235612b4481612b11565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612b7957600080fd5b813567ffffffffffffffff80821115612b9457612b94612b52565b604051601f8301601f19908116603f01168101908282118183101715612bbc57612bbc612b52565b81604052838152866020858801011115612bd557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c0857600080fd5b82359150602083013567ffffffffffffffff811115612c2657600080fd5b612c3285828601612b68565b9150509250929050565b600080600080600080600080610100898b031215612c5957600080fd5b8835612c6481612b11565b97506020890135612c7481612b11565b965060408901359550606089013594506080890135612c9281612b11565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612cc957600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612cf357600080fd5b8235612cfe81612b11565b9150602083013567ffffffffffffffff811115612c2657600080fd5b600060208284031215612d2c57600080fd5b813561137d81612b11565b6020808252825182820181905260009190848201906040850190845b81811015612d785783516001600160601b031683529284019291840191600101612d53565b50909695505050505050565b60008060408385031215612d9757600080fd5b50508035926020909101359150565b6001600160601b038116811461036b57600080fd5b60008060408385031215612dce57600080fd5b8235612dd981612b11565b91506020830135612de981612da6565b809150509250929050565b801515811461036b57600080fd5b60008060008060808587031215612e1857600080fd5b8435612e2381612b11565b93506020850135612e3381612da6565b9250604085013591506060850135612e4a81612df4565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612e8957612e89612e55565b826040830152949350505050565b6020810160038310612eab57612eab612e55565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182957611829612f24565b8082018082111561182957611829612f24565b600060208284031215612f7257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b600060018201612fcf57612fcf612f24565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261301157613011612fec565b500690565b808202811582820484141761182957611829612f24565b6000825160005b8181101561304e5760208186018101518583015201613034565b506000920191825250919050565b60008161306b5761306b612f24565b506000190190565b600080600080600080600060e0888a03121561308e57600080fd5b875161309981612da6565b60208901519097506130aa81612df4565b8096505060408801519450606088015193506080880151925060a0880151915060c08801516130d881612df4565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b60008261310d5761310d612fec565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ca9ebf934573cb6e3d68c3b324f84f8a1c4a85e6662f664de2b642bff6efbc7264736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102675760003560e01c80637dc38f1411610144578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b014610731578063dd5e5cb51461077d578063e534710d1461079d578063f216de4c146107d5578063f2f4eb26146107f5578063f6b4d82d1461081557600080fd5b8063c157261814610685578063ccbac9f51461069b578063d09f392d146106b1578063d1c1df48146106d1578063d605787b1461071157600080fd5b8063a2473cc111610108578063a2473cc1146105bc578063a5861b90146105dc578063b1c9fe6e1461060b578063b5d69e9914610639578063b888adfa14610659578063c057eca71461066f57600080fd5b80637dc38f1414610530578063817b1cd214610546578063823cfd701461055c5780638d3771bb1461057c578063965af6c71461059c57600080fd5b8063498c752c116101dd578063543f8a36116101a1578063543f8a361461044c57806356acb050146104795780635a68c1541461048f5780635d2d7846146104a55780636624192f146104c557806376fa9fc51461051057600080fd5b8063498c752c146103c45780634c70a0d6146103e45780634dbbebbc146104045780634f1ef2861461042457806352d1902d1461043757600080fd5b80631b92bbbe1161022f5780631b92bbbe1461031a57806321e1625e1461033057806321ea9b3f1461035057806323f61de41461036e57806335975f4a14610384578063477a655c146103a457600080fd5b8063034327441461026c57806306dfc967146102955780630b274f2e146102b75780630c340a24146102cc5780630e083ec914610304575b600080fd5b34801561027857600080fd5b5061028260065481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612af8565b61087f565b005b3480156102c357600080fd5b506102b56108b7565b3480156102d857600080fd5b506000546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161028c565b34801561031057600080fd5b50610282600a5481565b34801561032657600080fd5b5061028260035481565b34801561033c57600080fd5b506102b561034b366004612b26565b610c8a565b34801561035c57600080fd5b506102b561036b366004612af8565b50565b34801561037a57600080fd5b5061028260105481565b34801561039057600080fd5b506102b561039f366004612af8565b610d2d565b3480156103b057600080fd5b506102b56103bf366004612bf5565b610f6f565b3480156103d057600080fd5b506102b56103df366004612c3c565b611066565b3480156103f057600080fd5b506102ec6103ff366004612cb4565b6111a0565b34801561041057600080fd5b506102b561041f366004612b26565b611384565b6102b5610432366004612ce0565b61146d565b34801561044357600080fd5b50610282611695565b34801561045857600080fd5b5061046c610467366004612d1a565b6116f3565b60405161028c9190612d37565b34801561048557600080fd5b50610282600b5481565b34801561049b57600080fd5b5061028260115481565b3480156104b157600080fd5b506102b56104c0366004612d84565b611791565b3480156104d157600080fd5b506105006104e0366004612d1a565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161028c565b34801561051c57600080fd5b5061028261052b366004612d84565b6117d4565b34801561053c57600080fd5b5061028260095481565b34801561055257600080fd5b5061028260125481565b34801561056857600080fd5b506102b5610577366004612af8565b61182f565b34801561058857600080fd5b506102b5610597366004612af8565b61185e565b3480156105a857600080fd5b506102b56105b7366004612b26565b61188d565b3480156105c857600080fd5b506102826105d7366004612dbb565b611928565b3480156105e857600080fd5b506105fc6105f7366004612e02565b611952565b60405161028c93929190612e6b565b34801561061757600080fd5b5060015461062c90600160a01b900460ff1681565b60405161028c9190612e97565b34801561064557600080fd5b506102b5610654366004612d1a565b61199f565b34801561066557600080fd5b5061028260045481565b34801561067b57600080fd5b5061028260025481565b34801561069157600080fd5b5061028260055481565b3480156106a757600080fd5b5061028260085481565b3480156106bd57600080fd5b506102b56106cc366004612d84565b611a81565b3480156106dd57600080fd5b506106f16106ec366004612dbb565b611abb565b60408051948552602085019390935291830152606082015260800161028c565b34801561071d57600080fd5b506007546102ec906001600160a01b031681565b34801561073d57600080fd5b5061076861074c366004612d1a565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161028c565b34801561078957600080fd5b506102b5610798366004612af8565b611afa565b3480156107a957600080fd5b506102826107b8366004612dbb565b600f60209081526000928352604080842090915290825290205481565b3480156107e157600080fd5b506102b56107f0366004612b26565b611b29565b34801561080157600080fd5b506001546102ec906001600160a01b031681565b34801561082157600080fd5b5061086f610830366004612af8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161028c9493929190612eb1565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016108a990612ee2565b60405180910390fd5b601055565b6000600154600160a01b900460ff1660028111156108d7576108d7612e55565b03610a45576002546004546108ec9042612f3a565b101561094f5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016108a9565b6000600654116109b15760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a9565b6007546009546001600160a01b0390911690637363ae1f906109d39043612f4d565b6040518263ffffffff1660e01b81526004016109f191815260200190565b600060405180830381600087803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c3f565b60018054600160a01b900460ff166002811115610a6457610a64612e55565b03610b5c576007546009546005546001600160a01b03909216916313cf905491610a8d91612f4d565b6040518263ffffffff1660e01b8152600401610aab91815260200190565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190612f60565b6008819055600003610b425760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a9565b600180546002919060ff60a01b1916600160a01b83610a3b565b6002600154600160a01b900460ff166002811115610b7c57610b7c612e55565b03610c3f576006541580610b9e5750600354600454610b9b9042612f3a565b10155b610c315760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a9565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c8091600160a01b90910460ff1690612e97565b60405180910390a1565b6001546001600160a01b03163314610cb45760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d602052604081206002018054839290610cdf908490612f4d565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610d4d57610d4d612e55565b14610d9a5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a9565b600b54600a541015610dee5760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108a9565b6000600a54600183600b54610e039190612f4d565b610e0d9190612f3a565b11610e185781610e33565b600b54600a54610e289190612f3a565b610e33906001612f4d565b9050600081600b54610e459190612f4d565b600b549091505b81811015610f67576000818152600e6020526040902080546001600160a01b031615610f545760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610ec89490821693600160a01b9092046001600160601b031692909160ff1690600401612eb1565b600060405180830381600087803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b5080610f5f81612fbd565b915050610e4c565b50600b555050565b6001546001600160a01b03163314610f995760405162461bcd60e51b81526004016108a990612f79565b6000828152600c6020526040812090610fb183611ba1565b825490915015610ffa5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a9565b6001811161104a5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a9565b8155600201805460018101825560009182526020822001555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806110b05750805467ffffffffffffffff808416911610155b156110cd5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038c81166001600160a01b031992831617909255600180548c841690831617815560028b905560038a90554260045560078054938a16939092169290921790556009869055600b5560108490556011839055805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff1660028111156111c2576111c2612e55565b146111fe5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a9565b6000848152600c602052604081206002810180549192909161122257611222612fd6565b906000526020600020015460000361123e57600091505061137d565b60008160020160008154811061125657611256612fd6565b90600052602060002001546008548686604051602001611289939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6112ac9190613002565b905060005b600283015483546112c3908390613016565b6112ce906001612f4d565b101561135d5760015b83548111611357576000818386600001546112f29190613016565b6112fc9190612f4d565b9050600085600201828154811061131557611315612fd6565b9060005260206000200154905080851061133a576113338186612f3a565b9450611342565b509150611357565b5050808061134f90612fbd565b9150506112d7565b506112b1565b600081815260048401602052604090205461137790611bbc565b93505050505b9392505050565b6000546001600160a01b031633146113ae5760405162461bcd60e51b81526004016108a990612ee2565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156113ed576113ed612e55565b03611469576007546009546001600160a01b0390911690637363ae1f906114149043612f4d565b6040518263ffffffff1660e01b815260040161143291815260200190565b600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b50504360055550505b5050565b61147682611be7565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114f457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114e86000805160206131138339815191525490565b6001600160a01b031614155b156115125760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561156c575060408051601f3d908101601f1916820190925261156991810190612f60565b60015b61159457604051630c76093760e01b81526001600160a01b03831660048201526024016108a9565b60008051602061311383398151915281146115c557604051632a87526960e21b8152600481018290526024016108a9565b6000805160206131138339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611690576000836001600160a01b03168360405161162c919061302d565b600060405180830381855af49150503d8060008114611667576040519150601f19603f3d011682016040523d82523d6000602084013e61166c565b606091505b505090508061168e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e05760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061311383398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561178557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116117425790505b50505050509050919050565b6001546001600160a01b031633146117bb5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb8361305c565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361180457600092505050611829565b81600201818154811061181957611819612fd6565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146118595760405162461bcd60e51b81526004016108a990612ee2565b600255565b6000546001600160a01b031633146118885760405162461bcd60e51b81526004016108a990612ee2565b601155565b6001546001600160a01b031633146118b75760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040812060020180548392906118e2908490612f3a565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610d21565b6000806119358484611c11565b905061194a6001600160601b038416826117d4565b949350505050565b600154600090819081906001600160a01b031633146119835760405162461bcd60e51b81526004016108a990612f79565b61198f87878787611c59565b9199909850909650945050505050565b6001546001600160a01b031633146119c95760405162461bcd60e51b81526004016108a990612f79565b60006119d4826116f3565b80519091505b801561169057600180546001600160a01b03169063fbb519e79085908590611a029086612f3a565b81518110611a1257611a12612fd6565b60200260200101516000806040518563ffffffff1660e01b8152600401611a3c9493929190612eb1565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b505050508080611a799061305c565b9150506119da565b6001546001600160a01b03163314611aab5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb83612fbd565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611aed8787611928565b9054949793965094505050565b6000546001600160a01b03163314611b245760405162461bcd60e51b81526004016108a990612ee2565b600355565b6001546001600160a01b03163314611b535760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040902060018101548211611b955781816001016000828254611b8a9190612f3a565b909155506116909050565b60006001820155505050565b60006020825110611bb457506020015190565b506006919050565b600060405160005b6014811015611bdf5783811a81600c84010153600101611bc4565b505192915050565b6000546001600160a01b0316331461036b5760405162461bcd60e51b81526004016108a990612ee2565b600060405160005b6014811015611c34578481600c011a81830153600101611c19565b5060145b6020811015611c505783811a81830153600101611c38565b50519392505050565b600154600090819081906001600160a01b03163314611c8a5760405162461bcd60e51b81526004016108a990612f79565b6000611c968888611928565b9050808611600081611cb157611cac8884612f3a565b611cbb565b611cbb8389612f3a565b6001600160a01b038b166000908152600d60205260409020909150828015611ce1575087155b15611d3e57601054828260010154611cf99190612f4d565b1115611d1357600080600696509650965050505050611db6565b60115482601254611d249190612f4d565b1115611d3e57600080600796509650965050505050611db6565b6000600154600160a01b900460ff166002811115611d5e57611d5e612e55565b03611d9e578215611d86578160126000828254611d7b9190612f4d565b90915550611d9e9050565b8160126000828254611d989190612f3a565b90915550505b611daa8b8b8b8b611dc0565b91985096509450505050505b9450945094915050565b6001600160a01b0384166000908152600d602052604081208190819081611de78989611928565b825490915087158015611e035750600481101580611e03575081155b15611e1b576000806003955095509550505050611db6565b6000600154600160a01b900460ff166002811115611e3b57611e3b612e55565b14611ff557611e4a898b612159565b94506000600e6000600a60008154611e6190612fbd565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611f995760028101805460ff19166001179055611f44848b8b86612410565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611fe7565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611db692505050565b81881061201557866120105761200d838a8a85612410565b95505b61202e565b612021838a8a856124f0565b61202b9086612f4d565b94505b600061203a8b8b611c11565b905060008a5b816120f8576120596001600160601b0382168c856126e7565b6000196001600160601b038216016120745760019150612040565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa1580156120c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e99190613073565b50949550612040945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050509450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b03861684529091528120548015612409576000818152600e60205260409020600281015460ff16156123bc5760006121b38587611928565b905060008183600101546121c79190612f3a565b6001600160a01b0387166000908152600d6020526040902060018101549196508692509082106121f957806001015495505b8581600101600082825461220d9190612f3a565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036123b85780545b80156123b6576001600160601b03891682612282600184612f3a565b8154811061229257612292612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123a457815482906122ce90600190612f3a565b815481106122de576122de612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123129084612f3a565b8154811061232257612322612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508160000180548061236e5761236e6130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123b6565b806123ae8161305c565b915050612266565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561242a57600061243e565b8560010154866002015461243e9190612f3a565b905061244a8184612f4d565b84101561245857600061246d565b806124638486612f3a565b61246d9190612f3a565b9150826000036124b2578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124c457836124df565b838387600101546124d59190612f3a565b6124df9190612f4d565b866001018190555050949350505050565b60028401546000906125028484612f3a565b61250c9190612f4d565b856001015410612527576125208383612f3a565b905061254d565b846002015485600101541061254d578460020154856001015461254a9190612f3a565b90505b826000036126aa5784545b80156126a8576001600160601b03851686612574600184612f3a565b8154811061258457612584612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361269657855486906125c090600190612f3a565b815481106125d0576125d0612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906126049084612f3a565b8154811061261457612614612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555085600001805480612660576126606130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556126a8565b806126a08161305c565b915050612558565b505b81856001015410156126bc57826126d7565b828286600101546126cd9190612f3a565b6126d79190612f4d565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128b45783156128af57600182015460000361280257506002810180546001808201835560009283526020909220810185905590811480159061276157508154612755600183612f3a565b61275f9190613002565b155b156127fd57815460009061277590836130fe565b6000818152600485016020526040812054919250612794846001612f4d565b9050846002018560020184815481106127af576127af612fd6565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b61287d565b60018083018054909161281491612f3a565b8154811061282457612824612fd6565b9060005260206000200154905081600101805480612844576128446130e8565b600190038181906000526020600020016000905590558382600201828154811061287057612870612fd6565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556128af8582600187612a3b565b612a34565b836000036129525760008260020182815481106128d3576128d3612fd6565b9060005260206000200154905060008360020183815481106128f7576128f7612fd6565b600091825260208083209091019290925560018086018054918201815582528282200184905585815260038501825260408082208290558482526004860190925290812081905561294c908790849084612a3b565b50612a34565b81600201818154811061296757612967612fd6565b90600052602060002001548414612a345760008483600201838154811061299057612990612fd6565b9060005260206000200154111590506000816129d657858460020184815481106129bc576129bc612fd6565b90600052602060002001546129d19190612f3a565b612a01565b8360020183815481106129eb576129eb612fd6565b906000526020600020015486612a019190612f3a565b905085846002018481548110612a1957612a19612fd6565b600091825260209091200155612a3187848484612a3b565b50505b5050505050565b6000848152600c60205260409020835b8015612af0578154612a5e600183612f3a565b612a6891906130fe565b905083612a9f5782826002018281548110612a8557612a85612fd6565b9060005260206000200154612a9a9190612f3a565b612aca565b82826002018281548110612ab557612ab5612fd6565b9060005260206000200154612aca9190612f4d565b826002018281548110612adf57612adf612fd6565b600091825260209091200155612a4b565b505050505050565b600060208284031215612b0a57600080fd5b5035919050565b6001600160a01b038116811461036b57600080fd5b60008060408385031215612b3957600080fd5b8235612b4481612b11565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612b7957600080fd5b813567ffffffffffffffff80821115612b9457612b94612b52565b604051601f8301601f19908116603f01168101908282118183101715612bbc57612bbc612b52565b81604052838152866020858801011115612bd557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c0857600080fd5b82359150602083013567ffffffffffffffff811115612c2657600080fd5b612c3285828601612b68565b9150509250929050565b600080600080600080600080610100898b031215612c5957600080fd5b8835612c6481612b11565b97506020890135612c7481612b11565b965060408901359550606089013594506080890135612c9281612b11565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612cc957600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612cf357600080fd5b8235612cfe81612b11565b9150602083013567ffffffffffffffff811115612c2657600080fd5b600060208284031215612d2c57600080fd5b813561137d81612b11565b6020808252825182820181905260009190848201906040850190845b81811015612d785783516001600160601b031683529284019291840191600101612d53565b50909695505050505050565b60008060408385031215612d9757600080fd5b50508035926020909101359150565b6001600160601b038116811461036b57600080fd5b60008060408385031215612dce57600080fd5b8235612dd981612b11565b91506020830135612de981612da6565b809150509250929050565b801515811461036b57600080fd5b60008060008060808587031215612e1857600080fd5b8435612e2381612b11565b93506020850135612e3381612da6565b9250604085013591506060850135612e4a81612df4565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612e8957612e89612e55565b826040830152949350505050565b6020810160038310612eab57612eab612e55565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182957611829612f24565b8082018082111561182957611829612f24565b600060208284031215612f7257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b600060018201612fcf57612fcf612f24565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261301157613011612fec565b500690565b808202811582820484141761182957611829612f24565b6000825160005b8181101561304e5760208186018101518583015201613034565b506000920191825250919050565b60008161306b5761306b612f24565b506000190190565b600080600080600080600060e0888a03121561308e57600080fd5b875161309981612da6565b60208901519097506130aa81612df4565b8096505060408801519450606088015193506080880151925060a0880151915060c08801516130d881612df4565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b60008261310d5761310d612fec565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ca9ebf934573cb6e3d68c3b324f84f8a1c4a85e6662f664de2b642bff6efbc7264736f6c63430008120033", - "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 - }, - "storageLayout": { - "storage": [ - { - "astId": 3793, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "governor", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 3796, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "core", - "offset": 0, - "slot": "1", - "type": "t_contract(KlerosCore)158" - }, - { - "astId": 3799, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "phase", - "offset": 20, - "slot": "1", - "type": "t_enum(Phase)6238" - }, - { - "astId": 3801, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "minStakingTime", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 3803, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "maxDrawingTime", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 3805, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "lastPhaseChange", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 3807, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "randomNumberRequestBlock", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 3809, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "disputesWithoutJurors", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 3812, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "rng", - "offset": 0, - "slot": "7", - "type": "t_contract(RNG)6953" - }, - { - "astId": 3814, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "randomNumber", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 3816, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "rngLookahead", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 3818, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "delayedStakeWriteIndex", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 3820, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "delayedStakeReadIndex", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 3825, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "sortitionSumTrees", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)3774_storage)" - }, - { - "astId": 3830, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "jurors", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)3791_storage)" - }, - { - "astId": 3835, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "delayedStakes", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)3783_storage)" - }, - { - "astId": 3841, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "latestDelayedStakeIndex", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_mapping(t_uint96,t_uint256))" - }, - { - "astId": 5742, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "maxStakePerJuror", - "offset": 0, - "slot": "16", - "type": "t_uint256" - }, - { - "astId": 5744, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "maxTotalStaked", - "offset": 0, - "slot": "17", - "type": "t_uint256" - }, - { - "astId": 5746, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "totalStaked", - "offset": 0, - "slot": "18", - "type": "t_uint256" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)dyn_storage": { - "base": "t_uint256", - "encoding": "dynamic_array", - "label": "uint256[]", - "numberOfBytes": "32" - }, - "t_array(t_uint96)dyn_storage": { - "base": "t_uint96", - "encoding": "dynamic_array", - "label": "uint96[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(KlerosCore)158": { - "encoding": "inplace", - "label": "contract KlerosCore", - "numberOfBytes": "20" - }, - "t_contract(RNG)6953": { - "encoding": "inplace", - "label": "contract RNG", - "numberOfBytes": "20" - }, - "t_enum(Phase)6238": { - "encoding": "inplace", - "label": "enum ISortitionModule.Phase", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_mapping(t_uint96,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint96 => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint96,t_uint256)" - }, - "t_mapping(t_address,t_struct(Juror)3791_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SortitionModuleBase.Juror)", - "numberOfBytes": "32", - "value": "t_struct(Juror)3791_storage" - }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)3774_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", - "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)3774_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_bytes32)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_mapping(t_uint256,t_struct(DelayedStake)3783_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", - "numberOfBytes": "32", - "value": "t_struct(DelayedStake)3783_storage" - }, - "t_mapping(t_uint96,t_uint256)": { - "encoding": "mapping", - "key": "t_uint96", - "label": "mapping(uint96 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(DelayedStake)3783_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.DelayedStake", - "members": [ - { - "astId": 3776, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "account", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 3778, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "courtID", - "offset": 20, - "slot": "0", - "type": "t_uint96" - }, - { - "astId": 3780, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "stake", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 3782, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "alreadyTransferred", - "offset": 0, - "slot": "2", - "type": "t_bool" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Juror)3791_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.Juror", - "members": [ - { - "astId": 3786, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "courtIDs", - "offset": 0, - "slot": "0", - "type": "t_array(t_uint96)dyn_storage" - }, - { - "astId": 3788, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "stakedPnk", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 3790, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "lockedPnk", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" - }, - "t_struct(SortitionSumTree)3774_storage": { - "encoding": "inplace", - "label": "struct SortitionModuleBase.SortitionSumTree", - "members": [ - { - "astId": 3759, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "K", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 3762, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "stack", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 3765, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "nodes", - "offset": 0, - "slot": "2", - "type": "t_array(t_uint256)dyn_storage" - }, - { - "astId": 3769, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "IDsToNodeIndexes", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_bytes32,t_uint256)" - }, - { - "astId": 3773, - "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", - "label": "nodeIndexesToIDs", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_uint256,t_bytes32)" - } - ], - "numberOfBytes": "160" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint96": { - "encoding": "inplace", - "label": "uint96", - "numberOfBytes": "12" - } - } - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Proxy.json deleted file mode 100644 index 69a238790..000000000 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleNeo_Proxy.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "address": "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x17e9da82087a7337876173d5d1d5567253299c1225a23270cfcbd5d8a2c5b288", - "receipt": { - "to": null, - "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "transactionIndex": 1, - "gasUsed": "441279", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000400000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbb3cd01584873e92a524a9f825ae4f5b910ac8b27c46dd6f395a3124f982ac4d", - "transactionHash": "0x17e9da82087a7337876173d5d1d5567253299c1225a23270cfcbd5d8a2c5b288", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 21125139, - "transactionHash": "0x17e9da82087a7337876173d5d1d5567253299c1225a23270cfcbd5d8a2c5b288", - "address": "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - "topics": [ - "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xbb3cd01584873e92a524a9f825ae4f5b910ac8b27c46dd6f395a3124f982ac4d" - } - ], - "blockNumber": 21125139, - "cumulativeGasUsed": "441279", - "status": 1, - "byzantium": true - }, - "args": [ - "0x109E569f39945ea0843cF82E4E44553089AB779D", - "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000026bf077037550e437605f07e25efcad510715c3a00000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf4836000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" - ], - "numDeployments": 1, - "solcInputHash": "db363a789eea4155c2105a5d4adf4ddb", - "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", - "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 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json index 3af7793d6..7599e5834 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x45129beB9B84BFb07bA885085C1D60437494a93f", + "address": "0xB37919A50d3BddA9982e3c84aA47e501c454364B", "abi": [ { "inputs": [], @@ -968,38 +968,38 @@ "type": "function" } ], - "transactionHash": "0x02dc03ccae821281050d53d9a7d60fddbf1a070288a3dbfb825b20b8d5edab5f", + "transactionHash": "0x8127c8062385bc95cd917dccd9aa2e05afc20f6a479ced770280465a2bfc5b75", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x45129beB9B84BFb07bA885085C1D60437494a93f", - "transactionIndex": 1, + "contractAddress": "0xB37919A50d3BddA9982e3c84aA47e501c454364B", + "transactionIndex": 4, "gasUsed": "2793212", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe4d5d8ceff454042479c8b8d08785b87738847981daad660159d0289d8c76f63", - "transactionHash": "0x02dc03ccae821281050d53d9a7d60fddbf1a070288a3dbfb825b20b8d5edab5f", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x882a39bd11041a34fd4dc250cd57e3ab50418b1043b069784b428e258646a2ee", + "transactionHash": "0x8127c8062385bc95cd917dccd9aa2e05afc20f6a479ced770280465a2bfc5b75", "logs": [ { - "transactionIndex": 1, - "blockNumber": 139232413, - "transactionHash": "0x02dc03ccae821281050d53d9a7d60fddbf1a070288a3dbfb825b20b8d5edab5f", - "address": "0x45129beB9B84BFb07bA885085C1D60437494a93f", + "transactionIndex": 4, + "blockNumber": 141215205, + "transactionHash": "0x8127c8062385bc95cd917dccd9aa2e05afc20f6a479ced770280465a2bfc5b75", + "address": "0xB37919A50d3BddA9982e3c84aA47e501c454364B", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0xe4d5d8ceff454042479c8b8d08785b87738847981daad660159d0289d8c76f63" + "logIndex": 2, + "blockHash": "0x882a39bd11041a34fd4dc250cd57e3ab50418b1043b069784b428e258646a2ee" } ], - "blockNumber": 139232413, - "cumulativeGasUsed": "2793212", + "blockNumber": 141215205, + "cumulativeGasUsed": "2988163", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 2, - "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "numDeployments": 1, + "solcInputHash": "c66a072bc17d18807b6e81f338ff0fab", "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\":\"StakeDelayedAlreadyTransferredDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferredWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedNotTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountAllCourts\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"isJurorStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidImplementation(address)\":[{\"details\":\"The `implementation` is not UUPS-compliant\"}],\"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.\"},\"StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens withdrawn.\",\"_courtID\":\"The ID of the court.\"}},\"StakeDelayedNotTransferred(address,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_courtID\":\"The ID of the court.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"details\":\"Emitted when the `implementation` has been successfully upgraded.\",\"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.\"}},\"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\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"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)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_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.\"}}},\"stateVariables\":{\"version\":{\"details\":\"Returns the version of the implementation.\",\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModule\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}]},\"events\":{\"StakeDelayedAlreadyTransferredDeposited(address,uint256,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are already deposited.\"},\"StakeDelayedAlreadyTransferredWithdrawn(address,uint96,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are already withdrawn.\"},\"StakeDelayedNotTransferred(address,uint256,uint256)\":{\"notice\":\"Emitted when a juror's stake is delayed and tokens are not transferred yet.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/SortitionModule.sol\":\"SortitionModule\"},\"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\\npragma solidity 0.8.24;\\n\\nimport {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from \\\"./KlerosCoreBase.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 {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 __KlerosCoreBase_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 function initialize3() external reinitializer(3) {\\n // NOP\\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\":\"0x697705afc3f93aafded177968d141bfe919b74820f878b97a9d7b590577bf1b0\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../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, Initializable, UUPSProxiable {\\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 uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event 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 __KlerosCoreBase_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 onlyInitializing {\\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 uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev 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 _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n 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 if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\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 MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\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 error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xa96404e3fe4eb072d50b36dca51f8073f992fa25ae59307a1f20f2d5c6855dea\",\"license\":\"MIT\"},\"src/arbitration/SortitionModule.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 {SortitionModuleBase, KlerosCore, RNG} from \\\"./SortitionModuleBase.sol\\\";\\n\\n/// @title SortitionModule\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModule is SortitionModuleBase {\\n string public constant override version = \\\"0.8.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\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 function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) external reinitializer(1) {\\n __SortitionModuleBase_initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n }\\n\\n function initialize3() external reinitializer(3) {\\n // NOP\\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 virtual override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x895d41c99597957e112739427d8bed728f2ebf2f6a69bc913c037d654d171c40\",\"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} from \\\"./KlerosCore.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {RNG} from \\\"../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, Initializable, UUPSProxiable {\\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 /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are not transferred yet.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayedNotTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are already deposited.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n event StakeDelayedAlreadyTransferredDeposited(address indexed _address, uint256 _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is delayed and tokens are already withdrawn.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens withdrawn.\\n event StakeDelayedAlreadyTransferredWithdrawn(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function __SortitionModuleBase_initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal onlyInitializing {\\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 governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\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 // Nullify the index so the delayed stake won't get deleted before its own execution.\\n delete latestDelayedStakeIndex[delayedStake.account][delayedStake.courtID];\\n core.setStakeBySortitionModule(\\n delayedStake.account,\\n delayedStake.courtID,\\n delayedStake.stake,\\n delayedStake.alreadyTransferred\\n );\\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 (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n pnkWithdrawal = _deleteDelayedStake(_courtID, _account);\\n if (phase != Phase.staking) {\\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 StakeDelayedAlreadyTransferredDeposited(_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, juror.stakedPnk);\\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\":\"0xc5ebae59558c74b41b8a45d4705115cbe9fac373e1828d0589b6cc71ffd9011c\",\"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\\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 /// @param _nbVotes Maximal number of votes this dispute can get. DEPRECATED as we don't need to pass it now. KC handles the count.\\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\":\"0xc36f008d867157da6317ba4c685e791033b18074c27bb35f691bf3eebe65deca\",\"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. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\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 CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"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\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @dev Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @dev The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @dev The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @dev The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @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 /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @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 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 /// @dev Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa8bb02ed2b2fc165296226762299c2ee3328f2a0c6e90c6fe7029fa5b01d0b60\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161311762000103600039600081816112d90152818161130201526114fa01526131176000f3fe6080604052600436106102515760003560e01c8063823cfd7011610139578063d09f392d116100b6578063e4c0aaf41161007a578063e4c0aaf414610743578063e534710d14610763578063ec918b651461079b578063f216de4c146107b0578063f2f4eb26146107d0578063f6b4d82d146107f057600080fd5b8063d09f392d14610657578063d1c1df4814610677578063d605787b146106b7578063dca5f6b0146106d7578063dd5e5cb51461072357600080fd5b8063b5d69e99116100fd578063b5d69e99146105df578063b888adfa146105ff578063c057eca714610615578063c15726181461062b578063ccbac9f51461064157600080fd5b8063823cfd7014610522578063965af6c714610542578063a2473cc114610562578063a5861b9014610582578063b1c9fe6e146105b157600080fd5b80634dbbebbc116101d257806354fd4d501161019657806354fd4d501461042d57806356acb0501461046b5780635d2d7846146104815780636624192f146104a157806376fa9fc5146104ec5780637dc38f141461050c57600080fd5b80634dbbebbc146103985780634f1ef286146103b857806352d1902d146103cb578063543f8a36146103e057806354812d171461040d57600080fd5b806321e1625e1161021957806321e1625e146102fa57806321ea9b3f1461031a57806335975f4a14610338578063477a655c146103585780634c70a0d61461037857600080fd5b806303432744146102565780630b274f2e1461027f5780630c340a24146102965780630e083ec9146102ce5780631b92bbbe146102e4575b600080fd5b34801561026257600080fd5b5061026c60065481565b6040519081526020015b60405180910390f35b34801561028b57600080fd5b5061029461085a565b005b3480156102a257600080fd5b506000546102b6906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b3480156102da57600080fd5b5061026c600a5481565b3480156102f057600080fd5b5061026c60035481565b34801561030657600080fd5b50610294610315366004612a8c565b610c32565b34801561032657600080fd5b50610294610335366004612ab8565b50565b34801561034457600080fd5b50610294610353366004612ab8565b610cd5565b34801561036457600080fd5b50610294610373366004612b73565b610f01565b34801561038457600080fd5b506102b6610393366004612bb9565b610ff8565b3480156103a457600080fd5b506102946103b3366004612a8c565b6111dc565b6102946103c6366004612be5565b6112c5565b3480156103d757600080fd5b5061026c6114ed565b3480156103ec57600080fd5b506104006103fb366004612c1e565b61154b565b6040516102769190612c3b565b34801561041957600080fd5b50610294610428366004612c88565b6115e9565b34801561043957600080fd5b5061045e604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102769190612d13565b34801561047757600080fd5b5061026c600b5481565b34801561048d57600080fd5b5061029461049c366004612d46565b6116b9565b3480156104ad57600080fd5b506104dc6104bc366004612c1e565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610276565b3480156104f857600080fd5b5061026c610507366004612d46565b6116fc565b34801561051857600080fd5b5061026c60095481565b34801561052e57600080fd5b5061029461053d366004612ab8565b611757565b34801561054e57600080fd5b5061029461055d366004612a8c565b611786565b34801561056e57600080fd5b5061026c61057d366004612d7d565b611821565b34801561058e57600080fd5b506105a261059d366004612dc4565b61184b565b60405161027693929190612e2d565b3480156105bd57600080fd5b506001546105d290600160a01b900460ff1681565b6040516102769190612e59565b3480156105eb57600080fd5b506102946105fa366004612c1e565b611898565b34801561060b57600080fd5b5061026c60045481565b34801561062157600080fd5b5061026c60025481565b34801561063757600080fd5b5061026c60055481565b34801561064d57600080fd5b5061026c60085481565b34801561066357600080fd5b50610294610672366004612d46565b61197a565b34801561068357600080fd5b50610697610692366004612d7d565b6119b4565b604080519485526020850193909352918301526060820152608001610276565b3480156106c357600080fd5b506007546102b6906001600160a01b031681565b3480156106e357600080fd5b5061070e6106f2366004612c1e565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610276565b34801561072f57600080fd5b5061029461073e366004612ab8565b6119f3565b34801561074f57600080fd5b5061029461075e366004612c1e565b611a22565b34801561076f57600080fd5b5061026c61077e366004612d7d565b600f60209081526000928352604080842090915290825290205481565b3480156107a757600080fd5b50610294611a6e565b3480156107bc57600080fd5b506102946107cb366004612a8c565b611b1f565b3480156107dc57600080fd5b506001546102b6906001600160a01b031681565b3480156107fc57600080fd5b5061084a61080b366004612ab8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102769493929190612e73565b6000600154600160a01b900460ff16600281111561087a5761087a612e17565b036109ed5760025460045461088f9042612eba565b10156108f75760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109595760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108ee565b6007546009546001600160a01b0390911690637363ae1f9061097b9043612ecd565b6040518263ffffffff1660e01b815260040161099991815260200190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610be7565b60018054600160a01b900460ff166002811115610a0c57610a0c612e17565b03610b04576007546009546005546001600160a01b03909216916313cf905491610a3591612ecd565b6040518263ffffffff1660e01b8152600401610a5391815260200190565b6020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190612ee0565b6008819055600003610aea5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108ee565b600180546002919060ff60a01b1916600160a01b836109e3565b6002600154600160a01b900460ff166002811115610b2457610b24612e17565b03610be7576006541580610b465750600354600454610b439042612eba565b10155b610bd95760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108ee565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c2891600160a01b90910460ff1690612e59565b60405180910390a1565b6001546001600160a01b03163314610c5c5760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d602052604081206002018054839290610c87908490612ecd565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610cf557610cf5612e17565b14610d425760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108ee565b600b54600a541015610d965760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108ee565b6000600a54600183600b54610dab9190612ecd565b610db59190612eba565b11610dc05781610ddb565b600b54600a54610dd09190612eba565b610ddb906001612ecd565b9050600081600b54610ded9190612ecd565b600b549091505b81811015610ef9576000818152600e6020526040902080546001600160a01b031615610ef05780546001600160a01b038082166000908152600f602090815260408083206001600160601b03600160a01b9687900481168552925280832092909255600180548654918701546002880154945163fbb519e760e01b81529186169663fbb519e796610e999690851695919094041692909160ff90911690600401612e73565b600060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050506000838152600e602052604081208181556001810191909155600201805460ff19169055505b50600101610df4565b50600b555050565b6001546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016108ee90612ef9565b6000828152600c6020526040812090610f4383611b97565b825490915015610f8c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108ee565b60018111610fdc5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108ee565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff16600281111561101a5761101a612e17565b146110565760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108ee565b6000848152600c602052604081206002810180549192909161107a5761107a612f3d565b90600052602060002001546000036110965760009150506111d5565b6000816002016000815481106110ae576110ae612f3d565b906000526020600020015460085486866040516020016110e1939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111049190612f69565b905060005b6002830154835461111b908390612f7d565b611126906001612ecd565b10156111b55760015b835481116111af5760008183866000015461114a9190612f7d565b6111549190612ecd565b9050600085600201828154811061116d5761116d612f3d565b906000526020600020015490508085106111925761118b8186612eba565b945061119a565b5091506111af565b505080806111a790612f94565b91505061112f565b50611109565b60008181526004840160205260409020546111cf90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146112065760405162461bcd60e51b81526004016108ee90612fad565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff16600281111561124557611245612e17565b036112c1576007546009546001600160a01b0390911690637363ae1f9061126c9043612ecd565b6040518263ffffffff1660e01b815260040161128a91815260200190565b600060405180830381600087803b1580156112a457600080fd5b505af11580156112b8573d6000803e3d6000fd5b50504360055550505b5050565b6112ce82611bdd565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061134c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113406000805160206130c28339815191525490565b6001600160a01b031614155b1561136a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c4575060408051601f3d908101601f191682019092526113c191810190612ee0565b60015b6113ec57604051630c76093760e01b81526001600160a01b03831660048201526024016108ee565b6000805160206130c2833981519152811461141d57604051632a87526960e21b8152600481018290526024016108ee565b6000805160206130c28339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156114e8576000836001600160a01b0316836040516114849190612fef565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114e6576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115385760405163703e46dd60e11b815260040160405180910390fd5b506000805160206130c283398151915290565b6001600160a01b0381166000908152600d60209081526040918290208054835181840281018401909452808452606093928301828280156115dd57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161159a5790505b50505050509050919050565b600160006115f5611c07565b8054909150600160401b900460ff168061161c575080546001600160401b03808416911610155b156116395760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611668888888888888611c2b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116e35760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f38361300b565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361172c57600092505050611751565b81600201818154811061174157611741612f3d565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117815760405162461bcd60e51b81526004016108ee90612fad565b600255565b6001546001600160a01b031633146117b05760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040812060020180548392906117db908490612eba565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610cc9565b60008061182e8484611c8b565b90506118436001600160601b038416826116fc565b949350505050565b600154600090819081906001600160a01b0316331461187c5760405162461bcd60e51b81526004016108ee90612ef9565b61188887878787611cd3565b9199909850909650945050505050565b6001546001600160a01b031633146118c25760405162461bcd60e51b81526004016108ee90612ef9565b60006118cd8261154b565b80519091505b80156114e857600180546001600160a01b03169063fbb519e790859085906118fb9086612eba565b8151811061190b5761190b612f3d565b60200260200101516000806040518563ffffffff1660e01b81526004016119359493929190612e73565b600060405180830381600087803b15801561194f57600080fd5b505af1158015611963573d6000803e3d6000fd5b5050505080806119729061300b565b9150506118d3565b6001546001600160a01b031633146119a45760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f383612f94565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119e68787611821565b9054949793965094505050565b6000546001600160a01b03163314611a1d5760405162461bcd60e51b81526004016108ee90612fad565b600355565b6000546001600160a01b03163314611a4c5760405162461bcd60e51b81526004016108ee90612fad565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036000611a7a611c07565b8054909150600160401b900460ff1680611aa1575080546001600160401b03808416911610155b15611abe5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612eba565b909155506114e89050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b031633146103355760405162461bcd60e51b81526004016108ee90612fad565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b611c33612097565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b6014811015611cae578481600c011a81830153600101611c93565b5060145b6020811015611cca5783811a81830153600101611cb2565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611cfa8989611821565b825490915081158015611d0e575060048110155b15611d2657600080600395509550955050505061208d565b81158015611d32575087155b15611d4a57600080600895509550955050505061208d565b611d54898b6120be565b94506000600154600160a01b900460ff166002811115611d7657611d76612e17565b14611f24576000600e6000600a60008154611d9090612f94565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611ec85760028101805460ff19166001179055611e73848b8b86612375565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f040c97ed4ca4c864eb1463d1115e1ff278ce453e2e100ed2f5d45ab06f3d579d910160405180910390a2611f16565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b506000935061208d92505050565b818810611f445786611f3f57611f3c838a8a85612375565b95505b611f5d565b611f50838a8a85612455565b611f5a9086612ecd565b94505b6000611f698b8b611c8b565b905060008a5b8161202757611f886001600160601b0382168c8561264c565b6000196001600160601b03821601611fa35760019150611f6f565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120189190613022565b50949550611f6f945050505050565b6001860154604080516001600160601b038f168152602081018e9052908101919091526001600160a01b038e16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2506000955050505050505b9450945094915050565b61209f6129a0565b6120bc57604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561236e576000818152600e60205260409020600281015460ff16156123215760006121188587611821565b9050600081836001015461212c9190612eba565b6001600160a01b0387166000908152600d60205260409020600181015491965086925090821061215e57806001015495505b858160010160008282546121729190612eba565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a38260000361231d5780545b801561231b576001600160601b038916826121e7600184612eba565b815481106121f7576121f7612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603612309578154829061223390600190612eba565b8154811061224357612243612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122779084612eba565b8154811061228757612287612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122d3576122d3613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561231b565b806123138161300b565b9150506121cb565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561238f5760006123a3565b856001015486600201546123a39190612eba565b90506123af8184612ecd565b8410156123bd5760006123d2565b806123c88486612eba565b6123d29190612eba565b915082600003612417578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124295783612444565b8383876001015461243a9190612eba565b6124449190612ecd565b866001018190555050949350505050565b60028401546000906124678484612eba565b6124719190612ecd565b85600101541061248c576124858383612eba565b90506124b2565b84600201548560010154106124b257846002015485600101546124af9190612eba565b90505b8260000361260f5784545b801561260d576001600160601b038516866124d9600184612eba565b815481106124e9576124e9612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036125fb578554869061252590600190612eba565b8154811061253557612535612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125699084612eba565b8154811061257957612579612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806125c5576125c5613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561260d565b806126058161300b565b9150506124bd565b505b8185600101541015612621578261263c565b828286600101546126329190612eba565b61263c9190612ecd565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128195783156128145760018201546000036127675750600281018054600180820183556000928352602090922081018590559081148015906126c6575081546126ba600183612eba565b6126c49190612f69565b155b156127625781546000906126da90836130ad565b60008181526004850160205260408120549192506126f9846001612ecd565b90508460020185600201848154811061271457612714612f3d565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6127e2565b60018083018054909161277991612eba565b8154811061278957612789612f3d565b90600052602060002001549050816001018054806127a9576127a9613097565b60019003818190600052602060002001600090559055838260020182815481106127d5576127d5612f3d565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561281485826001876129ba565b612999565b836000036128b757600082600201828154811061283857612838612f3d565b90600052602060002001549050600083600201838154811061285c5761285c612f3d565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556128b19087908490846129ba565b50612999565b8160020181815481106128cc576128cc612f3d565b90600052602060002001548414612999576000848360020183815481106128f5576128f5612f3d565b90600052602060002001541115905060008161293b578584600201848154811061292157612921612f3d565b90600052602060002001546129369190612eba565b612966565b83600201838154811061295057612950612f3d565b9060005260206000200154866129669190612eba565b90508584600201848154811061297e5761297e612f3d565b600091825260209091200155612996878484846129ba565b50505b5050505050565b60006129aa611c07565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612a6f5781546129dd600183612eba565b6129e791906130ad565b905083612a1e5782826002018281548110612a0457612a04612f3d565b9060005260206000200154612a199190612eba565b612a49565b82826002018281548110612a3457612a34612f3d565b9060005260206000200154612a499190612ecd565b826002018281548110612a5e57612a5e612f3d565b6000918252602090912001556129ca565b505050505050565b6001600160a01b038116811461033557600080fd5b60008060408385031215612a9f57600080fd5b8235612aaa81612a77565b946020939093013593505050565b600060208284031215612aca57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612af857600080fd5b81356001600160401b0380821115612b1257612b12612ad1565b604051601f8301601f19908116603f01168101908282118183101715612b3a57612b3a612ad1565b81604052838152866020858801011115612b5357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612b8657600080fd5b8235915060208301356001600160401b03811115612ba357600080fd5b612baf85828601612ae7565b9150509250929050565b600080600060608486031215612bce57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612bf857600080fd5b8235612c0381612a77565b915060208301356001600160401b03811115612ba357600080fd5b600060208284031215612c3057600080fd5b81356111d581612a77565b6020808252825182820181905260009190848201906040850190845b81811015612c7c5783516001600160601b031683529284019291840191600101612c57565b50909695505050505050565b60008060008060008060c08789031215612ca157600080fd5b8635612cac81612a77565b95506020870135612cbc81612a77565b945060408701359350606087013592506080870135612cda81612a77565b8092505060a087013590509295509295509295565b60005b83811015612d0a578181015183820152602001612cf2565b50506000910152565b6020815260008251806020840152612d32816040850160208701612cef565b601f01601f19169190910160400192915050565b60008060408385031215612d5957600080fd5b50508035926020909101359150565b6001600160601b038116811461033557600080fd5b60008060408385031215612d9057600080fd5b8235612d9b81612a77565b91506020830135612dab81612d68565b809150509250929050565b801515811461033557600080fd5b60008060008060808587031215612dda57600080fd5b8435612de581612a77565b93506020850135612df581612d68565b9250604085013591506060850135612e0c81612db6565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160098310612e4b57612e4b612e17565b826040830152949350505050565b6020810160038310612e6d57612e6d612e17565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561175157611751612ea4565b8082018082111561175157611751612ea4565b600060208284031215612ef257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500690565b808202811582820484141761175157611751612ea4565b600060018201612fa657612fa6612ea4565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251613001818460208701612cef565b9190910192915050565b60008161301a5761301a612ea4565b506000190190565b600080600080600080600060e0888a03121561303d57600080fd5b875161304881612d68565b602089015190975061305981612db6565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161308781612db6565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b6000826130bc576130bc612f53565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205df31a379a3344b7416d4590b65130aa7a2e941ece6783087fde76eddcdc9dd064736f6c63430008180033", "deployedBytecode": "0x6080604052600436106102515760003560e01c8063823cfd7011610139578063d09f392d116100b6578063e4c0aaf41161007a578063e4c0aaf414610743578063e534710d14610763578063ec918b651461079b578063f216de4c146107b0578063f2f4eb26146107d0578063f6b4d82d146107f057600080fd5b8063d09f392d14610657578063d1c1df4814610677578063d605787b146106b7578063dca5f6b0146106d7578063dd5e5cb51461072357600080fd5b8063b5d69e99116100fd578063b5d69e99146105df578063b888adfa146105ff578063c057eca714610615578063c15726181461062b578063ccbac9f51461064157600080fd5b8063823cfd7014610522578063965af6c714610542578063a2473cc114610562578063a5861b9014610582578063b1c9fe6e146105b157600080fd5b80634dbbebbc116101d257806354fd4d501161019657806354fd4d501461042d57806356acb0501461046b5780635d2d7846146104815780636624192f146104a157806376fa9fc5146104ec5780637dc38f141461050c57600080fd5b80634dbbebbc146103985780634f1ef286146103b857806352d1902d146103cb578063543f8a36146103e057806354812d171461040d57600080fd5b806321e1625e1161021957806321e1625e146102fa57806321ea9b3f1461031a57806335975f4a14610338578063477a655c146103585780634c70a0d61461037857600080fd5b806303432744146102565780630b274f2e1461027f5780630c340a24146102965780630e083ec9146102ce5780631b92bbbe146102e4575b600080fd5b34801561026257600080fd5b5061026c60065481565b6040519081526020015b60405180910390f35b34801561028b57600080fd5b5061029461085a565b005b3480156102a257600080fd5b506000546102b6906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b3480156102da57600080fd5b5061026c600a5481565b3480156102f057600080fd5b5061026c60035481565b34801561030657600080fd5b50610294610315366004612a8c565b610c32565b34801561032657600080fd5b50610294610335366004612ab8565b50565b34801561034457600080fd5b50610294610353366004612ab8565b610cd5565b34801561036457600080fd5b50610294610373366004612b73565b610f01565b34801561038457600080fd5b506102b6610393366004612bb9565b610ff8565b3480156103a457600080fd5b506102946103b3366004612a8c565b6111dc565b6102946103c6366004612be5565b6112c5565b3480156103d757600080fd5b5061026c6114ed565b3480156103ec57600080fd5b506104006103fb366004612c1e565b61154b565b6040516102769190612c3b565b34801561041957600080fd5b50610294610428366004612c88565b6115e9565b34801561043957600080fd5b5061045e604051806040016040528060058152602001640302e382e360dc1b81525081565b6040516102769190612d13565b34801561047757600080fd5b5061026c600b5481565b34801561048d57600080fd5b5061029461049c366004612d46565b6116b9565b3480156104ad57600080fd5b506104dc6104bc366004612c1e565b6001600160a01b03166000908152600d6020526040902060010154151590565b6040519015158152602001610276565b3480156104f857600080fd5b5061026c610507366004612d46565b6116fc565b34801561051857600080fd5b5061026c60095481565b34801561052e57600080fd5b5061029461053d366004612ab8565b611757565b34801561054e57600080fd5b5061029461055d366004612a8c565b611786565b34801561056e57600080fd5b5061026c61057d366004612d7d565b611821565b34801561058e57600080fd5b506105a261059d366004612dc4565b61184b565b60405161027693929190612e2d565b3480156105bd57600080fd5b506001546105d290600160a01b900460ff1681565b6040516102769190612e59565b3480156105eb57600080fd5b506102946105fa366004612c1e565b611898565b34801561060b57600080fd5b5061026c60045481565b34801561062157600080fd5b5061026c60025481565b34801561063757600080fd5b5061026c60055481565b34801561064d57600080fd5b5061026c60085481565b34801561066357600080fd5b50610294610672366004612d46565b61197a565b34801561068357600080fd5b50610697610692366004612d7d565b6119b4565b604080519485526020850193909352918301526060820152608001610276565b3480156106c357600080fd5b506007546102b6906001600160a01b031681565b3480156106e357600080fd5b5061070e6106f2366004612c1e565b600d602052600090815260409020600181015460029091015482565b60408051928352602083019190915201610276565b34801561072f57600080fd5b5061029461073e366004612ab8565b6119f3565b34801561074f57600080fd5b5061029461075e366004612c1e565b611a22565b34801561076f57600080fd5b5061026c61077e366004612d7d565b600f60209081526000928352604080842090915290825290205481565b3480156107a757600080fd5b50610294611a6e565b3480156107bc57600080fd5b506102946107cb366004612a8c565b611b1f565b3480156107dc57600080fd5b506001546102b6906001600160a01b031681565b3480156107fc57600080fd5b5061084a61080b366004612ab8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b6040516102769493929190612e73565b6000600154600160a01b900460ff16600281111561087a5761087a612e17565b036109ed5760025460045461088f9042612eba565b10156108f75760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084015b60405180910390fd5b6000600654116109595760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108ee565b6007546009546001600160a01b0390911690637363ae1f9061097b9043612ecd565b6040518263ffffffff1660e01b815260040161099991815260200190565b600060405180830381600087803b1580156109b357600080fd5b505af11580156109c7573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610be7565b60018054600160a01b900460ff166002811115610a0c57610a0c612e17565b03610b04576007546009546005546001600160a01b03909216916313cf905491610a3591612ecd565b6040518263ffffffff1660e01b8152600401610a5391815260200190565b6020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190612ee0565b6008819055600003610aea5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108ee565b600180546002919060ff60a01b1916600160a01b836109e3565b6002600154600160a01b900460ff166002811115610b2457610b24612e17565b03610be7576006541580610b465750600354600454610b439042612eba565b10155b610bd95760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108ee565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c2891600160a01b90910460ff1690612e59565b60405180910390a1565b6001546001600160a01b03163314610c5c5760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d602052604081206002018054839290610c87908490612ecd565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610cf557610cf5612e17565b14610d425760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108ee565b600b54600a541015610d965760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108ee565b6000600a54600183600b54610dab9190612ecd565b610db59190612eba565b11610dc05781610ddb565b600b54600a54610dd09190612eba565b610ddb906001612ecd565b9050600081600b54610ded9190612ecd565b600b549091505b81811015610ef9576000818152600e6020526040902080546001600160a01b031615610ef05780546001600160a01b038082166000908152600f602090815260408083206001600160601b03600160a01b9687900481168552925280832092909255600180548654918701546002880154945163fbb519e760e01b81529186169663fbb519e796610e999690851695919094041692909160ff90911690600401612e73565b600060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050506000838152600e602052604081208181556001810191909155600201805460ff19169055505b50600101610df4565b50600b555050565b6001546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016108ee90612ef9565b6000828152600c6020526040812090610f4383611b97565b825490915015610f8c5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108ee565b60018111610fdc5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108ee565b8155600201805460018101825560009182526020822001555050565b60006002600154600160a01b900460ff16600281111561101a5761101a612e17565b146110565760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108ee565b6000848152600c602052604081206002810180549192909161107a5761107a612f3d565b90600052602060002001546000036110965760009150506111d5565b6000816002016000815481106110ae576110ae612f3d565b906000526020600020015460085486866040516020016110e1939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6111049190612f69565b905060005b6002830154835461111b908390612f7d565b611126906001612ecd565b10156111b55760015b835481116111af5760008183866000015461114a9190612f7d565b6111549190612ecd565b9050600085600201828154811061116d5761116d612f3d565b906000526020600020015490508085106111925761118b8186612eba565b945061119a565b5091506111af565b505080806111a790612f94565b91505061112f565b50611109565b60008181526004840160205260409020546111cf90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146112065760405162461bcd60e51b81526004016108ee90612fad565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff16600281111561124557611245612e17565b036112c1576007546009546001600160a01b0390911690637363ae1f9061126c9043612ecd565b6040518263ffffffff1660e01b815260040161128a91815260200190565b600060405180830381600087803b1580156112a457600080fd5b505af11580156112b8573d6000803e3d6000fd5b50504360055550505b5050565b6112ce82611bdd565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061134c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113406000805160206130c28339815191525490565b6001600160a01b031614155b1561136a5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c4575060408051601f3d908101601f191682019092526113c191810190612ee0565b60015b6113ec57604051630c76093760e01b81526001600160a01b03831660048201526024016108ee565b6000805160206130c2833981519152811461141d57604051632a87526960e21b8152600481018290526024016108ee565b6000805160206130c28339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156114e8576000836001600160a01b0316836040516114849190612fef565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114e6576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115385760405163703e46dd60e11b815260040160405180910390fd5b506000805160206130c283398151915290565b6001600160a01b0381166000908152600d60209081526040918290208054835181840281018401909452808452606093928301828280156115dd57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b0104928301926001038202915080841161159a5790505b50505050509050919050565b600160006115f5611c07565b8054909150600160401b900460ff168061161c575080546001600160401b03808416911610155b156116395760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155611668888888888888611c2b565b805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050565b6001546001600160a01b031633146116e35760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f38361300b565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361172c57600092505050611751565b81600201818154811061174157611741612f3d565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146117815760405162461bcd60e51b81526004016108ee90612fad565b600255565b6001546001600160a01b031633146117b05760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040812060020180548392906117db908490612eba565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610cc9565b60008061182e8484611c8b565b90506118436001600160601b038416826116fc565b949350505050565b600154600090819081906001600160a01b0316331461187c5760405162461bcd60e51b81526004016108ee90612ef9565b61188887878787611cd3565b9199909850909650945050505050565b6001546001600160a01b031633146118c25760405162461bcd60e51b81526004016108ee90612ef9565b60006118cd8261154b565b80519091505b80156114e857600180546001600160a01b03169063fbb519e790859085906118fb9086612eba565b8151811061190b5761190b612f3d565b60200260200101516000806040518563ffffffff1660e01b81526004016119359493929190612e73565b600060405180830381600087803b15801561194f57600080fd5b505af1158015611963573d6000803e3d6000fd5b5050505080806119729061300b565b9150506118d3565b6001546001600160a01b031633146119a45760405162461bcd60e51b81526004016108ee90612ef9565b600680549060006116f383612f94565b6001600160a01b0382166000908152600d60205260408120600181015460028201549092909181906119e68787611821565b9054949793965094505050565b6000546001600160a01b03163314611a1d5760405162461bcd60e51b81526004016108ee90612fad565b600355565b6000546001600160a01b03163314611a4c5760405162461bcd60e51b81526004016108ee90612fad565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036000611a7a611c07565b8054909150600160401b900460ff1680611aa1575080546001600160401b03808416911610155b15611abe5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b1760ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108ee90612ef9565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612eba565b909155506114e89050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b031633146103355760405162461bcd60e51b81526004016108ee90612fad565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e90565b611c33612097565b600080546001600160a01b03199081166001600160a01b039889161790915560018054821696881696909617865560029490945560039290925542600455600780549093169416939093179055600991909155600b55565b600060405160005b6014811015611cae578481600c011a81830153600101611c93565b5060145b6020811015611cca5783811a81830153600101611cb2565b50519392505050565b6001600160a01b0384166000908152600d602052604081208190819081611cfa8989611821565b825490915081158015611d0e575060048110155b15611d2657600080600395509550955050505061208d565b81158015611d32575087155b15611d4a57600080600895509550955050505061208d565b611d54898b6120be565b94506000600154600160a01b900460ff166002811115611d7657611d76612e17565b14611f24576000600e6000600a60008154611d9090612f94565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611ec85760028101805460ff19166001179055611e73848b8b86612375565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f040c97ed4ca4c864eb1463d1115e1ff278ce453e2e100ed2f5d45ab06f3d579d910160405180910390a2611f16565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b506000935061208d92505050565b818810611f445786611f3f57611f3c838a8a85612375565b95505b611f5d565b611f50838a8a85612455565b611f5a9086612ecd565b94505b6000611f698b8b611c8b565b905060008a5b8161202757611f886001600160601b0382168c8561264c565b6000196001600160601b03821601611fa35760019150611f6f565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120189190613022565b50949550611f6f945050505050565b6001860154604080516001600160601b038f168152602081018e9052908101919091526001600160a01b038e16907f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369060600160405180910390a2506000955050505050505b9450945094915050565b61209f6129a0565b6120bc57604051631afcd79f60e31b815260040160405180910390fd5b565b6001600160a01b0381166000908152600f602090815260408083206001600160601b0386168452909152812054801561236e576000818152600e60205260409020600281015460ff16156123215760006121188587611821565b9050600081836001015461212c9190612eba565b6001600160a01b0387166000908152600d60205260409020600181015491965086925090821061215e57806001015495505b858160010160008282546121729190612eba565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a38260000361231d5780545b801561231b576001600160601b038916826121e7600184612eba565b815481106121f7576121f7612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603612309578154829061223390600190612eba565b8154811061224357612243612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906122779084612eba565b8154811061228757612287612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550816000018054806122d3576122d3613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561231b565b806123138161300b565b9150506121cb565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561238f5760006123a3565b856001015486600201546123a39190612eba565b90506123af8184612ecd565b8410156123bd5760006123d2565b806123c88486612eba565b6123d29190612eba565b915082600003612417578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124295783612444565b8383876001015461243a9190612eba565b6124449190612ecd565b866001018190555050949350505050565b60028401546000906124678484612eba565b6124719190612ecd565b85600101541061248c576124858383612eba565b90506124b2565b84600201548560010154106124b257846002015485600101546124af9190612eba565b90505b8260000361260f5784545b801561260d576001600160601b038516866124d9600184612eba565b815481106124e9576124e9612f3d565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036125fb578554869061252590600190612eba565b8154811061253557612535612f3d565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125699084612eba565b8154811061257957612579612f3d565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b03160217905550856000018054806125c5576125c5613097565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561260d565b806126058161300b565b9150506124bd565b505b8185600101541015612621578261263c565b828286600101546126329190612eba565b61263c9190612ecd565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128195783156128145760018201546000036127675750600281018054600180820183556000928352602090922081018590559081148015906126c6575081546126ba600183612eba565b6126c49190612f69565b155b156127625781546000906126da90836130ad565b60008181526004850160205260408120549192506126f9846001612ecd565b90508460020185600201848154811061271457612714612f3d565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b6127e2565b60018083018054909161277991612eba565b8154811061278957612789612f3d565b90600052602060002001549050816001018054806127a9576127a9613097565b60019003818190600052602060002001600090559055838260020182815481106127d5576127d5612f3d565b6000918252602090912001555b6000838152600383016020908152604080832084905583835260048501909152902083905561281485826001876129ba565b612999565b836000036128b757600082600201828154811061283857612838612f3d565b90600052602060002001549050600083600201838154811061285c5761285c612f3d565b60009182526020808320909101929092556001808601805491820181558252828220018490558581526003850182526040808220829055848252600486019092529081208190556128b19087908490846129ba565b50612999565b8160020181815481106128cc576128cc612f3d565b90600052602060002001548414612999576000848360020183815481106128f5576128f5612f3d565b90600052602060002001541115905060008161293b578584600201848154811061292157612921612f3d565b90600052602060002001546129369190612eba565b612966565b83600201838154811061295057612950612f3d565b9060005260206000200154866129669190612eba565b90508584600201848154811061297e5761297e612f3d565b600091825260209091200155612996878484846129ba565b50505b5050505050565b60006129aa611c07565b54600160401b900460ff16919050565b6000848152600c60205260409020835b8015612a6f5781546129dd600183612eba565b6129e791906130ad565b905083612a1e5782826002018281548110612a0457612a04612f3d565b9060005260206000200154612a199190612eba565b612a49565b82826002018281548110612a3457612a34612f3d565b9060005260206000200154612a499190612ecd565b826002018281548110612a5e57612a5e612f3d565b6000918252602090912001556129ca565b505050505050565b6001600160a01b038116811461033557600080fd5b60008060408385031215612a9f57600080fd5b8235612aaa81612a77565b946020939093013593505050565b600060208284031215612aca57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612af857600080fd5b81356001600160401b0380821115612b1257612b12612ad1565b604051601f8301601f19908116603f01168101908282118183101715612b3a57612b3a612ad1565b81604052838152866020858801011115612b5357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612b8657600080fd5b8235915060208301356001600160401b03811115612ba357600080fd5b612baf85828601612ae7565b9150509250929050565b600080600060608486031215612bce57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612bf857600080fd5b8235612c0381612a77565b915060208301356001600160401b03811115612ba357600080fd5b600060208284031215612c3057600080fd5b81356111d581612a77565b6020808252825182820181905260009190848201906040850190845b81811015612c7c5783516001600160601b031683529284019291840191600101612c57565b50909695505050505050565b60008060008060008060c08789031215612ca157600080fd5b8635612cac81612a77565b95506020870135612cbc81612a77565b945060408701359350606087013592506080870135612cda81612a77565b8092505060a087013590509295509295509295565b60005b83811015612d0a578181015183820152602001612cf2565b50506000910152565b6020815260008251806020840152612d32816040850160208701612cef565b601f01601f19169190910160400192915050565b60008060408385031215612d5957600080fd5b50508035926020909101359150565b6001600160601b038116811461033557600080fd5b60008060408385031215612d9057600080fd5b8235612d9b81612a77565b91506020830135612dab81612d68565b809150509250929050565b801515811461033557600080fd5b60008060008060808587031215612dda57600080fd5b8435612de581612a77565b93506020850135612df581612d68565b9250604085013591506060850135612e0c81612db6565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160098310612e4b57612e4b612e17565b826040830152949350505050565b6020810160038310612e6d57612e6d612e17565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561175157611751612ea4565b8082018082111561175157611751612ea4565b600060208284031215612ef257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612f7857612f78612f53565b500690565b808202811582820484141761175157611751612ea4565b600060018201612fa657612fa6612ea4565b5060010190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b60008251613001818460208701612cef565b9190910192915050565b60008161301a5761301a612ea4565b506000190190565b600080600080600080600060e0888a03121561303d57600080fd5b875161304881612d68565b602089015190975061305981612db6565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161308781612db6565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b6000826130bc576130bc612f53565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205df31a379a3344b7416d4590b65130aa7a2e941ece6783087fde76eddcdc9dd064736f6c63430008180033", @@ -1272,7 +1272,7 @@ "label": "phase", "offset": 20, "slot": "1", - "type": "t_enum(Phase)23160" + "type": "t_enum(Phase)22883" }, { "astId": 13909, @@ -1320,7 +1320,7 @@ "label": "rng", "offset": 0, "slot": "7", - "type": "t_contract(RNG)35312" + "type": "t_contract(RNG)35035" }, { "astId": 13922, @@ -1420,12 +1420,12 @@ "label": "contract KlerosCore", "numberOfBytes": "20" }, - "t_contract(RNG)35312": { + "t_contract(RNG)35035": { "encoding": "inplace", "label": "contract RNG", "numberOfBytes": "20" }, - "t_enum(Phase)23160": { + "t_enum(Phase)22883": { "encoding": "inplace", "label": "enum ISortitionModule.Phase", "numberOfBytes": "1" diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json index 5805d01a9..9b850abd2 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "address": "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "transactionHash": "0xe52f21157b081710df5d51cc246b0f61bcb7043f6e63bb31bfc305e0bdaa2211", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", - "transactionIndex": 2, - "gasUsed": "4675242", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000800000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae", - "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "contractAddress": "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", + "transactionIndex": 1, + "gasUsed": "332725", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbfeb3d4bcb89b9c2f6be8118d259f1727c2a3315bf2929127c1650c7cf4e81ca", + "transactionHash": "0xe52f21157b081710df5d51cc246b0f61bcb7043f6e63bb31bfc305e0bdaa2211", "logs": [ { - "transactionIndex": 2, - "blockNumber": 3638850, - "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", - "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "transactionIndex": 1, + "blockNumber": 141215215, + "transactionHash": "0xe52f21157b081710df5d51cc246b0f61bcb7043f6e63bb31bfc305e0bdaa2211", + "address": "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae" + "blockHash": "0xbfeb3d4bcb89b9c2f6be8118d259f1727c2a3315bf2929127c1650c7cf4e81ca" } ], - "blockNumber": 3638850, - "cumulativeGasUsed": "5561170", + "blockNumber": 141215215, + "cumulativeGasUsed": "332725", "status": 1, "byzantium": true }, "args": [ - "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", - "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a54e7a16d7460e38a8f324ef46782fb520d58ce800000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf48360000000000000000000000000000000000000000000000000000000000000014" + "0xB37919A50d3BddA9982e3c84aA47e501c454364B", + "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000004838e31e0ea315232c431598110fe677caf2d6e600000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000002580000000000000000000000006c40d7f5d5be3492fe9ef70e4ecb2bd773c12af80000000000000000000000000000000000000000000000000000000000000014" ], "numDeployments": 1, - "solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a", - "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": "c66a072bc17d18807b6e81f338ff0fab", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", "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": { From f8654d23bd96254d0019e50ad4ce0de2f110dac1 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 16:17:01 +0100 Subject: [PATCH 13/17] chore: devnet and testnet subgraphs redeploy at v0.14.2 --- .../KlerosCore.json | 0 .../SortitionModule.json | 0 subgraph/core/subgraph.yaml | 26 +-- .../dispute-template-registry/subgraph.yaml | 4 +- subgraph/package.json | 6 +- yarn.lock | 179 ++++++++++++------ 6 files changed, 137 insertions(+), 78 deletions(-) rename subgraph/core/{temp-abis => abi-migrations}/KlerosCore.json (100%) rename subgraph/core/{temp-abis => abi-migrations}/SortitionModule.json (100%) diff --git a/subgraph/core/temp-abis/KlerosCore.json b/subgraph/core/abi-migrations/KlerosCore.json similarity index 100% rename from subgraph/core/temp-abis/KlerosCore.json rename to subgraph/core/abi-migrations/KlerosCore.json diff --git a/subgraph/core/temp-abis/SortitionModule.json b/subgraph/core/abi-migrations/SortitionModule.json similarity index 100% rename from subgraph/core/temp-abis/SortitionModule.json rename to subgraph/core/abi-migrations/SortitionModule.json diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index 2c58f9fbd..d3aff9873 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -8,9 +8,9 @@ dataSources: name: KlerosCore network: arbitrum-sepolia source: - address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8" + address: "0x4838e31E0ea315232c431598110FE677cAF2D6E6" abi: KlerosCore - startBlock: 3638878 + startBlock: 141215236 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -33,7 +33,7 @@ dataSources: file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore # FIX: temporarily point to the abi with event addition. - file: ./temp-abis/KlerosCore.json + file: ./abi-migrations/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -68,9 +68,9 @@ dataSources: name: PolicyRegistry network: arbitrum-sepolia source: - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da" + address: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b" abi: PolicyRegistry - startBlock: 3084568 + startBlock: 141215158 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -88,9 +88,9 @@ dataSources: name: DisputeKitClassic network: arbitrum-sepolia source: - address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b" + address: "0x2246821E1313A93e2F8CdF7a3422d078f560b457" abi: DisputeKitClassic - startBlock: 3638835 + startBlock: 141215195 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -105,7 +105,7 @@ dataSources: file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore # FIX: temporarily point to abi with event addition - file: ./temp-abis/KlerosCore.json + file: ./abi-migrations/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation @@ -124,9 +124,9 @@ dataSources: name: EvidenceModule network: arbitrum-sepolia source: - address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09" + address: "0x990f44d19a5F46889801B31bf58e0536fBECf27C" abi: EvidenceModule - startBlock: 3638735 + startBlock: 141215177 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -145,9 +145,9 @@ dataSources: name: SortitionModule network: arbitrum-sepolia source: - address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C" + address: "0xb34651b65A40553C444c6F0D27286C80ec34fbfD" abi: SortitionModule - startBlock: 3638850 + startBlock: 141215215 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -157,7 +157,7 @@ dataSources: abis: - name: SortitionModule # FIX: temporarily point to abi with event addition - file: ./temp-abis/SortitionModule.json + file: ./abi-migrations/SortitionModule.json eventHandlers: - event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256) handler: handleStakeDelayedAlreadyTransferredDeposited diff --git a/subgraph/dispute-template-registry/subgraph.yaml b/subgraph/dispute-template-registry/subgraph.yaml index 749434674..1fdfc46b6 100644 --- a/subgraph/dispute-template-registry/subgraph.yaml +++ b/subgraph/dispute-template-registry/subgraph.yaml @@ -6,9 +6,9 @@ dataSources: name: DisputeTemplateRegistry network: arbitrum-sepolia source: - address: "0x596D3B09E684D62217682216e9b7a0De75933391" + address: "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a" abi: DisputeTemplateRegistry - startBlock: 3639191 + startBlock: 141215321 mapping: kind: ethereum/events apiVersion: 0.0.7 diff --git a/subgraph/package.json b/subgraph/package.json index 9741db307..095de43aa 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/kleros-v2-subgraph", - "version": "0.14.0", + "version": "0.14.2", "drtVersion": "0.11.0", "license": "MIT", "scripts": { @@ -72,10 +72,10 @@ "node": "20.18.3" }, "dependencies": { - "@graphprotocol/graph-ts": "^0.37.0" + "@graphprotocol/graph-ts": "^0.38.0" }, "devDependencies": { - "@graphprotocol/graph-cli": "^0.95.0", + "@graphprotocol/graph-cli": "^0.96.0", "@kleros/kleros-v2-eslint-config": "workspace:^", "@kleros/kleros-v2-prettier-config": "workspace:^", "eslint": "^9.15.0", diff --git a/yarn.lock b/yarn.lock index c3d3163dc..631f38963 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4038,48 +4038,48 @@ __metadata: languageName: node linkType: hard -"@graphprotocol/graph-cli@npm:^0.95.0": - version: 0.95.0 - resolution: "@graphprotocol/graph-cli@npm:0.95.0" +"@graphprotocol/graph-cli@npm:^0.96.0": + version: 0.96.0 + resolution: "@graphprotocol/graph-cli@npm:0.96.0" dependencies: "@float-capital/float-subgraph-uncrashable": "npm:0.0.0-internal-testing.5" - "@oclif/core": "npm:4.0.34" + "@oclif/core": "npm:4.2.6" "@oclif/plugin-autocomplete": "npm:^3.2.11" "@oclif/plugin-not-found": "npm:^3.2.29" "@oclif/plugin-warn-if-update-available": "npm:^3.1.24" "@pinax/graph-networks-registry": "npm:^0.6.5" "@whatwg-node/fetch": "npm:^0.10.1" assemblyscript: "npm:0.19.23" - chokidar: "npm:4.0.1" - debug: "npm:4.3.7" + chokidar: "npm:4.0.3" + debug: "npm:4.4.0" docker-compose: "npm:1.1.0" - fs-extra: "npm:11.2.0" - glob: "npm:11.0.0" + fs-extra: "npm:11.3.0" + glob: "npm:11.0.1" gluegun: "npm:5.2.0" - graphql: "npm:16.9.0" + graphql: "npm:16.10.0" immutable: "npm:5.0.3" jayson: "npm:4.1.3" js-yaml: "npm:4.1.0" kubo-rpc-client: "npm:^5.0.2" open: "npm:10.1.0" prettier: "npm:3.4.2" - semver: "npm:7.6.3" + semver: "npm:7.7.1" tmp-promise: "npm:3.0.3" - undici: "npm:7.2.3" + undici: "npm:7.3.0" web3-eth-abi: "npm:4.4.1" - yaml: "npm:2.6.1" + yaml: "npm:2.7.0" bin: graph: bin/run.js - checksum: 10/3f783563121b8de1e1db0b4302f62d8a4339d9786767b8bbf5a86b6cbc3627e20a40b433eb442b3fc89aa473b4bb246ee917aaccf22296e865a669889f7d0df9 + checksum: 10/f61c2f5a1eca4ef7377da9bb4acf2ac31af80ae1c262cde1721237d90dbce37ab0d5bffd227ee60a89507b1bfe4b43bf2848213abadf5f880d2109b892cb6d55 languageName: node linkType: hard -"@graphprotocol/graph-ts@npm:^0.37.0": - version: 0.37.0 - resolution: "@graphprotocol/graph-ts@npm:0.37.0" +"@graphprotocol/graph-ts@npm:^0.38.0": + version: 0.38.0 + resolution: "@graphprotocol/graph-ts@npm:0.38.0" dependencies: assemblyscript: "npm:0.27.31" - checksum: 10/2ae14a36ff256518234e185de8e76fda4c9621b4a70b68cc97d67d0a1d02a2bb6c5272a3f312177b19ae88cdf49a10ddc29a06fa37f4dbdf3b0e7c3dbeb37048 + checksum: 10/4f08c202b0f186a8912323c9eec5b52d5a6abd868ebc6208b6114f4a0eea6bba87110ea51c7634d30380ecdd13b0812d36944f5b5934f98bb009581a801b0f41 languageName: node linkType: hard @@ -5638,8 +5638,8 @@ __metadata: version: 0.0.0-use.local resolution: "@kleros/kleros-v2-subgraph@workspace:subgraph" dependencies: - "@graphprotocol/graph-cli": "npm:^0.95.0" - "@graphprotocol/graph-ts": "npm:^0.37.0" + "@graphprotocol/graph-cli": "npm:^0.96.0" + "@graphprotocol/graph-ts": "npm:^0.38.0" "@kleros/kleros-v2-eslint-config": "workspace:^" "@kleros/kleros-v2-prettier-config": "workspace:^" eslint: "npm:^9.15.0" @@ -7281,21 +7281,21 @@ __metadata: languageName: node linkType: hard -"@oclif/core@npm:4.0.34": - version: 4.0.34 - resolution: "@oclif/core@npm:4.0.34" +"@oclif/core@npm:4.2.6": + version: 4.2.6 + resolution: "@oclif/core@npm:4.2.6" dependencies: ansi-escapes: "npm:^4.3.2" - ansis: "npm:^3.3.2" + ansis: "npm:^3.10.0" clean-stack: "npm:^3.0.1" cli-spinners: "npm:^2.9.2" - debug: "npm:^4.3.7" + debug: "npm:^4.4.0" ejs: "npm:^3.1.10" get-package-type: "npm:^0.1.0" globby: "npm:^11.1.0" indent-string: "npm:^4.0.0" is-wsl: "npm:^2.2.0" - lilconfig: "npm:^3.1.2" + lilconfig: "npm:^3.1.3" minimatch: "npm:^9.0.5" semver: "npm:^7.6.3" string-width: "npm:^4.2.3" @@ -7303,7 +7303,7 @@ __metadata: widest-line: "npm:^3.1.0" wordwrap: "npm:^1.0.0" wrap-ansi: "npm:^7.0.0" - checksum: 10/a7c99dab7d31130d57b585c50d7257ffe1434371468e5c0fae0696308fc68b4588c740d4aa3d5f7d5270acf172915046c74197df4c699dafe5362e5ac9dcf9aa + checksum: 10/f9a76db5ab2d997cfa15161c691005c81f6308fd729f9d9102018946e2244aaa2a9eb99b3e63247ee7579d835477167fa685fec59210bab68be7d4e1382102a0 languageName: node linkType: hard @@ -11805,7 +11805,14 @@ __metadata: languageName: node linkType: hard -"ansis@npm:^3.3.2, ansis@npm:^3.5.2, ansis@npm:^3.8.1, ansis@npm:^3.9.0": +"ansis@npm:^3.10.0": + version: 3.17.0 + resolution: "ansis@npm:3.17.0" + checksum: 10/6fd6bc4d1187b894d9706f4c141c81b788e90766426617385486dae38f8b2f5a1726d8cc754939e44265f92a9db4647d5136cb1425435c39ac42b35e3acf4f3d + languageName: node + linkType: hard + +"ansis@npm:^3.5.2, ansis@npm:^3.8.1, ansis@npm:^3.9.0": version: 3.10.0 resolution: "ansis@npm:3.10.0" checksum: 10/440721b606d80fd61efe4fcdfbfbb336889b0ba59cfb787c5b0d1d2ea01629796c894ed648fefcd381521344a6aec62654f94766feae8344d53803c17a4a9636 @@ -13660,6 +13667,15 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:4.0.3": + version: 4.0.3 + resolution: "chokidar@npm:4.0.3" + dependencies: + readdirp: "npm:^4.0.1" + checksum: 10/bf2a575ea5596000e88f5db95461a9d59ad2047e939d5a4aac59dd472d126be8f1c1ff3c7654b477cf532d18f42a97279ef80ee847972fd2a25410bf00b80b59 + languageName: node + linkType: hard + "chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -15348,7 +15364,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.7, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:~4.3.1, debug@npm:~4.3.2": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:~4.3.1, debug@npm:~4.3.2": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -15372,16 +15388,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10/d86fd7be2b85462297ea16f1934dc219335e802f629ca9a69b63ed8ed041dda492389bb2ee039217c02e5b54792b1c51aa96ae954cf28634d363a2360c7a1639 - languageName: node - linkType: hard - -"debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0": +"debug@npm:4.4.0, debug@npm:^4.3.6, debug@npm:^4.4.0": version: 4.4.0 resolution: "debug@npm:4.4.0" dependencies: @@ -15393,6 +15400,15 @@ __metadata: languageName: node linkType: hard +"debug@npm:^3.2.7": + version: 3.2.7 + resolution: "debug@npm:3.2.7" + dependencies: + ms: "npm:^2.1.1" + checksum: 10/d86fd7be2b85462297ea16f1934dc219335e802f629ca9a69b63ed8ed041dda492389bb2ee039217c02e5b54792b1c51aa96ae954cf28634d363a2360c7a1639 + languageName: node + linkType: hard + "decamelize-keys@npm:^1.1.0": version: 1.1.1 resolution: "decamelize-keys@npm:1.1.1" @@ -18445,14 +18461,14 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:11.2.0, fs-extra@npm:^11.0.0, fs-extra@npm:^11.2.0": - version: 11.2.0 - resolution: "fs-extra@npm:11.2.0" +"fs-extra@npm:11.3.0": + version: 11.3.0 + resolution: "fs-extra@npm:11.3.0" dependencies: graceful-fs: "npm:^4.2.0" jsonfile: "npm:^6.0.1" universalify: "npm:^2.0.0" - checksum: 10/0579bf6726a4cd054d4aa308f10b483f52478bb16284f32cf60b4ce0542063d551fca1a08a2af365e35db21a3fa5a06cf2a6ed614004b4368982bc754cb816b3 + checksum: 10/c9fe7b23dded1efe7bbae528d685c3206477e20cc60e9aaceb3f024f9b9ff2ee1f62413c161cb88546cc564009ab516dec99e9781ba782d869bb37e4fe04a97f languageName: node linkType: hard @@ -18467,6 +18483,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^11.0.0, fs-extra@npm:^11.2.0": + version: 11.2.0 + resolution: "fs-extra@npm:11.2.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/0579bf6726a4cd054d4aa308f10b483f52478bb16284f32cf60b4ce0542063d551fca1a08a2af365e35db21a3fa5a06cf2a6ed614004b4368982bc754cb816b3 + languageName: node + linkType: hard + "fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1, fs-extra@npm:~7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -18814,9 +18841,9 @@ __metadata: languageName: node linkType: hard -"glob@npm:11.0.0, glob@npm:^11.0.0": - version: 11.0.0 - resolution: "glob@npm:11.0.0" +"glob@npm:11.0.1": + version: 11.0.1 + resolution: "glob@npm:11.0.1" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^4.0.1" @@ -18826,7 +18853,7 @@ __metadata: path-scurry: "npm:^2.0.0" bin: glob: dist/esm/bin.mjs - checksum: 10/e66939201d11ae30fe97e3364ac2be5c59d6c9bfce18ac633edfad473eb6b46a7553f6f73658f67caaf6cccc1df1ae336298a45e9021fa5695fd78754cc1603e + checksum: 10/57b12a05cc25f1c38f3b24cf6ea7a8bacef11e782c4b9a8c5b0bef3e6c5bcb8c4548cb31eb4115592e0490a024c1bde7359c470565608dd061d3b21179740457 languageName: node linkType: hard @@ -18874,6 +18901,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^11.0.0": + version: 11.0.0 + resolution: "glob@npm:11.0.0" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^4.0.1" + minimatch: "npm:^10.0.0" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^2.0.0" + bin: + glob: dist/esm/bin.mjs + checksum: 10/e66939201d11ae30fe97e3364ac2be5c59d6c9bfce18ac633edfad473eb6b46a7553f6f73658f67caaf6cccc1df1ae336298a45e9021fa5695fd78754cc1603e + languageName: node + linkType: hard + "glob@npm:^5.0.15": version: 5.0.15 resolution: "glob@npm:5.0.15" @@ -19217,7 +19260,14 @@ __metadata: languageName: node linkType: hard -"graphql@npm:16.9.0, graphql@npm:^16.6.0, graphql@npm:^16.9.0": +"graphql@npm:16.10.0": + version: 16.10.0 + resolution: "graphql@npm:16.10.0" + checksum: 10/d42cf81ddcf3a61dfb213217576bf33c326f15b02c4cee369b373dc74100cbdcdc4479b3b797e79b654dabd8fddf50ef65ff75420e9ce5596c02e21f24c9126a + languageName: node + linkType: hard + +"graphql@npm:^16.6.0, graphql@npm:^16.9.0": version: 16.9.0 resolution: "graphql@npm:16.9.0" checksum: 10/5833f82bb6c31bec120bbf9cd400eda873e1bb7ef5c17974fa262cd82dc68728fda5d4cb859dc8aaa4c4fe4f6fe1103a9c47efc01a12c02ae5cb581d8e4029e2 @@ -22606,7 +22656,7 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:^3.1.2, lilconfig@npm:^3.1.3": +"lilconfig@npm:^3.1.3": version: 3.1.3 resolution: "lilconfig@npm:3.1.3" checksum: 10/b932ce1af94985f0efbe8896e57b1f814a48c8dbd7fc0ef8469785c6303ed29d0090af3ccad7e36b626bfca3a4dc56cc262697e9a8dd867623cf09a39d54e4c3 @@ -29713,12 +29763,12 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.3, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3": - version: 7.6.3 - resolution: "semver@npm:7.6.3" +"semver@npm:7.7.1": + version: 7.7.1 + resolution: "semver@npm:7.7.1" bin: semver: bin/semver.js - checksum: 10/36b1fbe1a2b6f873559cd57b238f1094a053dbfd997ceeb8757d79d1d2089c56d1321b9f1069ce263dc64cfa922fa1d2ad566b39426fe1ac6c723c1487589e10 + checksum: 10/4cfa1eb91ef3751e20fc52e47a935a0118d56d6f15a837ab814da0c150778ba2ca4f1a4d9068b33070ea4273629e615066664c2cfcd7c272caf7a8a0f6518b2c languageName: node linkType: hard @@ -29740,6 +29790,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 10/36b1fbe1a2b6f873559cd57b238f1094a053dbfd997ceeb8757d79d1d2089c56d1321b9f1069ce263dc64cfa922fa1d2ad566b39426fe1ac6c723c1487589e10 + languageName: node + linkType: hard + "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -32448,10 +32507,10 @@ __metadata: languageName: node linkType: hard -"undici@npm:7.2.3": - version: 7.2.3 - resolution: "undici@npm:7.2.3" - checksum: 10/92870d186682c19f4b9909e4b6229a88b4e73e6e12d7a3e151033cefb66579bdc1d36e46d97e386161ba0afcd84b718e917fca7b7f08d409d918689343034c09 +"undici@npm:7.3.0": + version: 7.3.0 + resolution: "undici@npm:7.3.0" + checksum: 10/8165c3a18cd045c70b009db006bee1784c5ba405634e8d2017107f65220a23190e2dfbbcb314bec71add1e43cabcd7515cd29b655c819f22e59b5e2e7025db20 languageName: node linkType: hard @@ -34689,12 +34748,12 @@ __metadata: languageName: node linkType: hard -"yaml@npm:2.6.1": - version: 2.6.1 - resolution: "yaml@npm:2.6.1" +"yaml@npm:2.7.0": + version: 2.7.0 + resolution: "yaml@npm:2.7.0" bin: yaml: bin.mjs - checksum: 10/cf412f03a33886db0a3aac70bb4165588f4c5b3c6f8fc91520b71491e5537800b6c2c73ed52015617f6e191eb4644c73c92973960a1999779c62a200ee4c231d + checksum: 10/c8c314c62fbd49244a6a51b06482f6d495b37ab10fa685fcafa1bbaae7841b7233ee7d12cab087bcca5a0b28adc92868b6e437322276430c28d00f1c1732eeec languageName: node linkType: hard From 4245f54c0d232033564410761058dd8b49f24542 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 16:48:30 +0100 Subject: [PATCH 14/17] chore: bumped drt subgraph version --- subgraph/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subgraph/package.json b/subgraph/package.json index 095de43aa..91425e62b 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -1,7 +1,7 @@ { "name": "@kleros/kleros-v2-subgraph", "version": "0.14.2", - "drtVersion": "0.11.0", + "drtVersion": "0.12.0", "license": "MIT", "scripts": { "update:core:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia core/subgraph.yaml", From a791baa4aa57fa57adf37b4992712593048d2675 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 16:50:47 +0100 Subject: [PATCH 15/17] chore: adding back the devnet ruler contracts --- contracts/README.md | 2 + .../DisputeResolverRuler.json | 522 ++++ .../KlerosCoreRuler.json | 1617 ++++++++++++ .../KlerosCoreRuler_Implementation.json | 2221 +++++++++++++++++ .../KlerosCoreRuler_Proxy.json | 107 + 5 files changed, 4469 insertions(+) create mode 100644 contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json create mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json create mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json create mode 100644 contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json diff --git a/contracts/README.md b/contracts/README.md index 15f722c08..187020388 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -80,10 +80,12 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457), [implementation](https://sepolia.arbiscan.io/address/0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24) - [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5), [implementation](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) - [DisputeResolver](https://sepolia.arbiscan.io/address/0x524C5541f440204E0B4577334c439277018F971f) +- [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) - [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a), [implementation](https://sepolia.arbiscan.io/address/0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592) - [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C), [implementation](https://sepolia.arbiscan.io/address/0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8) - [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6), [implementation](https://sepolia.arbiscan.io/address/0xb6839061C3aD03c208EFd697409453bf9900cAb2) +- [KlerosCoreRuler: proxy](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5), [implementation](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) - [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0xa2425b724B32D40cbB85ea6e181cfb023CE9c014) - [KlerosCoreUniversity: proxy](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6), [implementation](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - [KlerosV2NeoEarlyUser](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json new file mode 100644 index 000000000..83af63ef8 --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json @@ -0,0 +1,522 @@ +{ + "address": "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", + "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" + } + ], + "transactionHash": "0x5f05cc29d52127cbc6f1e97efafec74eae530e82c06d09319b3cb03749e82da8", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", + "transactionIndex": 2, + "gasUsed": "933964", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe785eea7a8d2346a671a4761f9d5855e1eecaf96df476e09f3829526fdf8912b", + "transactionHash": "0x5f05cc29d52127cbc6f1e97efafec74eae530e82c06d09319b3cb03749e82da8", + "logs": [], + "blockNumber": 89386784, + "cumulativeGasUsed": "1027627", + "status": 1, + "byzantium": true + }, + "args": [ + "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "0x596D3B09E684D62217682216e9b7a0De75933391" + ], + "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\":\"DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/DisputeResolverRuler.sol\":\"DisputeResolverRuler\"},\"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/devtools/DisputeResolverRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {DisputeResolver, IArbitratorV2, IDisputeTemplateRegistry} from \\\"../arbitrables/DisputeResolver.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\ninterface IKlerosCoreRulerFragment {\\n function getNextDisputeID() external view returns (uint256);\\n}\\n\\n/// @title DisputeResolverRuler\\n/// It extends DisputeResolver for testing purposes of the automatic ruling modes.\\n/// The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\\ncontract DisputeResolverRuler is DisputeResolver {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n IDisputeTemplateRegistry _templateRegistry\\n ) DisputeResolver(_arbitrator, _templateRegistry) {\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\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 override returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n uint256 localDisputeID = disputes.length;\\n DisputeStruct storage dispute = disputes.push();\\n dispute.arbitratorExtraData = _arbitratorExtraData;\\n dispute.numberOfRulingOptions = _numberOfRulingOptions;\\n\\n // Keep track of the upcoming dispute ID before dispute creation, so rule() can be called immediately after.\\n arbitratorDisputeID = IKlerosCoreRulerFragment(address(arbitrator)).getNextDisputeID();\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n\\n arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n }\\n}\\n\",\"keccak256\":\"0x310d715738bcb1210bb6094787f6c6cc8032664f9484e2137106474b749ff273\",\"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": "0x608060405234801561000f575f80fd5b50604051610e85380380610e8583398101604081905261002e91610088565b5f8054600180546001600160a01b03199081166001600160a01b0396871617909155600280548216949095169390931790935591811633918216171790556100c0565b6001600160a01b0381168114610085575f80fd5b50565b5f8060408385031215610099575f80fd5b82516100a481610071565b60208401519092506100b581610071565b809150509250929050565b610db8806100cd5f395ff3fe60806040526004361061009a575f3560e01c8063908bb29511610062578063908bb29514610167578063a0af81f014610188578063dc653511146101a7578063e09997d9146101ba578063e4c0aaf4146101e5578063fc548f0814610204575f80fd5b80630c340a241461009e578063311a6c56146100d95780634660ebbe146100fa578063564a565d146101195780636cc6cde114610148575b5f80fd5b3480156100a9575f80fd5b505f546100bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e4575f80fd5b506100f86100f336600461089e565b610223565b005b348015610105575f80fd5b506100f86101143660046108d5565b6103c1565b348015610124575f80fd5b506101386101333660046108f7565b61040c565b6040516100d09493929190610951565b348015610153575f80fd5b506001546100bc906001600160a01b031681565b61017a6101753660046109c4565b6104d3565b6040519081526020016100d0565b348015610193575f80fd5b506002546100bc906001600160a01b031681565b61017a6101b5366004610a46565b61053e565b3480156101c5575f80fd5b5061017a6101d43660046108f7565b60046020525f908152604090205481565b3480156101f0575f80fd5b506100f86101ff3660046108d5565b61059b565b34801561020f575f80fd5b506100f861021e3660046108d5565b6105e5565b5f82815260046020526040812054600380549192918390811061024857610248610b4a565b5f918252602090912060015460049092020191506001600160a01b031633146102c65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561030c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102bd565b600181015460ff161561036d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102bd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b5f546001600160a01b031633146103ea5760405162461bcd60e51b81526004016102bd90610b5e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061041b575f80fd5b905f5260205f2090600402015f91509050805f01805461043a90610ba0565b80601f016020809104026020016040519081016040528092919081815260200182805461046690610ba0565b80156104b15780601f10610488576101008083540402835291602001916104b1565b820191905f5260205f20905b81548152906001019060200180831161049457829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b5f610534868660405180602001604052805f81525060405180602001604052805f81525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250610630915050565b9695505050505050565b5f610590878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525060408051602081019091529081528a93509150889050610630565b979650505050505050565b5f546001600160a01b031633146105c45760405162461bcd60e51b81526004016102bd90610b5e565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461060e5760405162461bcd60e51b81526004016102bd90610b5e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001821161068d5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102bd565b600380546001810182555f91909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106ce898b83610c24565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa15801561071e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107429190610cde565b5f81815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a99417491610789918c918c9101610cf5565b6020604051808303815f875af11580156107a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c99190610cde565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061081190879086908c90610d2f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e190349061084f9089908f908f90600401610d4d565b60206040518083038185885af115801561086b573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906108909190610cde565b505050509695505050505050565b5f80604083850312156108af575f80fd5b50508035926020909101359150565b6001600160a01b03811681146108d2575f80fd5b50565b5f602082840312156108e5575f80fd5b81356108f0816108be565b9392505050565b5f60208284031215610907575f80fd5b5035919050565b5f81518084525f5b8181101561093257602081850181015186830182015201610916565b505f602082860101526020601f19601f83011685010191505092915050565b608081525f610963608083018761090e565b9415156020830152506040810192909252606090910152919050565b5f8083601f84011261098f575f80fd5b50813567ffffffffffffffff8111156109a6575f80fd5b6020830191508360208285010111156109bd575f80fd5b9250929050565b5f805f805f606086880312156109d8575f80fd5b853567ffffffffffffffff808211156109ef575f80fd5b6109fb89838a0161097f565b90975095506020880135915080821115610a13575f80fd5b50610a208882890161097f565b96999598509660400135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f8060808789031215610a5b575f80fd5b863567ffffffffffffffff80821115610a72575f80fd5b610a7e8a838b0161097f565b90985096506020890135915080821115610a96575f80fd5b610aa28a838b0161097f565b90965094506040890135915080821115610aba575f80fd5b818901915089601f830112610acd575f80fd5b813581811115610adf57610adf610a32565b604051601f8201601f19908116603f01168101908382118183101715610b0757610b07610a32565b816040528281528c6020848701011115610b1f575f80fd5b826020860160208301375f602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bb457607f821691505b602082108103610bd257634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115610c1f57805f5260205f20601f840160051c81016020851015610bfd5750805b601f840160051c820191505b81811015610c1c575f8155600101610c09565b50505b505050565b67ffffffffffffffff831115610c3c57610c3c610a32565b610c5083610c4a8354610ba0565b83610bd8565b5f601f841160018114610c81575f8515610c6a5750838201355b5f19600387901b1c1916600186901b178355610c1c565b5f83815260208120601f198716915b82811015610cb05786850135825560209485019460019092019101610c90565b5086821015610ccc575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f60208284031215610cee575f80fd5b5051919050565b606081525f6060820152608060208201525f610d14608083018561090e565b8281036040840152610d26818561090e565b95945050505050565b838152826020820152606060408201525f610d26606083018461090e565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f191601019291505056fea2646970667358221220705fa88157ab9023bb07a33a463cb61066b2e8f1fa8a7143c709595a873d336c64736f6c63430008180033", + "deployedBytecode": "0x60806040526004361061009a575f3560e01c8063908bb29511610062578063908bb29514610167578063a0af81f014610188578063dc653511146101a7578063e09997d9146101ba578063e4c0aaf4146101e5578063fc548f0814610204575f80fd5b80630c340a241461009e578063311a6c56146100d95780634660ebbe146100fa578063564a565d146101195780636cc6cde114610148575b5f80fd5b3480156100a9575f80fd5b505f546100bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e4575f80fd5b506100f86100f336600461089e565b610223565b005b348015610105575f80fd5b506100f86101143660046108d5565b6103c1565b348015610124575f80fd5b506101386101333660046108f7565b61040c565b6040516100d09493929190610951565b348015610153575f80fd5b506001546100bc906001600160a01b031681565b61017a6101753660046109c4565b6104d3565b6040519081526020016100d0565b348015610193575f80fd5b506002546100bc906001600160a01b031681565b61017a6101b5366004610a46565b61053e565b3480156101c5575f80fd5b5061017a6101d43660046108f7565b60046020525f908152604090205481565b3480156101f0575f80fd5b506100f86101ff3660046108d5565b61059b565b34801561020f575f80fd5b506100f861021e3660046108d5565b6105e5565b5f82815260046020526040812054600380549192918390811061024857610248610b4a565b5f918252602090912060015460049092020191506001600160a01b031633146102c65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561030c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102bd565b600181015460ff161561036d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102bd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b5f546001600160a01b031633146103ea5760405162461bcd60e51b81526004016102bd90610b5e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061041b575f80fd5b905f5260205f2090600402015f91509050805f01805461043a90610ba0565b80601f016020809104026020016040519081016040528092919081815260200182805461046690610ba0565b80156104b15780601f10610488576101008083540402835291602001916104b1565b820191905f5260205f20905b81548152906001019060200180831161049457829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b5f610534868660405180602001604052805f81525060405180602001604052805f81525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250610630915050565b9695505050505050565b5f610590878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525060408051602081019091529081528a93509150889050610630565b979650505050505050565b5f546001600160a01b031633146105c45760405162461bcd60e51b81526004016102bd90610b5e565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461060e5760405162461bcd60e51b81526004016102bd90610b5e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001821161068d5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102bd565b600380546001810182555f91909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106ce898b83610c24565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa15801561071e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107429190610cde565b5f81815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a99417491610789918c918c9101610cf5565b6020604051808303815f875af11580156107a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107c99190610cde565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061081190879086908c90610d2f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e190349061084f9089908f908f90600401610d4d565b60206040518083038185885af115801561086b573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906108909190610cde565b505050509695505050505050565b5f80604083850312156108af575f80fd5b50508035926020909101359150565b6001600160a01b03811681146108d2575f80fd5b50565b5f602082840312156108e5575f80fd5b81356108f0816108be565b9392505050565b5f60208284031215610907575f80fd5b5035919050565b5f81518084525f5b8181101561093257602081850181015186830182015201610916565b505f602082860101526020601f19601f83011685010191505092915050565b608081525f610963608083018761090e565b9415156020830152506040810192909252606090910152919050565b5f8083601f84011261098f575f80fd5b50813567ffffffffffffffff8111156109a6575f80fd5b6020830191508360208285010111156109bd575f80fd5b9250929050565b5f805f805f606086880312156109d8575f80fd5b853567ffffffffffffffff808211156109ef575f80fd5b6109fb89838a0161097f565b90975095506020880135915080821115610a13575f80fd5b50610a208882890161097f565b96999598509660400135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f8060808789031215610a5b575f80fd5b863567ffffffffffffffff80821115610a72575f80fd5b610a7e8a838b0161097f565b90985096506020890135915080821115610a96575f80fd5b610aa28a838b0161097f565b90965094506040890135915080821115610aba575f80fd5b818901915089601f830112610acd575f80fd5b813581811115610adf57610adf610a32565b604051601f8201601f19908116603f01168101908382118183101715610b0757610b07610a32565b816040528281528c6020848701011115610b1f575f80fd5b826020860160208301375f602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bb457607f821691505b602082108103610bd257634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115610c1f57805f5260205f20601f840160051c81016020851015610bfd5750805b601f840160051c820191505b81811015610c1c575f8155600101610c09565b50505b505050565b67ffffffffffffffff831115610c3c57610c3c610a32565b610c5083610c4a8354610ba0565b83610bd8565b5f601f841160018114610c81575f8515610c6a5750838201355b5f19600387901b1c1916600186901b178355610c1c565b5f83815260208120601f198716915b82811015610cb05786850135825560209485019460019092019101610c90565b5086821015610ccc575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f60208284031215610cee575f80fd5b5051919050565b606081525f6060820152608060208201525f610d14608083018561090e565b8281036040840152610d26818561090e565b95945050505050565b838152826020820152606060408201525f610d26606083018461090e565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f191601019291505056fea2646970667358221220705fa88157ab9023bb07a33a463cb61066b2e8f1fa8a7143c709595a873d336c64736f6c63430008180033", + "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’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", + "params": { + "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", + "_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’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", + "params": { + "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", + "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", + "_numberOfRulingOptions": "Number of ruling options." + }, + "returns": { + "disputeID": "Dispute id (on arbitrator side) of the created dispute." + } + }, + "rule(uint256,uint256)": { + "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", + "params": { + "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", + "_ruling": "The ruling choice of the arbitration." + } + } + }, + "title": "DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 97, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "governor", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 100, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "arbitrator", + "offset": 0, + "slot": "1", + "type": "t_contract(IArbitratorV2)644" + }, + { + "astId": 103, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "templateRegistry", + "offset": 0, + "slot": "2", + "type": "t_contract(IDisputeTemplateRegistry)670" + }, + { + "astId": 107, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "disputes", + "offset": 0, + "slot": "3", + "type": "t_array(t_struct(DisputeStruct)95_storage)dyn_storage" + }, + { + "astId": 111, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "arbitratorDisputeIDToLocalID", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(DisputeStruct)95_storage)dyn_storage": { + "base": "t_struct(DisputeStruct)95_storage", + "encoding": "dynamic_array", + "label": "struct DisputeResolver.DisputeStruct[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IArbitratorV2)644": { + "encoding": "inplace", + "label": "contract IArbitratorV2", + "numberOfBytes": "20" + }, + "t_contract(IDisputeTemplateRegistry)670": { + "encoding": "inplace", + "label": "contract IDisputeTemplateRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(DisputeStruct)95_storage": { + "encoding": "inplace", + "label": "struct DisputeResolver.DisputeStruct", + "members": [ + { + "astId": 88, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "arbitratorExtraData", + "offset": 0, + "slot": "0", + "type": "t_bytes_storage" + }, + { + "astId": 90, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "isRuled", + "offset": 0, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 92, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "ruling", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 94, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "numberOfRulingOptions", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json new file mode 100644 index 000000000..adb4c6b54 --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json @@ -0,0 +1,1617 @@ +{ + "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AppealFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "ArbitrationFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotAppealable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOrInstructorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidForkingCourtAsParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NoRulerSet", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "RulerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "RulingAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "RulingModeNotSet", + "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": "UnsuccessfulCall", + "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": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "mode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "AutoRuled", + "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]" + } + ], + "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": 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 KlerosCoreRuler.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_oldRuler", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "RulerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "indexed": false, + "internalType": "struct KlerosCoreRuler.RulerSettings", + "name": "_settings", + "type": "tuple" + } + ], + "name": "RulerSettingsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_degreeOfCoherency", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_pnkAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_feeAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "changeAcceptedFeeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeCourtParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "changeCurrencyRates", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "changeRuler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_presetOverridden", + "type": "bool" + } + ], + "name": "changeRulingModeToAutomaticPreset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToAutomaticRandom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToManual", + "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]" + } + ], + "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": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrableV2", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "enum KlerosCoreRuler.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "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" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getNextDisputeID", + "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": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumFeeRewardPaid", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "feeToken", + "type": "address" + } + ], + "internalType": "struct KlerosCoreRuler.Round", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "uint256[4]", + "name": "_courtParameters", + "type": "uint256[4]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "rulers", + "outputs": [ + { + "internalType": "address", + "name": "ruler", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "name": "rulingResults", + "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": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "settings", + "outputs": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "transactionIndex": 1, + "gasUsed": "366202", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000040000000000000100005000000000000000000000000000040008000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004800000000000000060000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33", + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 81776148, + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "topics": [ + "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 0, + "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" + }, + { + "transactionIndex": 1, + "blockNumber": 81776148, + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 1, + "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" + } + ], + "blockNumber": 81776148, + "cumulativeGasUsed": "366202", + "status": 1, + "byzantium": true + }, + "args": [ + "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" + ], + "numDeployments": 1, + "solcInputHash": "2c1a31d10a5f76f480d447fbb502d6fc", + "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\":{\"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\":\"shanghai\",\"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.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": "0x608060405234801561000f575f80fd5b506040516102e53803806102e583398101604081905261002e91610143565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5580515f14610106575f826001600160a01b031682604051610072919061020b565b5f60405180830381855af49150503d805f81146100aa576040519150601f19603f3d011682016040523d82523d5f602084013e6100af565b606091505b50509050806101045760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610226565b634e487b7160e01b5f52604160045260245ffd5b5f5b8381101561013b578181015183820152602001610123565b50505f910152565b5f8060408385031215610154575f80fd5b82516001600160a01b038116811461016a575f80fd5b60208401519092506001600160401b0380821115610186575f80fd5b818501915085601f830112610199575f80fd5b8151818111156101ab576101ab61010d565b604051601f8201601f19908116603f011681019083821181831017156101d3576101d361010d565b816040528281528860208487010111156101eb575f80fd5b6101fc836020830160208801610121565b80955050505050509250929050565b5f825161021c818460208701610121565b9190910192915050565b60b3806102325f395ff3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", + "execute": { + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "0x34B944D42cAcfC8266955D07A80181D2054aa225", + [ + 0, + 10000, + { + "type": "BigNumber", + "hex": "0x016345785d8a0000" + }, + 16 + ] + ] + }, + "implementation": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json new file mode 100644 index 000000000..e7b6087ec --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json @@ -0,0 +1,2221 @@ +{ + "address": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AppealFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "ArbitrationFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotAppealable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOrInstructorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidForkingCourtAsParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NoRulerSet", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "RulerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "RulingAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "RulingModeNotSet", + "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": "UnsuccessfulCall", + "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": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "mode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "AutoRuled", + "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]" + } + ], + "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": 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 KlerosCoreRuler.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_oldRuler", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "RulerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "indexed": false, + "internalType": "struct KlerosCoreRuler.RulerSettings", + "name": "_settings", + "type": "tuple" + } + ], + "name": "RulerSettingsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_degreeOfCoherency", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_pnkAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_feeAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "changeAcceptedFeeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeCourtParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "changeCurrencyRates", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "changeRuler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_presetOverridden", + "type": "bool" + } + ], + "name": "changeRulingModeToAutomaticPreset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToAutomaticRandom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToManual", + "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]" + } + ], + "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": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrableV2", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "enum KlerosCoreRuler.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "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" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getNextDisputeID", + "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": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumFeeRewardPaid", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "feeToken", + "type": "address" + } + ], + "internalType": "struct KlerosCoreRuler.Round", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "uint256[4]", + "name": "_courtParameters", + "type": "uint256[4]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "rulers", + "outputs": [ + { + "internalType": "address", + "name": "ruler", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "name": "rulingResults", + "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": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "settings", + "outputs": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x980897f012784c3078669e2fdda6b4a26f637cfb947b775a41d514941a94cd44", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + "transactionIndex": 1, + "gasUsed": "3342918", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000020000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0954a4104a3be063ea280671e52e5659c5218a334aa322367f9ed19993df3e25", + "transactionHash": "0x980897f012784c3078669e2fdda6b4a26f637cfb947b775a41d514941a94cd44", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 81776138, + "transactionHash": "0x980897f012784c3078669e2fdda6b4a26f637cfb947b775a41d514941a94cd44", + "address": "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "logIndex": 0, + "blockHash": "0x0954a4104a3be063ea280671e52e5659c5218a334aa322367f9ed19993df3e25" + } + ], + "blockNumber": 81776138, + "cumulativeGasUsed": "3342918", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "2c1a31d10a5f76f480d447fbb502d6fc", + "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\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoRulerSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingModeNotSet\",\"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\":\"UnsuccessfulCall\",\"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\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"AutoRuled\",\"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]\"}],\"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\":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 KlerosCoreRuler.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldRuler\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"RulerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct KlerosCoreRuler.RulerSettings\",\"name\":\"_settings\",\"type\":\"tuple\"}],\"name\":\"RulerSettingsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"changeRuler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_presetOverridden\",\"type\":\"bool\"}],\"name\":\"changeRulingModeToAutomaticPreset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToAutomaticRandom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToManual\",\"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]\"}],\"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\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextDisputeID\",\"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\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"internalType\":\"struct KlerosCoreRuler.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"rulers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ruler\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"name\":\"rulingResults\",\"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\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"settings\",\"outputs\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"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\":{\"appeal(uint256,uint256,bytes,bool)\":{\"details\":\"Appeals the ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"}},\"appealCost(uint256,bool)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])\":{\"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.\",\"_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.\"}},\"execute(uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_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,uint256,bool,bool)\":{\"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.\"}},\"initialize(address,address,uint256[4])\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_governor\":\"The governor's address.\",\"_pinakion\":\"The address of the token 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.\"},\"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\":\"KlerosCoreRuler Core arbitrator contract for development and testing purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/KlerosCoreRuler.sol\":\"KlerosCoreRuler\"},\"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/devtools/KlerosCoreRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreRuler\\n/// Core arbitrator contract for development and testing purposes.\\ncontract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum RulingMode {\\n uninitialized,\\n manual, // executeRuling() is called manually.\\n automaticRandom, // The ruling is given randomly automatically.\\n automaticPreset // The ruling is given automatically with a preset value.\\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 RulerSettings {\\n RulingMode rulingMode; // The ruling mode of the arbitrator.\\n uint256 presetRuling; // The ruling to give in case of automatic ruling mode.\\n bool presetTied; // Whether the ruling is tied or not.\\n bool presetOverridden; // Whether the ruling is overridden or not.\\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 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 Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n struct RulingResult {\\n uint256 ruling;\\n bool tied;\\n bool overridden;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n IERC20 public pinakion; // The Pinakion token contract.\\n Court[] public courts; // The courts.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n mapping(IArbitrableV2 arbitrable => address ruler) public rulers; // The ruler of each arbitrable contract.\\n mapping(IArbitrableV2 arbitrable => RulerSettings) public settings; // The settings of each arbitrable contract.\\n mapping(uint256 disputeID => RulingResult) public rulingResults; // The ruling results of each dispute.\\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 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 );\\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 CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\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 AutoRuled(\\n IArbitrableV2 indexed _arbitrable,\\n RulingMode indexed mode,\\n uint256 indexed _disputeID,\\n uint256 _ruling,\\n bool tied,\\n bool overridden\\n );\\n event RulerSettingsChanged(IArbitrableV2 indexed _arbitrable, RulerSettings _settings);\\n event RulerChanged(IArbitrableV2 indexed _arbitrable, address indexed _oldRuler, address indexed _newRuler);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n function initialize(\\n address _governor,\\n IERC20 _pinakion,\\n uint256[4] memory _courtParameters\\n ) external reinitializer(1) {\\n governor = _governor;\\n pinakion = _pinakion;\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = false;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = [0, 0, 0, 0];\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n court.hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n court.timesPerPeriod\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `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 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 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 ) external onlyByGovernor {\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\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 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 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 function changeRulingModeToManual(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n \\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.manual;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticRandom(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticRandom;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticPreset(\\n IArbitrableV2 _arbitrable,\\n uint256 _presetRuling,\\n bool _presetTied,\\n bool _presetOverridden\\n ) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticPreset;\\n arbitratedSettings.presetRuling = _presetRuling;\\n arbitratedSettings.presetTied = _presetTied;\\n arbitratedSettings.presetOverridden = _presetOverridden;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRuler(IArbitrableV2 _arbitrable, address _newRuler) external {\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n rulers[_arbitrable] = _newRuler;\\n emit RulerChanged(_arbitrable, msg.sender, _newRuler);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , ) = _unpackExtraData(_extraData);\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n\\n Round storage round = dispute.rounds.push();\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n _autoRule(disputeID, _numberOfChoices);\\n\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n function _autoRule(uint256 _disputeID, uint256 _numberOfChoices) internal {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 roundID = dispute.rounds.length - 1;\\n RulerSettings storage arbitratedSettings = settings[dispute.arbitrated];\\n if (arbitratedSettings.rulingMode == RulingMode.uninitialized) revert RulingModeNotSet();\\n if (arbitratedSettings.rulingMode == RulingMode.manual) {\\n // NOP\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticPreset) {\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticPreset,\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.executeRuling(\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.execute(_disputeID, roundID);\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticRandom) {\\n uint256 pseudoRandomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1)))) %\\n _numberOfChoices; // Not secure but it's just a dev tool for testing, sue me\\n bool tied = pseudoRandomNumber & 4 == 0;\\n bool overridden = pseudoRandomNumber & 2 == 0;\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticRandom,\\n _disputeID,\\n pseudoRandomNumber,\\n tied,\\n overridden\\n );\\n this.executeRuling(_disputeID, pseudoRandomNumber, tied, overridden);\\n this.execute(_disputeID, roundID);\\n }\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n function appeal(\\n uint256 _disputeID,\\n uint256 _numberOfChoices,\\n bytes memory /*_extraData*/,\\n bool _jump\\n ) external payable {\\n if (msg.value < appealCost(_disputeID, _jump)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (rulers[dispute.arbitrated] != msg.sender) revert RulerOnly();\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n uint96 newCourtID = dispute.courtID;\\n\\n if (_jump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\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\\n Round storage extraRound = dispute.rounds.push();\\n extraRound.totalFeesForJurors = msg.value;\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n\\n _autoRule(_disputeID, _numberOfChoices);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n function execute(uint256 _disputeID, uint256 _round) external {\\n Dispute storage dispute = disputes[_disputeID];\\n address account = rulers[dispute.arbitrated];\\n if (account == address(0)) revert NoRulerSet();\\n\\n // Transfer the fees back to the ruler\\n Round storage round = dispute.rounds[_round];\\n uint256 feeReward = round.totalFeesForJurors;\\n round.sumFeeRewardPaid += feeReward;\\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(account, _disputeID, _round, 1, int256(0), int256(feeReward), round.feeToken);\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID, uint256 _ruling, bool tied, bool overridden) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n if (msg.sender != rulers[dispute.arbitrated] && msg.sender != address(this)) revert RulerOnly();\\n\\n rulingResults[_disputeID] = RulingResult(_ruling, tied, overridden);\\n dispute.ruled = true;\\n dispute.arbitrated.rule(_disputeID, _ruling);\\n\\n emit Ruling(dispute.arbitrated, _disputeID, _ruling);\\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, ) = _unpackExtraData(_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 /// @param _jump Whether to jump to the parent court or not.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID, bool _jump) 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 uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror;\\n if (_jump) {\\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 * ((nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((nbVotes * 2) + 1);\\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 RulingResult storage rulingResult = rulingResults[_disputeID];\\n return (rulingResult.ruling, rulingResult.tied, rulingResult.overridden);\\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 getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n function getNextDisputeID() external view returns (uint256) {\\n return disputes.length;\\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 Court storage court = courts[dispute.courtID];\\n return dispute.rounds[dispute.rounds.length - 1].totalFeesForJurors / court.feeForJuror;\\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 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 _unpackExtraData(\\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) {\\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 GovernorOrInstructorOnly();\\n error RulerOnly();\\n error NoRulerSet();\\n error RulingModeNotSet();\\n error UnsuccessfulCall();\\n error InvalidForkingCourtAsParent();\\n error ArbitrationFeesNotEnough();\\n error TokenNotAccepted();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error RulingAlreadyExecuted();\\n error TransferFailed();\\n}\\n\",\"keccak256\":\"0x32d56f223bd06209e9a90bcafec3af6a6d3da5be41e9cd288d72c67566309e0c\",\"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 _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\":\"0xf28c04c5c537d4f2faa02b03c389b6932a8b7061ae6fca91be8db53191c941f6\",\"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/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": "0x60a06040523060805234801562000014575f80fd5b506200001f62000025565b620000d8565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000755760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d55780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613232620000ff5f395f81816112df0152818161130801526114fc01526132325ff3fe6080604052600436106101e4575f3560e01c8063564a565d1161010f578063d98493f6116100a8578063e6d49cdf1161006d578063e6d49cdf14610700578063f6506db41461073e578063f7434ea91461075d578063fbf405b01461077c578063fc6f8f161461079b575f80fd5b8063d98493f614610643578063d9ee095f14610662578063db8a173b14610675578063e2373ab314610689578063e4c0aaf4146106e1575f80fd5b8063564a565d146104fd5780636736b70c1461052c578063751accd01461054b5780637934c0be1461056a57806382d022371461058957806386541b24146105a85780638a9bb02a146105c7578063c13517e114610611578063c71f425314610624575f80fd5b80632177470c116101815780632177470c146103db578063379f0a17146103fa5780633cfd11841461042e578063405d51ae1461045a57806343818d661461047957806347cdcc1d146104985780634f1ef286146104b757806352d1902d146104ca5780635601eaea146104de575f80fd5b8062f5822c146101e857806301fcf74d146102095780630219da791461023b57806305d3177d146102ac5780630c340a24146102cb5780630e3993a4146103015780631860592b146103205780631c3db16d1461033f5780631f5a0dd21461037b575b5f80fd5b3480156101f3575f80fd5b50610207610202366004612834565b6107ba565b005b348015610214575f80fd5b50610228610223366004612863565b610806565b6040519081526020015b60405180910390f35b348015610246575f80fd5b50610284610255366004612834565b60046020525f908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff1690820152606001610232565b3480156102b7575f80fd5b506102076102c636600461290f565b610958565b3480156102d6575f80fd5b505f546102e9906001600160a01b031681565b6040516001600160a01b039091168152602001610232565b34801561030c575f80fd5b5061020761031b366004612834565b610baf565b34801561032b575f80fd5b5061022861033a366004612954565b610cb6565b34801561034a575f80fd5b5061035e61035936600461297e565b610d0f565b604080519384529115156020840152151590820152606001610232565b348015610386575f80fd5b5061039a61039536600461297e565b610d38565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610232565b3480156103e6575f80fd5b506102076103f5366004612995565b610d95565b348015610405575f80fd5b506102e9610414366004612834565b60056020525f90815260409020546001600160a01b031681565b348015610439575f80fd5b5061044d6104483660046129f7565b610f53565b6040516102329190612a32565b348015610465575f80fd5b50610207610474366004612a40565b610fbc565b348015610484575f80fd5b50610207610493366004612834565b611179565b3480156104a3575f80fd5b506102076104b2366004612aa9565b61123a565b6102076104c5366004612b5d565b6112cb565b3480156104d5575f80fd5b506102286114f0565b3480156104e9575f80fd5b506102076104f8366004612ba9565b61154c565b348015610508575f80fd5b5061051c61051736600461297e565b6116b4565b6040516102329493929190612bf1565b348015610537575f80fd5b50610207610546366004612c2e565b611707565b348015610556575f80fd5b50610207610565366004612c63565b611814565b348015610575575f80fd5b50610207610584366004612cb7565b6118b9565b348015610594575f80fd5b506102076105a3366004612ce3565b611936565b3480156105b3575f80fd5b506102076105c2366004612a40565b6119f1565b3480156105d2575f80fd5b506105e66105e1366004612ba9565b611ae2565b604080518251815260208084015190820152918101516001600160a01b031690820152606001610232565b61022861061f366004612d3b565b611b89565b34801561062f575f80fd5b5061022861063e36600461297e565b611bbf565b34801561064e575f80fd5b5061022861065d366004612dac565b611c62565b610207610670366004612df3565b611ca5565b348015610680575f80fd5b50600354610228565b348015610694575f80fd5b506106d16106a3366004612834565b60066020525f908152604090208054600182015460029092015460ff91821692918181169161010090041684565b6040516102329493929190612e56565b3480156106ec575f80fd5b506102076106fb366004612834565b611eed565b34801561070b575f80fd5b5061035e61071a36600461297e565b60076020525f90815260409020805460019091015460ff8082169161010090041683565b348015610749575f80fd5b50610228610758366004612e81565b611f38565b348015610768575f80fd5b50610228610777366004612ee2565b61201a565b348015610787575f80fd5b506001546102e9906001600160a01b031681565b3480156107a6575f80fd5b506102286107b536600461297e565b612062565b5f546001600160a01b031633146107e45760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f806003848154811061081b5761081b612f13565b5f91825260208220600260039092020190810180549193509061084090600190612f3b565b8154811061085057610850612f13565b5f918252602082208454600280546003909402909201945090916001600160601b0390911690811061088457610884612f13565b905f5260205f2090600b020190505f8160040154835f01546108a69190612f62565b905085156109265783546001600160601b03165f19016108cf576001600160ff1b03945061094e565b6108da816002612f75565b6108e5906001612f8c565b82546002805490916001600160601b031690811061090557610905612f13565b905f5260205f2090600b02016004015461091f9190612f75565b945061094e565b610931816002612f75565b61093c906001612f8c565b826004015461094b9190612f75565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109a1575080546001600160401b03808416911610155b156109be5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781555f80546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610a76578160200160208202803683370190505b508051610a8d916001840191602090910190612745565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184525f808252948101859052928301849052820192909252610af29160068401919061278e565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b5895600160601b90930460ff1694919390929060068b0190612f9f565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b038181165f9081526005602052604090205416610bf5576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f90815260056020526040902054163314610c2e576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610caa9190612ff9565b60405180910390a25050565b6001600160a01b0382165f9081526004602052604081205461010081046001600160401b031690610cf290600160481b900460ff16600a61311d565b610cfc9084612f75565b610d069190612f62565b90505b92915050565b5f818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d47575f80fd5b5f9182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b5f60038581548110610da957610da9612f13565b905f5260205f20906003020190508060010160019054906101000a900460ff1615610de75760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b039081165f90815260056020526040902054163314801590610e195750333014155b15610e37576040516301627e2760e61b815260040160405180910390fd5b6040805160608101825285815284151560208083019182528515158385019081525f8a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c56906044015f604051808303815f87803b158015610eed575f80fd5b505af1158015610eff573d5f803e3d5ffd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610f5b6127c1565b6002826001600160601b031681548110610f7757610f77612f13565b5f918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610f9d5750505050509050919050565b5f546001600160a01b03163314610fe65760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661100d57604051631ef4f64960e01b815260040160405180910390fd5b600280546001810182555f9182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b161781559091604051908082528060200260200182016040528015611085578160200160208202803683370190505b50805161109c916001840191602090910190612745565b50805460ff60601b1916600160601b8915150217815560028101879055600381018690556004808201869055600582018590556110df90600683019085906127df565b506002896001600160601b0316815481106110fc576110fc612f13565b5f91825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76190611166908c908c908c908c908c908c9061312b565b60405180910390a3505050505050505050565b6001600160a01b038181165f90815260056020526040902054166111bf576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f908152600560205260409020541633146111f8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610c6c565b6001600160a01b038281165f90815260056020526040902054163314611273576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b038281165f8181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b6112d48261208f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061135157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113455f805160206131dd8339815191525490565b6001600160a01b031614155b1561136f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c9575060408051601f3d908101601f191682019092526113c69181019061315d565b60015b6113f657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b5f805160206131dd833981519152811461142657604051632a87526960e21b8152600481018290526024016113ed565b5f805160206131dd8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28151156114eb575f836001600160a01b03168360405161148a9190613174565b5f60405180830381855af49150503d805f81146114c2576040519150601f19603f3d011682016040523d82523d5f602084013e6114c7565b606091505b50509050806114e9576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b5f306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461153a5760405163703e46dd60e11b815260040160405180910390fd5b505f805160206131dd83398151915290565b5f6003838154811061156057611560612f13565b5f9182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806115b45760405163f4612fe560e01b815260040160405180910390fd5b5f8260020184815481106115ca576115ca612f13565b905f5260205f20906003020190505f815f0154905080826001015f8282546115f29190612f8c565b909155505060028201546001600160a01b0316611633576040516001600160a01b0384169082156108fc029083905f818181858888f193505050505061164e565b600282015461164c906001600160a01b031684836120bc565b505b600282015460408051600181525f60208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b600381815481106116c3575f80fd5b5f918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b038481165f908152600560205260409020541661174d576001600160a01b0384165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481165f90815260056020526040902054163314611786576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0384165f8181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f490611805908490612ff9565b60405180910390a25050505050565b5f546001600160a01b0316331461183e5760405163c383977560e01b815260040160405180910390fd5b5f836001600160a01b031683836040516118589190613174565b5f6040518083038185875af1925050503d805f8114611892576040519150601f19603f3d011682016040523d82523d5f602084013e611897565b606091505b50509050806114e9576040516322092f2f60e11b815260040160405180910390fd5b5f546001600160a01b031633146118e35760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0382165f81815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b5f546001600160a01b031633146119605760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0383165f81815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b5f546001600160a01b03163314611a1b5760405163c383977560e01b815260040160405180910390fd5b5f6002886001600160601b031681548110611a3857611a38612f13565b5f9182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611a8c90600683019084906127df565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611ad09695949392919061312b565b60405180910390a25050505050505050565b611b0c60405180606001604052805f81526020015f81526020015f6001600160a01b031681525090565b60038381548110611b1f57611b1f612f13565b905f5260205f2090600302016002018281548110611b3f57611b3f612f13565b5f918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b5f611b938261201a565b341015611bb357604051630e3360f160e21b815260040160405180910390fd5b610d0683835f34612180565b5f8060038381548110611bd457611bd4612f13565b5f91825260208220600390910201805460028054929450916001600160601b03909116908110611c0657611c06612f13565b905f5260205f2090600b0201905080600401548260020160018460020180549050611c319190612f3b565b81548110611c4157611c41612f13565b905f5260205f2090600302015f0154611c5a9190612f62565b949350505050565b5f611c5a8261033a86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061201a92505050565b611caf8482610806565b341015611ccf57604051633191f8f160e01b815260040160405180910390fd5b5f60038581548110611ce357611ce3612f13565b5f918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611d38576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611d5357611d53612bc9565b14611d71576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611e22576002816001600160601b031681548110611d9e57611d9e612f13565b5f9182526020909120600b909102015482546001600160601b039182169250168114611e2257815460028301546001600160601b0390911690611de390600190612f3b565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff1916905560028301805491820181555f90815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b915f604051611ed291906131a0565b60405180910390a2611ee48787612272565b50505050505050565b5f546001600160a01b03163314611f175760405163c383977560e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382165f9081526004602052604081205460ff16611f705760405163e51cf7bf60e01b815260040160405180910390fd5b611f7b858585611c62565b821015611f9b57604051630e3360f160e21b815260040160405180910390fd5b611fb06001600160a01b0384163330856125fc565b611fcd576040516312171d8360e31b815260040160405180910390fd5b6120108686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508892508791506121809050565b9695505050505050565b5f805f612026846126d3565b5091509150806002836001600160601b03168154811061204857612048612f13565b905f5260205f2090600b020160040154611c5a9190612f75565b5f6003828154811061207657612076612f13565b5f91825260209091206002600390920201015492915050565b5f546001600160a01b031633146120b95760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b038381166024830152604482018390525f91829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121189190613174565b5f604051808303815f865af19150503d805f8114612151576040519150601f19603f3d011682016040523d82523d5f602084013e612156565b606091505b509150915081801561201057508051158061201057508080602001905181019061201091906131ae565b5f8061218b856126d3565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d01805492830181555f9081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a161790559094509192509061223b8489612272565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed995905f90a3505050949350505050565b5f6003838154811061228657612286612f13565b905f5260205f20906003020190505f600182600201805490506122a99190612f3b565b8254600160601b90046001600160a01b03165f908152600660205260408120919250815460ff1660038111156122e1576122e1612bc9565b036122ff5760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff16600381111561231757612317612bc9565b146125f5576003815460ff16600381111561233457612334612bc9565b03612479578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c906084015f604051808303815f87803b15801561240b575f80fd5b505af115801561241d573d5f803e3d5ffd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea91506044015f604051808303815f87803b15801561245e575f80fd5b505af1158015612470573d5f803e3d5ffd5b505050506125f5565b6002815460ff16600381111561249157612491612bc9565b036125f5575f846124a3600143612f3b565b604080519140602083015201604051602081830303815290604052805190602001205f1c6124d191906131c9565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c906084015f604051808303815f87803b158015612588575f80fd5b505af115801561259a573d5f803e3d5ffd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea91506044015f604051808303815f87803b1580156125db575f80fd5b505af11580156125ed573d5f803e3d5ffd5b505050505050505b5050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516126609190613174565b5f604051808303815f865af19150503d805f8114612699576040519150601f19603f3d011682016040523d82523d5f602084013e61269e565b606091505b50915091508180156126c85750805115806126c85750808060200190518101906126c891906131ae565b979650505050505050565b5f805f6040845110612736575050506020810151604082015160608301516001600160601b038316158061271257506002546001600160601b03841610155b1561271c57600192505b815f0361272857600391505b80612731575060015b610d31565b50600193600393508492509050565b828054828255905f5260205f2090810192821561277e579160200282015b8281111561277e578251825591602001919060010190612763565b5061278a92915061280c565b5090565b826004810192821561277e579160200282015b8281111561277e578251829060ff169055916020019190600101906127a1565b60405180608001604052806004906020820280368337509192915050565b826004810192821561277e579160200282018281111561277e578251825591602001919060010190612763565b5b8082111561278a575f815560010161280d565b6001600160a01b03811681146120b9575f80fd5b5f60208284031215612844575f80fd5b813561284f81612820565b9392505050565b80151581146120b9575f80fd5b5f8060408385031215612874575f80fd5b82359150602083013561288681612856565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126128b4575f80fd5b604051608081018181106001600160401b03821117156128d6576128d6612891565b6040528060808401858111156128ea575f80fd5b845b818110156129045780358352602092830192016128ec565b509195945050505050565b5f805f60c08486031215612921575f80fd5b833561292c81612820565b9250602084013561293c81612820565b915061294b85604086016128a5565b90509250925092565b5f8060408385031215612965575f80fd5b823561297081612820565b946020939093013593505050565b5f6020828403121561298e575f80fd5b5035919050565b5f805f80608085870312156129a8575f80fd5b843593506020850135925060408501356129c181612856565b915060608501356129d181612856565b939692955090935050565b80356001600160601b03811681146129f2575f80fd5b919050565b5f60208284031215612a07575f80fd5b610d06826129dc565b805f5b60048110156114e9578151845260209384019390910190600101612a13565b60808101610d098284612a10565b5f805f805f805f610140888a031215612a57575f80fd5b612a60886129dc565b96506020880135612a7081612856565b955060408801359450606088013593506080880135925060a08801359150612a9b8960c08a016128a5565b905092959891949750929550565b5f8060408385031215612aba575f80fd5b8235612ac581612820565b9150602083013561288681612820565b5f82601f830112612ae4575f80fd5b81356001600160401b0380821115612afe57612afe612891565b604051601f8301601f19908116603f01168101908282118183101715612b2657612b26612891565b81604052838152866020858801011115612b3e575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215612b6e575f80fd5b8235612b7981612820565b915060208301356001600160401b03811115612b93575f80fd5b612b9f85828601612ad5565b9150509250929050565b5f8060408385031215612bba575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52602160045260245ffd5b60058110612bed57612bed612bc9565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612c1d6040830185612bdd565b821515606083015295945050505050565b5f805f8060808587031215612c41575f80fd5b8435612c4c81612820565b93506020850135925060408501356129c181612856565b5f805f60608486031215612c75575f80fd5b8335612c8081612820565b92506020840135915060408401356001600160401b03811115612ca1575f80fd5b612cad86828701612ad5565b9150509250925092565b5f8060408385031215612cc8575f80fd5b8235612cd381612820565b9150602083013561288681612856565b5f805f60608486031215612cf5575f80fd5b8335612d0081612820565b925060208401356001600160401b0381168114612d1b575f80fd5b9150604084013560ff81168114612d30575f80fd5b809150509250925092565b5f8060408385031215612d4c575f80fd5b8235915060208301356001600160401b03811115612b93575f80fd5b5f8083601f840112612d78575f80fd5b5081356001600160401b03811115612d8e575f80fd5b602083019150836020828501011115612da5575f80fd5b9250929050565b5f805f60408486031215612dbe575f80fd5b83356001600160401b03811115612dd3575f80fd5b612ddf86828701612d68565b9094509250506020840135612d3081612820565b5f805f8060808587031215612e06575f80fd5b843593506020850135925060408501356001600160401b03811115612e29575f80fd5b612e3587828801612ad5565b92505060608501356129d181612856565b60048110612bed57612bed612bc9565b60808101612e648287612e46565b602082019490945291151560408301521515606090910152919050565b5f805f805f60808688031215612e95575f80fd5b8535945060208601356001600160401b03811115612eb1575f80fd5b612ebd88828901612d68565b9095509350506040860135612ed181612820565b949793965091946060013592915050565b5f60208284031215612ef2575f80fd5b81356001600160401b03811115612f07575f80fd5b611c5a84828501612ad5565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b81810381811115610d0957610d09612f27565b634e487b7160e01b5f52601260045260245ffd5b5f82612f7057612f70612f4e565b500490565b8082028115828204841417610d0957610d09612f27565b80820180821115610d0957610d09612f27565b5f610120820190508715158252602087602084015286604084015285606084015284608084015260a08301845f5b6004811015612fea57815483529183019160019182019101612fcd565b50505050979650505050505050565b5f60808201905061300e8260ff855416612e46565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561307757815f190482111561305d5761305d612f27565b8085161561306a57918102915b93841c9390800290613042565b509250929050565b5f8261308d57506001610d09565b8161309957505f610d09565b81600181146130af57600281146130b9576130d5565b6001915050610d09565b60ff8411156130ca576130ca612f27565b50506001821b610d09565b5060208310610133831016604e8410600b84101617156130f8575081810a610d09565b613102838361303d565b805f190482111561311557613115612f27565b029392505050565b5f610d0660ff84168361307f565b5f6101208201905087151582528660208301528560408301528460608301528360808301526126c860a0830184612a10565b5f6020828403121561316d575f80fd5b5051919050565b5f82515f5b818110156131935760208186018101518583015201613179565b505f920191825250919050565b60208101610d098284612bdd565b5f602082840312156131be575f80fd5b815161284f81612856565b5f826131d7576131d7612f4e565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f2e22a0dce5ce1f5dee73c7f609484912562e77d9ae9b2964b5eeed771279c2464736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106101e4575f3560e01c8063564a565d1161010f578063d98493f6116100a8578063e6d49cdf1161006d578063e6d49cdf14610700578063f6506db41461073e578063f7434ea91461075d578063fbf405b01461077c578063fc6f8f161461079b575f80fd5b8063d98493f614610643578063d9ee095f14610662578063db8a173b14610675578063e2373ab314610689578063e4c0aaf4146106e1575f80fd5b8063564a565d146104fd5780636736b70c1461052c578063751accd01461054b5780637934c0be1461056a57806382d022371461058957806386541b24146105a85780638a9bb02a146105c7578063c13517e114610611578063c71f425314610624575f80fd5b80632177470c116101815780632177470c146103db578063379f0a17146103fa5780633cfd11841461042e578063405d51ae1461045a57806343818d661461047957806347cdcc1d146104985780634f1ef286146104b757806352d1902d146104ca5780635601eaea146104de575f80fd5b8062f5822c146101e857806301fcf74d146102095780630219da791461023b57806305d3177d146102ac5780630c340a24146102cb5780630e3993a4146103015780631860592b146103205780631c3db16d1461033f5780631f5a0dd21461037b575b5f80fd5b3480156101f3575f80fd5b50610207610202366004612834565b6107ba565b005b348015610214575f80fd5b50610228610223366004612863565b610806565b6040519081526020015b60405180910390f35b348015610246575f80fd5b50610284610255366004612834565b60046020525f908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff1690820152606001610232565b3480156102b7575f80fd5b506102076102c636600461290f565b610958565b3480156102d6575f80fd5b505f546102e9906001600160a01b031681565b6040516001600160a01b039091168152602001610232565b34801561030c575f80fd5b5061020761031b366004612834565b610baf565b34801561032b575f80fd5b5061022861033a366004612954565b610cb6565b34801561034a575f80fd5b5061035e61035936600461297e565b610d0f565b604080519384529115156020840152151590820152606001610232565b348015610386575f80fd5b5061039a61039536600461297e565b610d38565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610232565b3480156103e6575f80fd5b506102076103f5366004612995565b610d95565b348015610405575f80fd5b506102e9610414366004612834565b60056020525f90815260409020546001600160a01b031681565b348015610439575f80fd5b5061044d6104483660046129f7565b610f53565b6040516102329190612a32565b348015610465575f80fd5b50610207610474366004612a40565b610fbc565b348015610484575f80fd5b50610207610493366004612834565b611179565b3480156104a3575f80fd5b506102076104b2366004612aa9565b61123a565b6102076104c5366004612b5d565b6112cb565b3480156104d5575f80fd5b506102286114f0565b3480156104e9575f80fd5b506102076104f8366004612ba9565b61154c565b348015610508575f80fd5b5061051c61051736600461297e565b6116b4565b6040516102329493929190612bf1565b348015610537575f80fd5b50610207610546366004612c2e565b611707565b348015610556575f80fd5b50610207610565366004612c63565b611814565b348015610575575f80fd5b50610207610584366004612cb7565b6118b9565b348015610594575f80fd5b506102076105a3366004612ce3565b611936565b3480156105b3575f80fd5b506102076105c2366004612a40565b6119f1565b3480156105d2575f80fd5b506105e66105e1366004612ba9565b611ae2565b604080518251815260208084015190820152918101516001600160a01b031690820152606001610232565b61022861061f366004612d3b565b611b89565b34801561062f575f80fd5b5061022861063e36600461297e565b611bbf565b34801561064e575f80fd5b5061022861065d366004612dac565b611c62565b610207610670366004612df3565b611ca5565b348015610680575f80fd5b50600354610228565b348015610694575f80fd5b506106d16106a3366004612834565b60066020525f908152604090208054600182015460029092015460ff91821692918181169161010090041684565b6040516102329493929190612e56565b3480156106ec575f80fd5b506102076106fb366004612834565b611eed565b34801561070b575f80fd5b5061035e61071a36600461297e565b60076020525f90815260409020805460019091015460ff8082169161010090041683565b348015610749575f80fd5b50610228610758366004612e81565b611f38565b348015610768575f80fd5b50610228610777366004612ee2565b61201a565b348015610787575f80fd5b506001546102e9906001600160a01b031681565b3480156107a6575f80fd5b506102286107b536600461297e565b612062565b5f546001600160a01b031633146107e45760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f806003848154811061081b5761081b612f13565b5f91825260208220600260039092020190810180549193509061084090600190612f3b565b8154811061085057610850612f13565b5f918252602082208454600280546003909402909201945090916001600160601b0390911690811061088457610884612f13565b905f5260205f2090600b020190505f8160040154835f01546108a69190612f62565b905085156109265783546001600160601b03165f19016108cf576001600160ff1b03945061094e565b6108da816002612f75565b6108e5906001612f8c565b82546002805490916001600160601b031690811061090557610905612f13565b905f5260205f2090600b02016004015461091f9190612f75565b945061094e565b610931816002612f75565b61093c906001612f8c565b826004015461094b9190612f75565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109a1575080546001600160401b03808416911610155b156109be5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781555f80546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610a76578160200160208202803683370190505b508051610a8d916001840191602090910190612745565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184525f808252948101859052928301849052820192909252610af29160068401919061278e565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b5895600160601b90930460ff1694919390929060068b0190612f9f565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b038181165f9081526005602052604090205416610bf5576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f90815260056020526040902054163314610c2e576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610caa9190612ff9565b60405180910390a25050565b6001600160a01b0382165f9081526004602052604081205461010081046001600160401b031690610cf290600160481b900460ff16600a61311d565b610cfc9084612f75565b610d069190612f62565b90505b92915050565b5f818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d47575f80fd5b5f9182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b5f60038581548110610da957610da9612f13565b905f5260205f20906003020190508060010160019054906101000a900460ff1615610de75760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b039081165f90815260056020526040902054163314801590610e195750333014155b15610e37576040516301627e2760e61b815260040160405180910390fd5b6040805160608101825285815284151560208083019182528515158385019081525f8a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c56906044015f604051808303815f87803b158015610eed575f80fd5b505af1158015610eff573d5f803e3d5ffd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610f5b6127c1565b6002826001600160601b031681548110610f7757610f77612f13565b5f918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610f9d5750505050509050919050565b5f546001600160a01b03163314610fe65760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661100d57604051631ef4f64960e01b815260040160405180910390fd5b600280546001810182555f9182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b161781559091604051908082528060200260200182016040528015611085578160200160208202803683370190505b50805161109c916001840191602090910190612745565b50805460ff60601b1916600160601b8915150217815560028101879055600381018690556004808201869055600582018590556110df90600683019085906127df565b506002896001600160601b0316815481106110fc576110fc612f13565b5f91825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76190611166908c908c908c908c908c908c9061312b565b60405180910390a3505050505050505050565b6001600160a01b038181165f90815260056020526040902054166111bf576001600160a01b0381165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038181165f908152600560205260409020541633146111f8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381165f908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610c6c565b6001600160a01b038281165f90815260056020526040902054163314611273576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b038281165f8181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b6112d48261208f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061135157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113455f805160206131dd8339815191525490565b6001600160a01b031614155b1561136f5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113c9575060408051601f3d908101601f191682019092526113c69181019061315d565b60015b6113f657604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b5f805160206131dd833981519152811461142657604051632a87526960e21b8152600481018290526024016113ed565b5f805160206131dd8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28151156114eb575f836001600160a01b03168360405161148a9190613174565b5f60405180830381855af49150503d805f81146114c2576040519150601f19603f3d011682016040523d82523d5f602084013e6114c7565b606091505b50509050806114e9576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b5f306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461153a5760405163703e46dd60e11b815260040160405180910390fd5b505f805160206131dd83398151915290565b5f6003838154811061156057611560612f13565b5f9182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806115b45760405163f4612fe560e01b815260040160405180910390fd5b5f8260020184815481106115ca576115ca612f13565b905f5260205f20906003020190505f815f0154905080826001015f8282546115f29190612f8c565b909155505060028201546001600160a01b0316611633576040516001600160a01b0384169082156108fc029083905f818181858888f193505050505061164e565b600282015461164c906001600160a01b031684836120bc565b505b600282015460408051600181525f60208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b600381815481106116c3575f80fd5b5f918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b038481165f908152600560205260409020541661174d576001600160a01b0384165f90815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481165f90815260056020526040902054163314611786576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0384165f8181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f490611805908490612ff9565b60405180910390a25050505050565b5f546001600160a01b0316331461183e5760405163c383977560e01b815260040160405180910390fd5b5f836001600160a01b031683836040516118589190613174565b5f6040518083038185875af1925050503d805f8114611892576040519150601f19603f3d011682016040523d82523d5f602084013e611897565b606091505b50509050806114e9576040516322092f2f60e11b815260040160405180910390fd5b5f546001600160a01b031633146118e35760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0382165f81815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b5f546001600160a01b031633146119605760405163c383977560e01b815260040160405180910390fd5b6001600160a01b0383165f81815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b5f546001600160a01b03163314611a1b5760405163c383977560e01b815260040160405180910390fd5b5f6002886001600160601b031681548110611a3857611a38612f13565b5f9182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611a8c90600683019084906127df565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611ad09695949392919061312b565b60405180910390a25050505050505050565b611b0c60405180606001604052805f81526020015f81526020015f6001600160a01b031681525090565b60038381548110611b1f57611b1f612f13565b905f5260205f2090600302016002018281548110611b3f57611b3f612f13565b5f918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b5f611b938261201a565b341015611bb357604051630e3360f160e21b815260040160405180910390fd5b610d0683835f34612180565b5f8060038381548110611bd457611bd4612f13565b5f91825260208220600390910201805460028054929450916001600160601b03909116908110611c0657611c06612f13565b905f5260205f2090600b0201905080600401548260020160018460020180549050611c319190612f3b565b81548110611c4157611c41612f13565b905f5260205f2090600302015f0154611c5a9190612f62565b949350505050565b5f611c5a8261033a86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061201a92505050565b611caf8482610806565b341015611ccf57604051633191f8f160e01b815260040160405180910390fd5b5f60038581548110611ce357611ce3612f13565b5f918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611d38576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611d5357611d53612bc9565b14611d71576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611e22576002816001600160601b031681548110611d9e57611d9e612f13565b5f9182526020909120600b909102015482546001600160601b039182169250168114611e2257815460028301546001600160601b0390911690611de390600190612f3b565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff1916905560028301805491820181555f90815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b915f604051611ed291906131a0565b60405180910390a2611ee48787612272565b50505050505050565b5f546001600160a01b03163314611f175760405163c383977560e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382165f9081526004602052604081205460ff16611f705760405163e51cf7bf60e01b815260040160405180910390fd5b611f7b858585611c62565b821015611f9b57604051630e3360f160e21b815260040160405180910390fd5b611fb06001600160a01b0384163330856125fc565b611fcd576040516312171d8360e31b815260040160405180910390fd5b6120108686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508892508791506121809050565b9695505050505050565b5f805f612026846126d3565b5091509150806002836001600160601b03168154811061204857612048612f13565b905f5260205f2090600b020160040154611c5a9190612f75565b5f6003828154811061207657612076612f13565b5f91825260209091206002600390920201015492915050565b5f546001600160a01b031633146120b95760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b038381166024830152604482018390525f91829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121189190613174565b5f604051808303815f865af19150503d805f8114612151576040519150601f19603f3d011682016040523d82523d5f602084013e612156565b606091505b509150915081801561201057508051158061201057508080602001905181019061201091906131ae565b5f8061218b856126d3565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d01805492830181555f9081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a161790559094509192509061223b8489612272565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed995905f90a3505050949350505050565b5f6003838154811061228657612286612f13565b905f5260205f20906003020190505f600182600201805490506122a99190612f3b565b8254600160601b90046001600160a01b03165f908152600660205260408120919250815460ff1660038111156122e1576122e1612bc9565b036122ff5760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff16600381111561231757612317612bc9565b146125f5576003815460ff16600381111561233457612334612bc9565b03612479578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c906084015f604051808303815f87803b15801561240b575f80fd5b505af115801561241d573d5f803e3d5ffd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea91506044015f604051808303815f87803b15801561245e575f80fd5b505af1158015612470573d5f803e3d5ffd5b505050506125f5565b6002815460ff16600381111561249157612491612bc9565b036125f5575f846124a3600143612f3b565b604080519140602083015201604051602081830303815290604052805190602001205f1c6124d191906131c9565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c906084015f604051808303815f87803b158015612588575f80fd5b505af115801561259a573d5f803e3d5ffd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea91506044015f604051808303815f87803b1580156125db575f80fd5b505af11580156125ed573d5f803e3d5ffd5b505050505050505b5050505050565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516126609190613174565b5f604051808303815f865af19150503d805f8114612699576040519150601f19603f3d011682016040523d82523d5f602084013e61269e565b606091505b50915091508180156126c85750805115806126c85750808060200190518101906126c891906131ae565b979650505050505050565b5f805f6040845110612736575050506020810151604082015160608301516001600160601b038316158061271257506002546001600160601b03841610155b1561271c57600192505b815f0361272857600391505b80612731575060015b610d31565b50600193600393508492509050565b828054828255905f5260205f2090810192821561277e579160200282015b8281111561277e578251825591602001919060010190612763565b5061278a92915061280c565b5090565b826004810192821561277e579160200282015b8281111561277e578251829060ff169055916020019190600101906127a1565b60405180608001604052806004906020820280368337509192915050565b826004810192821561277e579160200282018281111561277e578251825591602001919060010190612763565b5b8082111561278a575f815560010161280d565b6001600160a01b03811681146120b9575f80fd5b5f60208284031215612844575f80fd5b813561284f81612820565b9392505050565b80151581146120b9575f80fd5b5f8060408385031215612874575f80fd5b82359150602083013561288681612856565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126128b4575f80fd5b604051608081018181106001600160401b03821117156128d6576128d6612891565b6040528060808401858111156128ea575f80fd5b845b818110156129045780358352602092830192016128ec565b509195945050505050565b5f805f60c08486031215612921575f80fd5b833561292c81612820565b9250602084013561293c81612820565b915061294b85604086016128a5565b90509250925092565b5f8060408385031215612965575f80fd5b823561297081612820565b946020939093013593505050565b5f6020828403121561298e575f80fd5b5035919050565b5f805f80608085870312156129a8575f80fd5b843593506020850135925060408501356129c181612856565b915060608501356129d181612856565b939692955090935050565b80356001600160601b03811681146129f2575f80fd5b919050565b5f60208284031215612a07575f80fd5b610d06826129dc565b805f5b60048110156114e9578151845260209384019390910190600101612a13565b60808101610d098284612a10565b5f805f805f805f610140888a031215612a57575f80fd5b612a60886129dc565b96506020880135612a7081612856565b955060408801359450606088013593506080880135925060a08801359150612a9b8960c08a016128a5565b905092959891949750929550565b5f8060408385031215612aba575f80fd5b8235612ac581612820565b9150602083013561288681612820565b5f82601f830112612ae4575f80fd5b81356001600160401b0380821115612afe57612afe612891565b604051601f8301601f19908116603f01168101908282118183101715612b2657612b26612891565b81604052838152866020858801011115612b3e575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215612b6e575f80fd5b8235612b7981612820565b915060208301356001600160401b03811115612b93575f80fd5b612b9f85828601612ad5565b9150509250929050565b5f8060408385031215612bba575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52602160045260245ffd5b60058110612bed57612bed612bc9565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612c1d6040830185612bdd565b821515606083015295945050505050565b5f805f8060808587031215612c41575f80fd5b8435612c4c81612820565b93506020850135925060408501356129c181612856565b5f805f60608486031215612c75575f80fd5b8335612c8081612820565b92506020840135915060408401356001600160401b03811115612ca1575f80fd5b612cad86828701612ad5565b9150509250925092565b5f8060408385031215612cc8575f80fd5b8235612cd381612820565b9150602083013561288681612856565b5f805f60608486031215612cf5575f80fd5b8335612d0081612820565b925060208401356001600160401b0381168114612d1b575f80fd5b9150604084013560ff81168114612d30575f80fd5b809150509250925092565b5f8060408385031215612d4c575f80fd5b8235915060208301356001600160401b03811115612b93575f80fd5b5f8083601f840112612d78575f80fd5b5081356001600160401b03811115612d8e575f80fd5b602083019150836020828501011115612da5575f80fd5b9250929050565b5f805f60408486031215612dbe575f80fd5b83356001600160401b03811115612dd3575f80fd5b612ddf86828701612d68565b9094509250506020840135612d3081612820565b5f805f8060808587031215612e06575f80fd5b843593506020850135925060408501356001600160401b03811115612e29575f80fd5b612e3587828801612ad5565b92505060608501356129d181612856565b60048110612bed57612bed612bc9565b60808101612e648287612e46565b602082019490945291151560408301521515606090910152919050565b5f805f805f60808688031215612e95575f80fd5b8535945060208601356001600160401b03811115612eb1575f80fd5b612ebd88828901612d68565b9095509350506040860135612ed181612820565b949793965091946060013592915050565b5f60208284031215612ef2575f80fd5b81356001600160401b03811115612f07575f80fd5b611c5a84828501612ad5565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b81810381811115610d0957610d09612f27565b634e487b7160e01b5f52601260045260245ffd5b5f82612f7057612f70612f4e565b500490565b8082028115828204841417610d0957610d09612f27565b80820180821115610d0957610d09612f27565b5f610120820190508715158252602087602084015286604084015285606084015284608084015260a08301845f5b6004811015612fea57815483529183019160019182019101612fcd565b50505050979650505050505050565b5f60808201905061300e8260ff855416612e46565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561307757815f190482111561305d5761305d612f27565b8085161561306a57918102915b93841c9390800290613042565b509250929050565b5f8261308d57506001610d09565b8161309957505f610d09565b81600181146130af57600281146130b9576130d5565b6001915050610d09565b60ff8411156130ca576130ca612f27565b50506001821b610d09565b5060208310610133831016604e8410600b84101617156130f8575081810a610d09565b613102838361303d565b805f190482111561311557613115612f27565b029392505050565b5f610d0660ff84168361307f565b5f6101208201905087151582528660208301528560408301528460608301528360808301526126c860a0830184612a10565b5f6020828403121561316d575f80fd5b5051919050565b5f82515f5b818110156131935760208186018101518583015201613179565b505f920191825250919050565b60208101610d098284612bdd565b5f602082840312156131be575f80fd5b815161284f81612856565b5f826131d7576131d7612f4e565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f2e22a0dce5ce1f5dee73c7f609484912562e77d9ae9b2964b5eeed771279c2464736f6c63430008180033", + "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": { + "appeal(uint256,uint256,bytes,bool)": { + "details": "Appeals the ruling of a specified dispute.", + "params": { + "_disputeID": "The ID of the dispute.", + "_jump": "Whether to jump to the parent court or not." + } + }, + "appealCost(uint256,bool)": { + "details": "Gets the cost of appealing a specified dispute.", + "params": { + "_disputeID": "The ID of the dispute.", + "_jump": "Whether to jump to the parent court or not." + }, + "returns": { + "cost": "The appeal cost." + } + }, + "arbitrationCost(bytes)": { + "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", + "params": { + "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." + }, + "returns": { + "cost": "The arbitration cost in ETH." + } + }, + "arbitrationCost(bytes,address)": { + "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", + "params": { + "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", + "_feeToken": "The ERC20 token used to pay fees." + }, + "returns": { + "cost": "The arbitration cost in `_feeToken`." + } + }, + "changeAcceptedFeeTokens(address,bool)": { + "details": "Changes the supported fee tokens.", + "params": { + "_accepted": "Whether the token is supported or not as a method of fee payment.", + "_feeToken": "The fee token." + } + }, + "changeCurrencyRates(address,uint64,uint8)": { + "details": "Changes the currency rate of a fee token.", + "params": { + "_feeToken": "The fee token.", + "_rateDecimals": "The new decimals of the fee token rate.", + "_rateInEth": "The new rate of the fee token in ETH." + } + }, + "changeGovernor(address)": { + "details": "Changes the `governor` storage variable.", + "params": { + "_governor": "The new value for the `governor` storage variable." + } + }, + "changePinakion(address)": { + "details": "Changes the `pinakion` storage variable.", + "params": { + "_pinakion": "The new value for the `pinakion` storage variable." + } + }, + "constructor": { + "details": "Constructor, initializing the implementation to reduce attack surface." + }, + "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])": { + "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.", + "_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." + } + }, + "execute(uint256,uint256)": { + "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", + "params": { + "_disputeID": "The ID of the dispute.", + "_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,uint256,bool,bool)": { + "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." + } + }, + "initialize(address,address,uint256[4])": { + "details": "Initializer (constructor equivalent for upgradable contracts).", + "params": { + "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", + "_governor": "The governor's address.", + "_pinakion": "The address of the token 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." + }, + "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": "KlerosCoreRuler Core arbitrator contract for development and testing purposes.", + "version": 1 + }, + "userdoc": { + "errors": { + "FailedDelegateCall()": [ + { + "notice": "Failed Delegated call" + } + ], + "InvalidImplementation(address)": [ + { + "notice": "The `implementation` is not UUPS-compliant" + } + ] + }, + "events": { + "Upgraded(address)": { + "notice": "Emitted when the `implementation` has been successfully upgraded." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 14410, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "governor", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 14413, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "pinakion", + "offset": 0, + "slot": "1", + "type": "t_contract(IERC20)1229" + }, + { + "astId": 14417, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "courts", + "offset": 0, + "slot": "2", + "type": "t_array(t_struct(Court)14361_storage)dyn_storage" + }, + { + "astId": 14421, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "disputes", + "offset": 0, + "slot": "3", + "type": "t_array(t_struct(Dispute)14376_storage)dyn_storage" + }, + { + "astId": 14427, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "currencyRates", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)14391_storage)" + }, + { + "astId": 14432, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rulers", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_contract(IArbitrableV2)21560,t_address)" + }, + { + "astId": 14438, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "settings", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_contract(IArbitrableV2)21560,t_struct(RulerSettings)14339_storage)" + }, + { + "astId": 14443, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rulingResults", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_struct(RulingResult)14398_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Court)14361_storage)dyn_storage": { + "base": "t_struct(Court)14361_storage", + "encoding": "dynamic_array", + "label": "struct KlerosCoreRuler.Court[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Dispute)14376_storage)dyn_storage": { + "base": "t_struct(Dispute)14376_storage", + "encoding": "dynamic_array", + "label": "struct KlerosCoreRuler.Dispute[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Round)14384_storage)dyn_storage": { + "base": "t_struct(Round)14384_storage", + "encoding": "dynamic_array", + "label": "struct KlerosCoreRuler.Round[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)4_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[4]", + "numberOfBytes": "128" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IArbitrableV2)21560": { + "encoding": "inplace", + "label": "contract IArbitrableV2", + "numberOfBytes": "20" + }, + "t_contract(IERC20)1229": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_enum(Period)14329": { + "encoding": "inplace", + "label": "enum KlerosCoreRuler.Period", + "numberOfBytes": "1" + }, + "t_enum(RulingMode)14323": { + "encoding": "inplace", + "label": "enum KlerosCoreRuler.RulingMode", + "numberOfBytes": "1" + }, + "t_mapping(t_contract(IArbitrableV2)21560,t_address)": { + "encoding": "mapping", + "key": "t_contract(IArbitrableV2)21560", + "label": "mapping(contract IArbitrableV2 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_contract(IArbitrableV2)21560,t_struct(RulerSettings)14339_storage)": { + "encoding": "mapping", + "key": "t_contract(IArbitrableV2)21560", + "label": "mapping(contract IArbitrableV2 => struct KlerosCoreRuler.RulerSettings)", + "numberOfBytes": "32", + "value": "t_struct(RulerSettings)14339_storage" + }, + "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)14391_storage)": { + "encoding": "mapping", + "key": "t_contract(IERC20)1229", + "label": "mapping(contract IERC20 => struct KlerosCoreRuler.CurrencyRate)", + "numberOfBytes": "32", + "value": "t_struct(CurrencyRate)14391_storage" + }, + "t_mapping(t_uint256,t_struct(RulingResult)14398_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct KlerosCoreRuler.RulingResult)", + "numberOfBytes": "32", + "value": "t_struct(RulingResult)14398_storage" + }, + "t_struct(Court)14361_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.Court", + "members": [ + { + "astId": 14341, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "parent", + "offset": 0, + "slot": "0", + "type": "t_uint96" + }, + { + "astId": 14343, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "hiddenVotes", + "offset": 12, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 14346, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "children", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 14348, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "minStake", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 14350, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "alpha", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 14352, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "feeForJuror", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 14354, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "jurorsForCourtJump", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 14358, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "timesPerPeriod", + "offset": 0, + "slot": "6", + "type": "t_array(t_uint256)4_storage" + }, + { + "astId": 14360, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "disabled", + "offset": 0, + "slot": "10", + "type": "t_bool" + } + ], + "numberOfBytes": "352" + }, + "t_struct(CurrencyRate)14391_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.CurrencyRate", + "members": [ + { + "astId": 14386, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "feePaymentAccepted", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 14388, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rateInEth", + "offset": 1, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 14390, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rateDecimals", + "offset": 9, + "slot": "0", + "type": "t_uint8" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Dispute)14376_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.Dispute", + "members": [ + { + "astId": 14363, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "courtID", + "offset": 0, + "slot": "0", + "type": "t_uint96" + }, + { + "astId": 14366, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "arbitrated", + "offset": 12, + "slot": "0", + "type": "t_contract(IArbitrableV2)21560" + }, + { + "astId": 14369, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "period", + "offset": 0, + "slot": "1", + "type": "t_enum(Period)14329" + }, + { + "astId": 14371, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "ruled", + "offset": 1, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 14375, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rounds", + "offset": 0, + "slot": "2", + "type": "t_array(t_struct(Round)14384_storage)dyn_storage" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Round)14384_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.Round", + "members": [ + { + "astId": 14378, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "totalFeesForJurors", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 14380, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "sumFeeRewardPaid", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 14383, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "feeToken", + "offset": 0, + "slot": "2", + "type": "t_contract(IERC20)1229" + } + ], + "numberOfBytes": "96" + }, + "t_struct(RulerSettings)14339_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.RulerSettings", + "members": [ + { + "astId": 14332, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rulingMode", + "offset": 0, + "slot": "0", + "type": "t_enum(RulingMode)14323" + }, + { + "astId": 14334, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "presetRuling", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 14336, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "presetTied", + "offset": 0, + "slot": "2", + "type": "t_bool" + }, + { + "astId": 14338, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "presetOverridden", + "offset": 1, + "slot": "2", + "type": "t_bool" + } + ], + "numberOfBytes": "96" + }, + "t_struct(RulingResult)14398_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.RulingResult", + "members": [ + { + "astId": 14393, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "ruling", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 14395, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "tied", + "offset": 0, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 14397, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "overridden", + "offset": 1, + "slot": "1", + "type": "t_bool" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + } +} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json new file mode 100644 index 000000000..bff9fda17 --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json @@ -0,0 +1,107 @@ +{ + "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "transactionIndex": 1, + "gasUsed": "366202", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000040000000000000100005000000000000000000000000000040008000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004800000000000000060000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33", + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 81776148, + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "topics": [ + "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 0, + "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" + }, + { + "transactionIndex": 1, + "blockNumber": 81776148, + "transactionHash": "0xe7a285a9dae297998d65ab557226558d250c1e0b512f0d9349fc4e3f5c9c3865", + "address": "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 1, + "blockHash": "0x4a74c33b3212cc7ed833956036b191ca451ae191619b2e4f90cf6dad50868d33" + } + ], + "blockNumber": 81776148, + "cumulativeGasUsed": "366202", + "status": 1, + "byzantium": true + }, + "args": [ + "0x97e30A3A940856A3913437912C746f1aF6ccC76c", + "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" + ], + "numDeployments": 1, + "solcInputHash": "2c1a31d10a5f76f480d447fbb502d6fc", + "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\":{\"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\":\"shanghai\",\"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.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": "0x608060405234801561000f575f80fd5b506040516102e53803806102e583398101604081905261002e91610143565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5580515f14610106575f826001600160a01b031682604051610072919061020b565b5f60405180830381855af49150503d805f81146100aa576040519150601f19603f3d011682016040523d82523d5f602084013e6100af565b606091505b50509050806101045760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610226565b634e487b7160e01b5f52604160045260245ffd5b5f5b8381101561013b578181015183820152602001610123565b50505f910152565b5f8060408385031215610154575f80fd5b82516001600160a01b038116811461016a575f80fd5b60208401519092506001600160401b0380821115610186575f80fd5b818501915085601f830112610199575f80fd5b8151818111156101ab576101ab61010d565b604051601f8201601f19908116603f011681019083821181831017156101d3576101d361010d565b816040528281528860208487010111156101eb575f80fd5b6101fc836020830160208801610121565b80955050505050509250929050565b5f825161021c818460208701610121565b9190910192915050565b60b3806102325f395ff3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b365f80375f80365f845af43d5f803e8080156079573d5ff35b3d5ffdfea2646970667358221220cef4b52606e73de407a2e27987280e32ca63601b58f184d7d171ca05e6a91f7c64736f6c63430008180033", + "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 + }, + "storageLayout": { + "storage": [], + "types": null + } +} From 29a0082ebf76e7a6b2be48764d058276ac9f79fb Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Thu, 10 Apr 2025 17:54:53 +0200 Subject: [PATCH 16/17] fix: court name --- web/src/pages/Courts/CourtDetails/StakePanel/index.tsx | 4 ++-- web/src/pages/Courts/CourtDetails/index.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx index c62a89570..fb5294d65 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/index.tsx @@ -44,7 +44,7 @@ const InputArea = styled(TagArea)` flex-direction: column; `; -const StakePanel: React.FC<{ courtName: string }> = ({ courtName = "Unknown Court" }) => { +const StakePanel: React.FC<{ courtName: string | undefined }> = ({ courtName }) => { const [amount, setAmount] = useState(""); const [isActive, setIsActive] = useState(true); const [action, setAction] = useState(ActionType.stake); @@ -65,7 +65,7 @@ const StakePanel: React.FC<{ courtName: string }> = ({ courtName = "Unknown Cour diff --git a/web/src/pages/Courts/CourtDetails/index.tsx b/web/src/pages/Courts/CourtDetails/index.tsx index 76f285677..cb71d1308 100644 --- a/web/src/pages/Courts/CourtDetails/index.tsx +++ b/web/src/pages/Courts/CourtDetails/index.tsx @@ -8,7 +8,6 @@ import { Card, Breadcrumb } from "@kleros/ui-components-library"; import { isProductionDeployment } from "consts/index"; -import { useCourtPolicy } from "queries/useCourtPolicy"; import { useCourtTree, CourtTreeQuery } from "queries/useCourtTree"; import { landscapeStyle } from "styles/landscapeStyle"; @@ -99,7 +98,6 @@ const StakePanelAndStats = styled.div` const CourtDetails: React.FC = () => { const { id } = useParams(); - const { data: policy } = useCourtPolicy(id); const { data } = useCourtTree(); const [isStakingMiniGuideOpen, toggleStakingMiniGuide] = useToggle(false); const navigate = useNavigate(); @@ -112,13 +110,16 @@ const CourtDetails: React.FC = () => { value: node.id, })) ?? []; + const currentCourt = courtPath?.[courtPath.length - 1]; + const courtName = currentCourt?.name; + return ( - {policy ? policy.name : } + {data ? courtName : } {breadcrumbItems.length > 1 ? ( { - + From 2f2dbba97e5210a8e6eae22c96cb5435b664252b Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 10 Apr 2025 17:15:27 +0100 Subject: [PATCH 17/17] chore: published contracts v0.8.1 --- .../deployments/arbitrumSepoliaDevnet.ts | 21873 +++++----------- contracts/deployments/devnet.viem.ts | 14835 ++++------- contracts/package.json | 2 +- 3 files changed, 11249 insertions(+), 25461 deletions(-) diff --git a/contracts/deployments/arbitrumSepoliaDevnet.ts b/contracts/deployments/arbitrumSepoliaDevnet.ts index 9a87cdd2b..175d5061f 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet.ts +++ b/contracts/deployments/arbitrumSepoliaDevnet.ts @@ -3071,7 +3071,7 @@ export default { ], }, DisputeKitClassic: { - address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + address: "0x2246821E1313A93e2F8CdF7a3422d078f560b457", abi: [ { stateMutability: "payable", @@ -4052,8 +4052,8 @@ export default { }, ], }, - DisputeKitClassicNeo: { - address: "0xd40aA608801a639E292e10C235B90488D04070b1", + DisputeKitClassicUniversity: { + address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", abi: [ { stateMutability: "payable", @@ -5001,8 +5001,8 @@ export default { }, ], }, - DisputeKitClassicNeo_Implementation: { - address: "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", + DisputeKitClassicUniversity_Implementation: { + address: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", abi: [ { inputs: [], @@ -5931,8 +5931,8 @@ export default { }, ], }, - DisputeKitClassicNeo_Proxy: { - address: "0xd40aA608801a639E292e10C235B90488D04070b1", + DisputeKitClassicUniversity_Proxy: { + address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", abi: [ { inputs: [ @@ -5960,16 +5960,13 @@ export default { }, ], }, - DisputeKitClassicUniversity: { - address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + DisputeKitClassic_Implementation: { + address: "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -6797,6 +6794,13 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -6839,6 +6843,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -6857,6 +6874,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -6891,6 +6921,11 @@ export default { stateMutability: "nonpayable", type: "function", }, + ], + }, + DisputeKitClassic_Proxy: { + address: "0x2246821E1313A93e2F8CdF7a3422d078f560b457", + abi: [ { inputs: [ { @@ -6907,112 +6942,70 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - ], - }, - DisputeKitClassicUniversity_Implementation: { - address: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, { - inputs: [], - name: "AlreadyInitialized", - type: "error", + stateMutability: "payable", + type: "fallback", }, { - inputs: [], - name: "FailedDelegateCall", - type: "error", + stateMutability: "payable", + type: "receive", }, + ], + }, + DisputeResolver: { + address: "0x524C5541f440204E0B4577334c439277018F971f", + abi: [ { inputs: [ { - internalType: "address", - name: "implementation", + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + stateMutability: "nonpayable", + type: "constructor", }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "_arbitratorDisputeID", type: "uint256", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "_choice", + name: "_externalDisputeID", type: "uint256", }, - ], - name: "ChoiceFunded", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, + indexed: false, internalType: "uint256", - name: "_coreDisputeID", + name: "_templateId", 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", + internalType: "string", + name: "_templateUri", + type: "string", }, ], - name: "CommitCast", + name: "DisputeRequest", type: "event", }, { @@ -7020,196 +7013,188 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "_disputeID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_choice", + name: "_ruling", type: "uint256", }, + ], + name: "Ruling", + type: "event", + }, + { + inputs: [], + name: "arbitrator", + outputs: [ { - indexed: true, - internalType: "address", - name: "_contributor", + internalType: "contract IArbitratorV2", + name: "", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", - }, ], - name: "Contribution", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "", type: "uint256", }, + ], + name: "arbitratorDisputeIDToLocalID", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_numberOfChoices", + name: "", type: "uint256", }, - { - indexed: false, - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, ], - name: "DisputeCreation", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, ], - name: "Initialized", - type: "event", + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "_governor", type: "address", }, ], - name: "Upgraded", - type: "event", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "_juror", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", type: "address", }, + ], + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "string", + name: "_disputeTemplate", + type: "string", }, { - indexed: false, internalType: "string", - name: "_justification", + name: "_disputeTemplateDataMappings", type: "string", }, - ], - name: "VoteCast", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "_numberOfRulingOptions", type: "uint256", }, + ], + name: "createDisputeForTemplate", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "disputeID", type: "uint256", }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - indexed: false, - internalType: "uint256", - name: "_choice", - type: "uint256", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - indexed: true, - internalType: "address", - name: "_contributor", - type: "address", + internalType: "string", + name: "_disputeTemplateUri", + type: "string", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "Withdrawal", - type: "event", - }, - { - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + name: "createDisputeForTemplateUri", outputs: [ { internalType: "uint256", - name: "", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", + name: "disputes", outputs: [ + { + internalType: "bytes", + name: "arbitratorExtraData", + type: "bytes", + }, + { + internalType: "bool", + name: "isRuled", + type: "bool", + }, { internalType: "uint256", - name: "", + name: "ruling", + type: "uint256", + }, + { + internalType: "uint256", + name: "numberOfRulingOptions", type: "uint256", }, ], @@ -7218,12 +7203,12 @@ export default { }, { inputs: [], - name: "WINNER_STAKE_MULTIPLIER", + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -7233,128 +7218,122 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "_arbitratorDisputeID", type: "uint256", }, - ], - name: "areCommitsAllCast", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], - stateMutability: "view", + name: "rule", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", + inputs: [], + name: "templateRegistry", outputs: [ { - internalType: "bool", + internalType: "contract IDisputeTemplateRegistry", name: "", - type: "bool", + type: "address", }, ], stateMutability: "view", type: "function", }, + ], + }, + DisputeResolverRuler: { + address: "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", + abi: [ { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, ], - name: "castCommit", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + indexed: true, + internalType: "uint256", + name: "_arbitratorDisputeID", + type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_choice", + name: "_externalDisputeID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_salt", + name: "_templateId", type: "uint256", }, { + indexed: false, internalType: "string", - name: "_justification", + name: "_templateUri", type: "string", }, ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeRequest", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_core", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address payable", - name: "_governor", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Ruling", + type: "event", }, { inputs: [], - name: "core", + name: "arbitrator", outputs: [ { - internalType: "contract KlerosCore", + internalType: "contract IArbitratorV2", name: "", type: "address", }, @@ -7370,7 +7349,7 @@ export default { type: "uint256", }, ], - name: "coreDisputeIDToLocal", + name: "arbitratorDisputeIDToLocalID", outputs: [ { internalType: "uint256", @@ -7384,27 +7363,25 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, + ], + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_nbVotes", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "createDispute", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", @@ -7412,145 +7389,121 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, ], - name: "currentRuling", - outputs: [ + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "ruling", - type: "uint256", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - internalType: "bool", - name: "tied", - type: "bool", + internalType: "string", + name: "_disputeTemplate", + type: "string", }, { - internalType: "bool", - name: "overridden", - type: "bool", + internalType: "string", + name: "_disputeTemplateDataMappings", + type: "string", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "disputes", + name: "createDisputeForTemplate", outputs: [ { internalType: "uint256", - name: "numberOfChoices", + name: "disputeID", type: "uint256", }, - { - internalType: "bool", - name: "jumped", - type: "bool", - }, - { - internalType: "bytes", - name: "extraData", - type: "bytes", - }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", + }, + { + internalType: "string", + name: "_disputeTemplateUri", + type: "string", }, { internalType: "uint256", - name: "_nonce", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "draw", + name: "createDisputeForTemplateUri", outputs: [ { - internalType: "address", - name: "drawnAddress", - type: "address", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, { internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, + ], + name: "disputes", + outputs: [ { internalType: "bytes", - name: "_data", + name: "arbitratorExtraData", type: "bytes", }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + { + internalType: "bool", + name: "isRuled", + type: "bool", + }, { internalType: "uint256", - name: "_coreDisputeID", + name: "ruling", type: "uint256", }, { internalType: "uint256", - name: "_choice", + name: "numberOfRulingOptions", type: "uint256", }, ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - ], - name: "getCoherentCount", + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -7560,109 +7513,124 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - { - internalType: "uint256", - name: "", + name: "_arbitratorDisputeID", type: "uint256", }, { internalType: "uint256", - name: "", + name: "_ruling", type: "uint256", }, ], - name: "getDegreeOfCoherence", + name: "rule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "templateRegistry", outputs: [ { - internalType: "uint256", + internalType: "contract IDisputeTemplateRegistry", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", type: "function", }, + ], + }, + DisputeResolverUniversity: { + address: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", + abi: [ { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, - ], - name: "getFundedChoices", - outputs: [ { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", + type: "address", }, ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { + indexed: true, internalType: "uint256", - name: "_coreRoundID", + name: "_arbitratorDisputeID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_choice", + name: "_externalDisputeID", type: "uint256", }, - ], - name: "getRoundInfo", - outputs: [ { + indexed: false, internalType: "uint256", - name: "winningChoice", + name: "_templateId", type: "uint256", }, { - internalType: "bool", - name: "tied", - type: "bool", + indexed: false, + internalType: "string", + name: "_templateUri", + type: "string", }, + ], + name: "DisputeRequest", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "totalVoted", - type: "uint256", + indexed: true, + internalType: "contract IArbitratorV2", + name: "_arbitrator", + type: "address", }, { + indexed: true, internalType: "uint256", - name: "totalCommited", + name: "_disputeID", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "nbVoters", + name: "_ruling", type: "uint256", }, + ], + name: "Ruling", + type: "event", + }, + { + inputs: [], + name: "arbitrator", + outputs: [ { - internalType: "uint256", - name: "choiceCount", - type: "uint256", + internalType: "contract IArbitratorV2", + name: "", + type: "address", }, ], stateMutability: "view", @@ -7672,57 +7640,32 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", + name: "", type: "uint256", }, + ], + name: "arbitratorDisputeIDToLocalID", + outputs: [ { internalType: "uint256", - name: "_voteID", + name: "", 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: [ + inputs: [ { - internalType: "address", - name: "", + internalType: "contract IArbitratorV2", + name: "_arbitrator", type: "address", }, ], - stateMutability: "view", + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -7732,13 +7675,21 @@ export default { name: "_governor", type: "address", }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "contract KlerosCore", - name: "_core", + internalType: "contract IDisputeTemplateRegistry", + name: "_templateRegistry", type: "address", }, ], - name: "initialize", + name: "changeTemplateRegistry", outputs: [], stateMutability: "nonpayable", type: "function", @@ -7746,60 +7697,63 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "string", + name: "_disputeTemplate", + type: "string", + }, + { + internalType: "string", + name: "_disputeTemplateDataMappings", + type: "string", }, { internalType: "uint256", - name: "_voteID", + name: "_numberOfRulingOptions", type: "uint256", }, ], - name: "isVoteActive", + name: "createDisputeForTemplate", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { - inputs: [], - name: "proxiableUUID", - outputs: [ + inputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "bytes", + name: "_arbitratorExtraData", + type: "bytes", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "string", + name: "_disputeTemplateUri", + type: "string", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "_numberOfRulingOptions", + type: "uint256", + }, + ], + name: "createDisputeForTemplateUri", + outputs: [ + { + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - name: "upgradeToAndCall", - outputs: [], stateMutability: "payable", type: "function", }, @@ -7807,57 +7761,85 @@ export default { inputs: [ { internalType: "uint256", - name: "_coreDisputeID", + name: "", type: "uint256", }, + ], + name: "disputes", + outputs: [ + { + internalType: "bytes", + name: "arbitratorExtraData", + type: "bytes", + }, { - internalType: "address payable", - name: "_beneficiary", - type: "address", + internalType: "bool", + name: "isRuled", + type: "bool", }, { internalType: "uint256", - name: "_coreRoundID", + name: "ruling", type: "uint256", }, { internalType: "uint256", - name: "_choice", + name: "numberOfRulingOptions", type: "uint256", }, ], - name: "withdrawFeesAndRewards", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, - ], - }, - DisputeKitClassicUniversity_Proxy: { - address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - abi: [ { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256", + name: "_arbitratorDisputeID", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], + name: "rule", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", + }, + { + inputs: [], + name: "templateRegistry", + outputs: [ + { + internalType: "contract IDisputeTemplateRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", }, + ], + }, + DisputeTemplateRegistry: { + address: "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", + abi: [ { stateMutability: "payable", type: "fallback", @@ -7866,16 +7848,6 @@ export default { stateMutability: "payable", type: "receive", }, - ], - }, - DisputeKitClassic_Implementation: { - address: "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, { inputs: [], name: "AlreadyInitialized", @@ -7924,260 +7896,148 @@ export default { { indexed: true, internalType: "uint256", - name: "_coreDisputeID", + name: "_templateId", type: "uint256", }, { indexed: true, - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", + internalType: "string", + name: "_templateTag", + type: "string", }, { - indexed: true, - internalType: "uint256", - name: "_choice", - type: "uint256", + indexed: false, + internalType: "string", + name: "_templateData", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_templateDataMappings", + type: "string", }, ], - name: "ChoiceFunded", + name: "DisputeTemplate", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { indexed: true, internalType: "address", - name: "_juror", + name: "newImplementation", type: "address", }, - { - indexed: false, - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", - }, - { - indexed: false, - internalType: "bytes32", - name: "_commit", - type: "bytes32", - }, ], - name: "CommitCast", + name: "Upgraded", 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", + name: "_governor", 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", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "governor", + outputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "", type: "address", }, ], - name: "Upgraded", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - indexed: true, internalType: "address", - name: "_juror", + name: "_governor", 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", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - 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: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [ + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "string", + name: "_templateTag", + type: "string", + }, + { + internalType: "string", + name: "_templateData", + type: "string", + }, + { + internalType: "string", + name: "_templateDataMappings", + type: "string", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "ONE_BASIS_POINT", + name: "setDisputeTemplate", outputs: [ { internalType: "uint256", - name: "", + name: "templateId", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "WINNER_STAKE_MULTIPLIER", + name: "templates", outputs: [ { internalType: "uint256", @@ -8191,36 +8051,29 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "newImplementation", + type: "address", }, - ], - name: "areCommitsAllCast", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - stateMutability: "view", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "areVotesAllCast", + inputs: [], + name: "version", outputs: [ { - internalType: "bool", + internalType: "string", name: "", - type: "bool", + type: "string", }, ], stateMutability: "view", @@ -8229,76 +8082,132 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "address", + name: "_implementation", + type: "address", }, { - internalType: "bytes32", - name: "_commit", - type: "bytes32", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "castCommit", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, + ], + }, + DisputeTemplateRegistry_Implementation: { + address: "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", + abi: [ { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + 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: "uint256[]", - name: "_voteIDs", - type: "uint256[]", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "_choice", + name: "_templateId", type: "uint256", }, { - internalType: "uint256", - name: "_salt", - type: "uint256", + indexed: true, + internalType: "string", + name: "_templateTag", + type: "string", }, { + indexed: false, internalType: "string", - name: "_justification", + name: "_templateData", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_templateDataMappings", type: "string", }, ], - name: "castVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + 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: "_core", + name: "newImplementation", type: "address", }, ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [ { - internalType: "address payable", + internalType: "address", name: "_governor", type: "address", }, @@ -8310,10 +8219,10 @@ export default { }, { inputs: [], - name: "core", + name: "governor", outputs: [ { - internalType: "contract KlerosCore", + internalType: "address", name: "", type: "address", }, @@ -8324,17 +8233,31 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "coreDisputeIDToLocal", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", @@ -8343,56 +8266,41 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "string", + name: "_templateTag", + type: "string", }, { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", + internalType: "string", + name: "_templateData", + type: "string", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "string", + name: "_templateDataMappings", + type: "string", }, + ], + name: "setDisputeTemplate", + outputs: [ { internalType: "uint256", - name: "_nbVotes", + name: "templateId", type: "uint256", }, ], - name: "createDispute", - outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "currentRuling", + inputs: [], + name: "templates", outputs: [ { internalType: "uint256", - name: "ruling", + name: "", type: "uint256", }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, ], stateMutability: "view", type: "function", @@ -8400,276 +8308,168 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint256", - name: "numberOfChoices", - type: "uint256", - }, - { - internalType: "bool", - name: "jumped", - type: "bool", + internalType: "address", + name: "newImplementation", + type: "address", }, { internalType: "bytes", - name: "extraData", + name: "data", type: "bytes", }, ], - stateMutability: "view", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "draw", + inputs: [], + name: "version", outputs: [ { - internalType: "address", - name: "drawnAddress", - type: "address", + internalType: "string", + name: "", + type: "string", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, + ], + }, + DisputeTemplateRegistry_Proxy: { + address: "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", + abi: [ { inputs: [ { internalType: "address", - name: "_destination", + name: "_implementation", type: "address", }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, { internalType: "bytes", name: "_data", type: "bytes", }, ], - name: "executeGovernorProposal", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "fundAppeal", - outputs: [], stateMutability: "payable", - type: "function", + type: "fallback", }, { - 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", + stateMutability: "payable", + type: "receive", + }, + ], + }, + EvidenceModule: { + address: "0x990f44d19a5F46889801B31bf58e0536fBECf27C", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", }, { 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", + internalType: "address", + name: "implementation", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - ], - name: "getFundedChoices", - outputs: [ - { - internalType: "uint256[]", - name: "fundedChoices", - type: "uint256[]", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, inputs: [ { + indexed: true, 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", + name: "_externalDisputeID", type: "uint256", }, { - internalType: "uint256", - name: "nbVoters", - type: "uint256", + indexed: true, + internalType: "address", + name: "_party", + type: "address", }, { - internalType: "uint256", - name: "choiceCount", - type: "uint256", + indexed: false, + internalType: "string", + name: "_evidence", + type: "string", }, ], - stateMutability: "view", - type: "function", + name: "Evidence", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_voteID", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "getVoteInfo", - outputs: [ + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "account", + name: "newImplementation", type: "address", }, - { - internalType: "bytes32", - name: "commit", - type: "bytes32", - }, - { - internalType: "uint256", - name: "choice", - type: "uint256", - }, - { - internalType: "bool", - name: "voted", - type: "bool", - }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [], @@ -8691,11 +8491,6 @@ export default { name: "_governor", type: "address", }, - { - internalType: "contract KlerosCore", - name: "_core", - type: "address", - }, ], name: "initialize", outputs: [], @@ -8709,35 +8504,6 @@ export default { 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", @@ -8752,16 +8518,21 @@ export default { type: "function", }, { - inputs: [], - name: "singleDrawPerJuror", - outputs: [ + inputs: [ { - internalType: "bool", - name: "", - type: "bool", - }, + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + internalType: "string", + name: "_evidence", + type: "string", + }, ], - stateMutability: "view", + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -8798,176 +8569,130 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", - }, - { - internalType: "address payable", - name: "_beneficiary", + internalType: "address", + name: "_implementation", type: "address", }, { - internalType: "uint256", - name: "_coreRoundID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_choice", - type: "uint256", - }, - ], - name: "withdrawFeesAndRewards", - outputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, ], }, - DisputeKitClassic_Proxy: { - address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + EvidenceModule_Implementation: { + address: "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, { inputs: [ { internalType: "address", - name: "_implementation", + name: "implementation", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], - stateMutability: "nonpayable", - type: "constructor", + name: "InvalidImplementation", + type: "error", }, { - stateMutability: "payable", - type: "fallback", + inputs: [], + name: "NotInitializing", + type: "error", }, { - stateMutability: "payable", - type: "receive", + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, - ], - }, - DisputeResolver: { - address: "0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "nonpayable", - type: "constructor", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { anonymous: false, inputs: [ { indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, internalType: "uint256", name: "_externalDisputeID", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", + indexed: true, + internalType: "address", + name: "_party", + type: "address", }, { indexed: false, internalType: "string", - name: "_templateUri", + name: "_evidence", type: "string", }, ], - name: "DisputeRequest", + name: "Evidence", 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", + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "Ruling", + name: "Initialized", type: "event", }, { - inputs: [], - name: "arbitrator", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "contract IArbitratorV2", - name: "", + indexed: true, + internalType: "address", + name: "newImplementation", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -8976,534 +8701,634 @@ export default { { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "address", + name: "_governor", type: "address", }, ], - name: "changeArbitrator", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", + inputs: [], + name: "initialize2", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "proxiableUUID", + outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", }, { internalType: "string", - name: "_disputeTemplate", + name: "_evidence", type: "string", }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", + internalType: "address", + name: "newImplementation", + type: "address", }, { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "createDisputeForTemplate", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "version", outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + internalType: "string", + name: "", + type: "string", }, ], - stateMutability: "payable", + stateMutability: "view", type: "function", }, + ], + }, + EvidenceModule_Proxy: { + address: "0x990f44d19a5F46889801B31bf58e0536fBECf27C", + abi: [ { inputs: [ + { + internalType: "address", + name: "_implementation", + type: "address", + }, { internalType: "bytes", - name: "_arbitratorExtraData", + name: "_data", type: "bytes", }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, ], + stateMutability: "nonpayable", + type: "constructor", + }, + { stateMutability: "payable", - type: "function", + type: "fallback", }, { - 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", + stateMutability: "payable", + type: "receive", }, + ], + }, + KlerosCore: { + address: "0x4838e31E0ea315232c431598110FE677cAF2D6E6", + abi: [ { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", + stateMutability: "payable", + type: "fallback", }, { - inputs: [ - { - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: "payable", + type: "receive", }, { inputs: [], - name: "templateRegistry", - outputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", + name: "AlreadyInitialized", + type: "error", }, - ], - }, - DisputeResolverNeo: { - address: "0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C", - abi: [ { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", + inputs: [], + name: "AppealFeesNotEnough", + type: "error", }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_arbitratorDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, - ], - name: "DisputeRequest", - type: "event", + inputs: [], + name: "AppealPeriodNotPassed", + type: "error", }, { - 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: "ArbitrationFeesNotEnough", + type: "error", }, { inputs: [], - name: "arbitrator", - outputs: [ - { - internalType: "contract IArbitratorV2", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", + name: "CannotDisableClassicDK", + type: "error", }, { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + inputs: [], + name: "CommitPeriodNotPassed", + type: "error", }, { - inputs: [ - { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "DisputeKitNotSupportedByCourt", + type: "error", }, { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "DisputeKitOnly", + type: "error", }, { - inputs: [ - { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + 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: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "MinStakeLowerThanParentCourt", + type: "error", + }, + { + inputs: [], + name: "MustSupportDisputeKitClassic", + type: "error", + }, + { + inputs: [], + name: "NotEvidencePeriod", + type: "error", + }, + { + inputs: [], + name: "NotExecutionPeriod", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "RulingAlreadyExecuted", + type: "error", + }, + { + inputs: [], + name: "SortitionModuleOnly", + type: "error", + }, + { + inputs: [], + name: "StakingInTooManyCourts", + type: "error", + }, + { + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", + }, + { + inputs: [], + name: "StakingNotPossibeInThisCourt", + type: "error", + }, + { + inputs: [], + name: "StakingTransferFailed", + type: "error", + }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, + { + inputs: [], + name: "TokenNotAccepted", + type: "error", + }, + { + inputs: [], + name: "TransferFailed", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + 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: [ { - internalType: "string", - name: "_disputeTemplate", - type: "string", + indexed: true, + internalType: "contract IERC20", + name: "_token", + type: "address", }, { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", + indexed: true, + internalType: "bool", + name: "_accepted", + type: "bool", }, + ], + name: "AcceptedFeeToken", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_disputeID", type: "uint256", }, - ], - name: "createDisputeForTemplate", - outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - stateMutability: "payable", - type: "function", + name: "AppealDecision", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { + indexed: true, internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_disputeID", type: "uint256", }, - ], - name: "createDisputeForTemplateUri", - outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - stateMutability: "payable", - type: "function", + name: "AppealPossible", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "disputes", - outputs: [ { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", + indexed: true, + internalType: "uint96", + name: "_parent", + type: "uint96", }, { + indexed: false, internalType: "bool", - name: "isRuled", + name: "_hiddenVotes", type: "bool", }, { + indexed: false, internalType: "uint256", - name: "ruling", + name: "_minStake", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "numberOfRulingOptions", + 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[]", + }, ], - stateMutability: "view", - type: "function", + name: "CourtCreated", + type: "event", }, { - inputs: [], - name: "governor", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "address", - name: "", - type: "address", + 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", }, ], - stateMutability: "view", - type: "function", + 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: "_arbitratorDisputeID", + name: "_minStake", type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "_ruling", + 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: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "CourtModified", + type: "event", }, { - inputs: [], - name: "templateRegistry", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "DisputeCreation", + type: "event", }, - ], - }, - DisputeResolverRuler: { - address: "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", - abi: [ { + anonymous: false, inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", type: "address", }, ], - stateMutability: "nonpayable", - type: "constructor", + name: "DisputeKitCreated", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { indexed: true, internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_disputeKitID", type: "uint256", }, { - indexed: false, + indexed: true, + internalType: "bool", + name: "_enable", + type: "bool", + }, + ], + name: "DisputeKitEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "_disputeID", type: "uint256", }, { - indexed: false, + indexed: true, internalType: "uint256", - name: "_templateId", + name: "_roundID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_fromDisputeKitID", type: "uint256", }, { indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", + internalType: "uint256", + name: "_toDisputeKitID", + type: "uint256", }, ], - name: "DisputeRequest", + name: "DisputeKitJump", type: "event", }, { @@ -9511,8 +9336,8 @@ export default { inputs: [ { indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "address", + name: "_address", type: "address", }, { @@ -9524,349 +9349,414 @@ export default { { indexed: false, internalType: "uint256", - name: "_ruling", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_voteID", type: "uint256", }, ], - name: "Ruling", + name: "Draw", type: "event", }, { - inputs: [], - name: "arbitrator", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "contract IArbitratorV2", - name: "", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - stateMutability: "view", - type: "function", + name: "Initialized", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_roundID", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", - }, - ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + indexed: false, + internalType: "uint256", + name: "_pnkAmount", + type: "uint256", + }, { - internalType: "address", - name: "_governor", + indexed: false, + internalType: "uint256", + name: "_feeAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "LeftoverRewardSent", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + 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: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "NewCurrencyRate", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "string", - name: "_disputeTemplate", - type: "string", + indexed: false, + internalType: "enum KlerosCoreBase.Period", + name: "_period", + type: "uint8", }, + ], + name: "NewPeriod", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "string", - name: "_disputeTemplateDataMappings", - type: "string", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, { + indexed: true, internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_disputeID", type: "uint256", }, - ], - name: "createDisputeForTemplate", - outputs: [ { + indexed: false, internalType: "uint256", - name: "disputeID", + name: "_ruling", type: "uint256", }, ], - stateMutability: "payable", - type: "function", + name: "Ruling", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", + indexed: true, + internalType: "address", + name: "_account", + type: "address", }, { + indexed: true, internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_disputeID", type: "uint256", }, - ], - name: "createDisputeForTemplateUri", - outputs: [ { + indexed: true, internalType: "uint256", - name: "disputeID", + name: "_roundID", type: "uint256", }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_degreeOfCoherency", type: "uint256", }, - ], - name: "disputes", - outputs: [ - { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", - }, { - internalType: "bool", - name: "isRuled", - type: "bool", + indexed: false, + internalType: "int256", + name: "_pnkAmount", + type: "int256", }, { - internalType: "uint256", - name: "ruling", - type: "uint256", + indexed: false, + internalType: "int256", + name: "_feeAmount", + type: "int256", }, { - internalType: "uint256", - name: "numberOfRulingOptions", - type: "uint256", + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "TokenAndETHShift", + type: "event", }, { + anonymous: false, inputs: [], - name: "governor", - outputs: [ + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "", + name: "newImplementation", type: "address", }, ], - stateMutability: "view", + name: "Upgraded", + type: "event", + }, + { + inputs: [ + { + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_disputeID", type: "uint256", }, { internalType: "uint256", - name: "_ruling", + name: "_numberOfChoices", type: "uint256", }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - stateMutability: "view", + name: "appeal", + outputs: [], + stateMutability: "payable", type: "function", }, - ], - }, - DisputeResolverUniversity: { - address: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", - abi: [ { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, + ], + name: "appealCost", + outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", - type: "address", + internalType: "uint256", + name: "cost", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, + ], + name: "appealPeriod", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_arbitratorDisputeID", + name: "start", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_templateId", + name: "end", type: "uint256", }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, ], - name: "DisputeRequest", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, + ], + name: "arbitrationCost", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "cost", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "arbitrationCost", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_ruling", + name: "cost", type: "uint256", }, ], - name: "Ruling", - type: "event", + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "arbitrator", - outputs: [ + inputs: [ { - internalType: "contract IArbitratorV2", - name: "", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, + { + internalType: "bool", + name: "_accepted", + type: "bool", + }, ], - stateMutability: "view", + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, { internalType: "uint256", - name: "", + name: "_minStake", type: "uint256", }, - ], - name: "arbitratorDisputeIDToLocalID", - outputs: [ { internalType: "uint256", - name: "", + name: "_alpha", + type: "uint256", + }, + { + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "_jurorsForCourtJump", type: "uint256", }, + { + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, ], - stateMutability: "view", + name: "changeCourtParameters", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "contract IArbitratorV2", - name: "_arbitrator", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, + { + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", + }, ], - name: "changeArbitrator", + name: "changeCurrencyRates", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9874,7 +9764,7 @@ export default { { inputs: [ { - internalType: "address", + internalType: "address payable", name: "_governor", type: "address", }, @@ -9887,12 +9777,12 @@ export default { { inputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "_templateRegistry", + internalType: "address", + name: "_guardian", type: "address", }, ], - name: "changeTemplateRegistry", + name: "changeGuardian", outputs: [], stateMutability: "nonpayable", type: "function", @@ -9900,64 +9790,64 @@ export default { { 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", + internalType: "address", + name: "_jurorProsecutionModule", + type: "address", }, ], - name: "createDisputeForTemplate", - outputs: [ + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + internalType: "contract IERC20", + name: "_pinakion", + type: "address", }, ], - stateMutability: "payable", + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", + internalType: "contract ISortitionModule", + name: "_sortitionModule", + type: "address", }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", + internalType: "contract IERC20", + name: "_toToken", + type: "address", }, { internalType: "uint256", - name: "_numberOfRulingOptions", + name: "_amountInEth", type: "uint256", }, ], - name: "createDisputeForTemplateUri", + name: "convertEthToTokenAmount", outputs: [ { internalType: "uint256", - name: "disputeID", + name: "", type: "uint256", }, ], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { @@ -9968,40 +9858,42 @@ export default { type: "uint256", }, ], - name: "disputes", + name: "courts", outputs: [ { - internalType: "bytes", - name: "arbitratorExtraData", - type: "bytes", + internalType: "uint96", + name: "parent", + type: "uint96", }, { internalType: "bool", - name: "isRuled", + name: "hiddenVotes", type: "bool", }, { internalType: "uint256", - name: "ruling", + name: "minStake", type: "uint256", }, { internalType: "uint256", - name: "numberOfRulingOptions", + name: "alpha", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "jurorsForCourtJump", + type: "uint256", + }, + { + internalType: "bool", + name: "disabled", + type: "bool", }, ], stateMutability: "view", @@ -10009,201 +9901,139 @@ export default { }, { inputs: [ + { + internalType: "uint96", + name: "_parent", + type: "uint96", + }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, { internalType: "uint256", - name: "_arbitratorDisputeID", + name: "_minStake", type: "uint256", }, { internalType: "uint256", - name: "_ruling", + name: "_alpha", type: "uint256", }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "templateRegistry", - outputs: [ { - internalType: "contract IDisputeTemplateRegistry", - name: "", - type: "address", + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - DisputeTemplateRegistry: { - address: "0x596D3B09E684D62217682216e9b7a0De75933391", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + internalType: "bytes", + name: "_sortitionExtraData", + type: "bytes", + }, + { + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_templateId", + name: "_numberOfChoices", type: "uint256", }, { - indexed: true, - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_templateData", - type: "string", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, + ], + name: "createDispute", + outputs: [ { - indexed: false, - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - name: "DisputeTemplate", - type: "event", + stateMutability: "payable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, + { + internalType: "uint256", + name: "_feeAmount", + type: "uint256", + }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", + name: "createDispute", outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_governor", + internalType: "contract IERC20", + name: "", type: "address", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", + name: "currencyRates", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "bool", + name: "feePaymentAccepted", + type: "bool", + }, + { + internalType: "uint64", + name: "rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "rateDecimals", + type: "uint8", }, ], stateMutability: "view", @@ -10212,255 +10042,198 @@ export default { { inputs: [ { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, ], - name: "setDisputeTemplate", + name: "currentRuling", outputs: [ { internalType: "uint256", - name: "templateId", + name: "ruling", type: "uint256", }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [], - name: "templates", - outputs: [ + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], + name: "disputeKits", + outputs: [ + { + internalType: "contract IDisputeKit", + name: "", + type: "address", + }, + ], stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", + name: "disputes", outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint96", + name: "courtID", + type: "uint96", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_implementation", + internalType: "contract IArbitrableV2", + name: "arbitrated", type: "address", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "enum KlerosCoreBase.Period", + name: "period", + type: "uint8", }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - DisputeTemplateRegistry_Implementation: { - address: "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "bool", + name: "ruled", + type: "bool", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256", + name: "lastPeriodChange", + type: "uint256", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_templateId", + name: "_disputeID", 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", + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - name: "DisputeTemplate", - type: "event", + name: "draw", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256[]", + name: "_disputeKitIDs", + type: "uint256[]", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "bool", + name: "_enable", + type: "bool", }, ], - name: "changeGovernor", + name: "enableDisputeKits", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_round", + type: "uint256", + }, + { + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - stateMutability: "view", + name: "execute", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_destination", type: "address", }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, ], - name: "initialize", + name: "executeGovernorProposal", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "initialize2", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "executeRuling", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "getDisputeKitsLength", outputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], stateMutability: "view", @@ -10469,35 +10242,31 @@ export default { { inputs: [ { - internalType: "string", - name: "_templateTag", - type: "string", - }, - { - internalType: "string", - name: "_templateData", - type: "string", - }, - { - internalType: "string", - name: "_templateDataMappings", - type: "string", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, ], - name: "setDisputeTemplate", + name: "getNumberOfRounds", outputs: [ { internalType: "uint256", - name: "templateId", + name: "", type: "uint256", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [], - name: "templates", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "getNumberOfVotes", outputs: [ { internalType: "uint256", @@ -10511,187 +10280,179 @@ export default { { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint256", + name: "_round", + type: "uint256", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", + name: "getRoundInfo", outputs: [ { - internalType: "string", + 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: "string", + type: "tuple", }, ], stateMutability: "view", type: "function", }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0x596D3B09E684D62217682216e9b7a0De75933391", - abi: [ { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, + ], + name: "getTimesPerPeriod", + outputs: [ { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - EvidenceModule: { - address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ + name: "governor", + outputs: [ { internalType: "address", - name: "implementation", + name: "", type: "address", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ + name: "guardian", + outputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "address", + name: "", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - indexed: true, internalType: "address", - name: "_party", + name: "_governor", type: "address", }, { - indexed: false, - internalType: "string", - name: "_evidence", - type: "string", + internalType: "address", + name: "_guardian", + type: "address", }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "contract IERC20", + name: "_pinakion", + type: "address", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "_jurorProsecutionModule", type: "address", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", + internalType: "contract IDisputeKit", + name: "_disputeKit", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", + 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", }, ], @@ -10702,19 +10463,25 @@ export default { }, { inputs: [], - name: "initialize2", + name: "initialize3", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "proxiableUUID", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "isDisputeKitJumping", outputs: [ { - internalType: "bytes32", + internalType: "bool", name: "", - type: "bytes32", + type: "bool", }, ], stateMutability: "view", @@ -10723,47 +10490,35 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, + ], + name: "isSupported", + outputs: [ { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "version", + name: "jurorProsecutionModule", outputs: [ { - internalType: "string", + internalType: "address", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", @@ -10772,182 +10527,124 @@ export default { { inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, ], + name: "passPeriod", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, - ], - }, - EvidenceModule_Implementation: { - address: "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", - abi: [ { inputs: [], + name: "pause", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { inputs: [], - name: "AlreadyInitialized", - type: "error", + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", }, { inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ + name: "pinakion", + outputs: [ { - internalType: "address", - name: "implementation", + internalType: "contract IERC20", + name: "", type: "address", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", + stateMutability: "view", + type: "function", }, { inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ + name: "proxiableUUID", + outputs: [ { internalType: "bytes32", - name: "slot", + name: "", type: "bytes32", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + stateMutability: "view", + type: "function", }, { - 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", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "Evidence", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_newStake", + type: "uint256", }, ], - name: "Initialized", - type: "event", + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "newImplementation", + name: "_account", type: "address", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, + { + internalType: "bool", + name: "_alreadyTransferred", + type: "bool", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", + name: "setStakeBySortitionModule", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "sortitionModule", outputs: [ { - internalType: "bytes32", + internalType: "contract ISortitionModule", name: "", - type: "bytes32", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", - }, - { - internalType: "string", - name: "_evidence", - type: "string", - }, - ], - name: "submitEvidence", + inputs: [], + name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function", @@ -10983,11 +10680,6 @@ export default { stateMutability: "view", type: "function", }, - ], - }, - EvidenceModule_Proxy: { - address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", - abi: [ { inputs: [ { @@ -11004,18 +10696,10 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - KlerosCore: { - address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + KlerosCoreRuler: { + address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", abi: [ { stateMutability: "payable", @@ -11037,113 +10721,58 @@ export default { }, { inputs: [], - name: "AppealPeriodNotPassed", + name: "ArbitrationFeesNotEnough", type: "error", }, { inputs: [], - name: "ArbitrationFeesNotEnough", + name: "DisputeNotAppealable", type: "error", }, { inputs: [], - name: "CannotDisableClassicDK", + name: "FailedDelegateCall", type: "error", }, { inputs: [], - name: "CommitPeriodNotPassed", + name: "GovernorOnly", type: "error", }, { inputs: [], - name: "DisputeKitNotSupportedByCourt", + name: "GovernorOrInstructorOnly", type: "error", }, { inputs: [], - name: "DisputeKitOnly", + name: "InvalidForkingCourtAsParent", type: "error", }, { - inputs: [], - name: "DisputeNotAppealable", + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", type: "error", }, { inputs: [], - name: "DisputePeriodIsFinal", + name: "NoRulerSet", type: "error", }, { inputs: [], - name: "DisputeStillDrawing", + name: "NotInitializing", type: "error", }, { inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", + name: "RulerOnly", type: "error", }, { @@ -11153,32 +10782,7 @@ export default { }, { inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", + name: "RulingModeNotSet", type: "error", }, { @@ -11207,41 +10811,11 @@ export default { 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: [ @@ -11304,9 +10878,52 @@ export default { inputs: [ { indexed: true, - internalType: "uint96", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "enum KlerosCoreRuler.RulingMode", + name: "mode", + type: "uint8", + }, + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "tied", + type: "bool", + }, + { + indexed: false, + internalType: "bool", + name: "overridden", + type: "bool", + }, + ], + name: "AutoRuled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", name: "_courtID", - type: "uint96", + type: "uint256", }, { indexed: true, @@ -11350,12 +10967,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "CourtCreated", type: "event", @@ -11463,44 +11074,13 @@ export default { 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", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "DisputeKitEnabled", + name: "Initialized", type: "event", }, { @@ -11519,19 +11099,25 @@ export default { type: "uint256", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "_fromDisputeKitID", + name: "_pnkAmount", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_toDisputeKitID", + name: "_feeAmount", type: "uint256", }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, ], - name: "DisputeKitJump", + name: "LeftoverRewardSent", type: "event", }, { @@ -11539,43 +11125,43 @@ export default { inputs: [ { indexed: true, - internalType: "address", - name: "_address", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, { indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, { indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - name: "Draw", + name: "NewCurrencyRate", type: "event", }, { anonymous: false, inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, { indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "enum KlerosCoreRuler.Period", + name: "_period", + type: "uint8", }, ], - name: "Initialized", + name: "NewPeriod", type: "event", }, { @@ -11583,61 +11169,24 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, { 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", + internalType: "address", + name: "_oldRuler", type: "address", }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ { indexed: true, - internalType: "contract IERC20", - name: "_feeToken", + internalType: "address", + name: "_newRuler", type: "address", }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, ], - name: "NewCurrencyRate", + name: "RulerChanged", type: "event", }, { @@ -11645,24 +11194,40 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, { + components: [ + { + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", + }, + { + internalType: "uint256", + name: "presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "presetOverridden", + type: "bool", + }, + ], indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", + internalType: "struct KlerosCoreRuler.RulerSettings", + name: "_settings", + type: "tuple", }, ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", + name: "RulerSettingsChanged", type: "event", }, { @@ -11739,12 +11304,6 @@ export default { name: "TokenAndETHShift", type: "event", }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, { anonymous: false, inputs: [ @@ -11758,19 +11317,6 @@ export default { name: "Upgraded", type: "event", }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -11785,9 +11331,14 @@ export default { }, { internalType: "bytes", - name: "_extraData", + name: "", type: "bytes", }, + { + internalType: "bool", + name: "_jump", + type: "bool", + }, ], name: "appeal", outputs: [], @@ -11801,36 +11352,17 @@ export default { name: "_disputeID", type: "uint256", }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bool", + name: "_jump", + type: "bool", }, ], - name: "appealPeriod", + name: "appealCost", outputs: [ { internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", + name: "cost", type: "uint256", }, ], @@ -11980,25 +11512,30 @@ export default { { inputs: [ { - internalType: "address", - name: "_guardian", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, ], - name: "changeGuardian", + name: "changePinakion", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, { internalType: "address", - name: "_jurorProsecutionModule", + name: "_newRuler", type: "address", }, ], - name: "changeJurorProsecutionModule", + name: "changeRuler", outputs: [], stateMutability: "nonpayable", type: "function", @@ -12006,12 +11543,40 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + internalType: "uint256", + name: "_presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "_presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "_presetOverridden", + type: "bool", + }, + ], + name: "changeRulingModeToAutomaticPreset", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changePinakion", + name: "changeRulingModeToAutomaticRandom", outputs: [], stateMutability: "nonpayable", type: "function", @@ -12019,12 +11584,12 @@ export default { { inputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModule", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", type: "function", @@ -12139,16 +11704,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -12271,25 +11826,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -12311,7 +11847,7 @@ export default { type: "address", }, { - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", name: "period", type: "uint8", }, @@ -12320,11 +11856,6 @@ export default { name: "ruled", type: "bool", }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, ], stateMutability: "view", type: "function", @@ -12338,57 +11869,11 @@ export default { }, { internalType: "uint256", - name: "_iterations", + name: "_round", 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", + name: "execute", outputs: [], stateMutability: "nonpayable", type: "function", @@ -12423,6 +11908,21 @@ export default { name: "_disputeID", type: "uint256", }, + { + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], name: "executeRuling", outputs: [], @@ -12431,7 +11931,7 @@ export default { }, { inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [ { internalType: "uint256", @@ -12497,63 +11997,23 @@ export default { 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", + internalType: "struct KlerosCoreRuler.Round", name: "", type: "tuple", }, @@ -12593,19 +12053,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -12613,51 +12060,16 @@ export default { name: "_governor", type: "address", }, - { - internalType: "address", - name: "_guardian", - type: "address", - }, { internalType: "contract IERC20", name: "_pinakion", type: "address", }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, { internalType: "uint256[4]", name: "_courtParameters", type: "uint256[4]", }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, ], name: "initialize", outputs: [], @@ -12666,61 +12078,43 @@ export default { }, { inputs: [], - name: "initialize3", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", + name: "pinakion", outputs: [ { - internalType: "bool", + internalType: "contract IERC20", name: "", - type: "bool", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "jurorProsecutionModule", + inputs: [ + { + internalType: "contract IArbitrableV2", + name: "arbitrable", + type: "address", + }, + ], + name: "rulers", outputs: [ { internalType: "address", - name: "", + name: "ruler", type: "address", }, ], @@ -12731,29 +12125,25 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "disputeID", type: "uint256", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", + name: "rulingResults", outputs: [ + { + internalType: "uint256", + name: "ruling", + type: "uint256", + }, { internalType: "bool", - name: "", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", type: "bool", }, ], @@ -12761,97 +12151,39 @@ export default { type: "function", }, { - inputs: [], - name: "pinakion", - outputs: [ + inputs: [ { - internalType: "contract IERC20", - name: "", + internalType: "contract IArbitrableV2", + name: "arbitrable", type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", + name: "settings", 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: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", }, { internalType: "uint256", - name: "_newStake", + name: "presetRuling", type: "uint256", }, { internalType: "bool", - name: "_alreadyTransferred", + name: "presetTied", type: "bool", }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ { - internalType: "contract ISortitionModule", - name: "", - type: "address", + internalType: "bool", + name: "presetOverridden", + type: "bool", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -12870,19 +12202,6 @@ export default { stateMutability: "payable", type: "function", }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -12901,16 +12220,13 @@ export default { }, ], }, - KlerosCoreNeo: { - address: "0x26bf077037550e437605F07e25EfcAd510715C3A", + KlerosCoreRuler_Implementation: { + address: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -12922,71 +12238,16 @@ export default { 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", @@ -12999,12 +12260,7 @@ export default { }, { inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", + name: "GovernorOrInstructorOnly", type: "error", }, { @@ -13025,27 +12281,7 @@ export default { }, { inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEligibleForStaking", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", + name: "NoRulerSet", type: "error", }, { @@ -13055,42 +12291,17 @@ export default { }, { 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", + name: "RulerOnly", type: "error", }, { inputs: [], - name: "StakingNotPossibeInThisCourt", + name: "RulingAlreadyExecuted", type: "error", }, { inputs: [], - name: "StakingTransferFailed", + name: "RulingModeNotSet", type: "error", }, { @@ -13119,41 +12330,11 @@ export default { 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: [ @@ -13216,60 +12397,42 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, { indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", + internalType: "enum KlerosCoreRuler.RulingMode", + name: "mode", + type: "uint8", }, { - indexed: false, + indexed: true, internalType: "uint256", - name: "_minStake", + name: "_disputeID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_alpha", + name: "_ruling", type: "uint256", }, { indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", + internalType: "bool", + name: "tied", + type: "bool", }, { 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[]", + internalType: "bool", + name: "overridden", + type: "bool", }, ], - name: "CourtCreated", + name: "AutoRuled", type: "event", }, { @@ -13278,38 +12441,13 @@ export default { { indexed: true, internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", + name: "_courtID", 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", + name: "_parent", type: "uint96", }, { @@ -13349,7 +12487,7 @@ export default { type: "uint256[4]", }, ], - name: "CourtModified", + name: "CourtCreated", type: "event", }, { @@ -13361,33 +12499,26 @@ export default { 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", + name: "_roundID", type: "uint256", }, { indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", + }, + { + indexed: false, + internalType: "uint96", + name: "_toCourtID", + type: "uint96", }, ], - name: "DisputeKitCreated", + name: "CourtJump", type: "event", }, { @@ -13400,61 +12531,48 @@ export default { type: "uint96", }, { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, + indexed: false, internalType: "bool", - name: "_enable", + name: "_hiddenVotes", type: "bool", }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, + indexed: false, internalType: "uint256", - name: "_disputeID", + name: "_minStake", type: "uint256", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "_roundID", + name: "_alpha", type: "uint256", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "_fromDisputeKitID", + name: "_feeForJuror", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_toDisputeKitID", + name: "_jurorsForCourtJump", type: "uint256", }, + { + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, ], - name: "DisputeKitJump", + name: "CourtModified", type: "event", }, { anonymous: false, inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, { indexed: true, internalType: "uint256", @@ -13462,19 +12580,13 @@ export default { type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - name: "Draw", + name: "DisputeCreation", type: "event", }, { @@ -13563,7 +12675,7 @@ export default { }, { indexed: false, - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", name: "_period", type: "uint8", }, @@ -13573,8 +12685,68 @@ export default { }, { anonymous: false, - inputs: [], - name: "Paused", + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_oldRuler", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_newRuler", + type: "address", + }, + ], + name: "RulerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + components: [ + { + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", + }, + { + internalType: "uint256", + name: "presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "presetOverridden", + type: "bool", + }, + ], + indexed: false, + internalType: "struct KlerosCoreRuler.RulerSettings", + name: "_settings", + type: "tuple", + }, + ], + name: "RulerSettingsChanged", type: "event", }, { @@ -13651,12 +12823,6 @@ export default { name: "TokenAndETHShift", type: "event", }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, { anonymous: false, inputs: [ @@ -13670,19 +12836,6 @@ export default { name: "Upgraded", type: "event", }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -13697,9 +12850,14 @@ export default { }, { internalType: "bytes", - name: "_extraData", + name: "", type: "bytes", }, + { + internalType: "bool", + name: "_jump", + type: "bool", + }, ], name: "appeal", outputs: [], @@ -13713,6 +12871,11 @@ export default { name: "_disputeID", type: "uint256", }, + { + internalType: "bool", + name: "_jump", + type: "bool", + }, ], name: "appealCost", outputs: [ @@ -13728,64 +12891,21 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, - ], - name: "appealPeriod", - outputs: [ { - internalType: "uint256", - name: "start", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, + ], + name: "arbitrationCost", + outputs: [ { 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", + name: "cost", type: "uint256", }, ], @@ -13829,24 +12949,6 @@ export default { 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: [ { @@ -13929,12 +13031,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_guardian", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, ], - name: "changeGuardian", + name: "changePinakion", outputs: [], stateMutability: "nonpayable", type: "function", @@ -13942,12 +13044,17 @@ export default { { inputs: [ { - internalType: "contract IERC721", - name: "_jurorNft", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + internalType: "address", + name: "_newRuler", type: "address", }, ], - name: "changeJurorNft", + name: "changeRuler", outputs: [], stateMutability: "nonpayable", type: "function", @@ -13955,12 +13062,27 @@ export default { { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, + { + internalType: "uint256", + name: "_presetRuling", + type: "uint256", + }, + { + internalType: "bool", + name: "_presetTied", + type: "bool", + }, + { + internalType: "bool", + name: "_presetOverridden", + type: "bool", + }, ], - name: "changeJurorProsecutionModule", + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", type: "function", @@ -13968,12 +13090,12 @@ export default { { inputs: [ { - internalType: "contract IERC20", - name: "_pinakion", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changePinakion", + name: "changeRulingModeToAutomaticRandom", outputs: [], stateMutability: "nonpayable", type: "function", @@ -13981,12 +13103,12 @@ export default { { inputs: [ { - internalType: "contract ISortitionModule", - name: "_sortitionModule", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", type: "function", @@ -14101,16 +13223,6 @@ export default { name: "_timesPerPeriod", type: "uint256[4]", }, - { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -14233,25 +13345,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -14273,7 +13366,7 @@ export default { type: "address", }, { - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", name: "period", type: "uint8", }, @@ -14282,56 +13375,10 @@ export default { 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: [ { @@ -14344,11 +13391,6 @@ export default { name: "_round", type: "uint256", }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, ], name: "execute", outputs: [], @@ -14385,6 +13427,21 @@ export default { name: "_disputeID", type: "uint256", }, + { + internalType: "uint256", + name: "_ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], name: "executeRuling", outputs: [], @@ -14393,7 +13450,7 @@ export default { }, { inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [ { internalType: "uint256", @@ -14459,63 +13516,23 @@ export default { 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", + internalType: "struct KlerosCoreRuler.Round", name: "", type: "tuple", }, @@ -14555,19 +13572,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "guardian", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -14575,56 +13579,16 @@ export default { 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: [], @@ -14632,68 +13596,44 @@ export default { type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", + inputs: [], + name: "pinakion", outputs: [ { - internalType: "bool", + internalType: "contract IERC20", name: "", - type: "bool", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", + inputs: [], + name: "proxiableUUID", outputs: [ { - internalType: "bool", + internalType: "bytes32", name: "", - type: "bool", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "jurorNft", - outputs: [ + inputs: [ { - internalType: "contract IERC721", - name: "", + internalType: "contract IArbitrableV2", + name: "arbitrable", type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", + name: "rulers", outputs: [ { internalType: "address", - name: "", + name: "ruler", type: "address", }, ], @@ -14704,56 +13644,26 @@ export default { inputs: [ { internalType: "uint256", - name: "_disputeID", + name: "disputeID", type: "uint256", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "paused", + name: "rulingResults", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "ruling", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ { - internalType: "contract IERC20", - name: "", - type: "address", + internalType: "bool", + name: "tied", + type: "bool", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "bool", + name: "overridden", + type: "bool", }, ], stateMutability: "view", @@ -14762,69 +13672,37 @@ export default { { 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", + internalType: "contract IArbitrableV2", + name: "arbitrable", type: "address", }, + ], + name: "settings", + outputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "enum KlerosCoreRuler.RulingMode", + name: "rulingMode", + type: "uint8", }, { internalType: "uint256", - name: "_newStake", + name: "presetRuling", type: "uint256", }, { internalType: "bool", - name: "_alreadyTransferred", + name: "presetTied", type: "bool", }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ { - internalType: "contract ISortitionModule", - name: "", - type: "address", + internalType: "bool", + name: "presetOverridden", + type: "bool", }, ], stateMutability: "view", type: "function", }, - { - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -14843,6 +13721,11 @@ export default { stateMutability: "payable", type: "function", }, + ], + }, + KlerosCoreRuler_Proxy: { + address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", + abi: [ { inputs: [ { @@ -14859,36 +13742,178 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - KlerosCoreNeo_Implementation: { - address: "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", + KlerosCoreSnapshotProxy: { + address: "0xa2425b724B32D40cbB85ea6e181cfb023CE9c014", abi: [ { - inputs: [], + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], stateMutability: "nonpayable", type: "constructor", }, { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "totalStaked", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - inputs: [], - name: "ArbitrableNotWhitelisted", - type: "error", - }, + inputs: [ + { + internalType: "contract IKlerosCore", + name: "_core", + type: "address", + }, + ], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "core", + outputs: [ + { + internalType: "contract IKlerosCore", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + KlerosCoreUniversity: { + address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AllJurorsDrawn", + type: "error", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AppealFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodNotPassed", + type: "error", + }, { inputs: [], name: "ArbitrationFeesNotEnough", @@ -14956,7 +13981,12 @@ export default { }, { inputs: [], - name: "GuardianOrGovernorOnly", + name: "GovernorOrInstructorOnly", + type: "error", + }, + { + inputs: [], + name: "InstructorOnly", type: "error", }, { @@ -14992,7 +14022,7 @@ export default { }, { inputs: [], - name: "NotEligibleForStaking", + name: "NoJurorDrawn", type: "error", }, { @@ -15030,16 +14060,6 @@ export default { name: "StakingLessThanCourtMinStake", type: "error", }, - { - inputs: [], - name: "StakingMoreThanMaxStakePerJuror", - type: "error", - }, - { - inputs: [], - name: "StakingMoreThanMaxTotalStaked", - type: "error", - }, { inputs: [], name: "StakingNotPossibeInThisCourt", @@ -15092,8391 +14112,553 @@ export default { 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", - }, - ], - }, - KlerosCoreNeo_Proxy: { - address: "0x26bf077037550e437605F07e25EfcAd510715C3A", - 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", - }, - ], - }, - KlerosCoreRuler: { - address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NoRulerSet", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulerOnly", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "RulingModeNotSet", - 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: "UnsuccessfulCall", - 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: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - 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]", - }, - ], - 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: 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 KlerosCoreRuler.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "RulerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", - }, - ], - name: "RulerSettingsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToManual", - 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]", - }, - ], - 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: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreRuler.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - 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", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getNextDisputeID", - 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: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - ], - internalType: "struct KlerosCoreRuler.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "rulers", - outputs: [ - { - internalType: "address", - name: "ruler", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - name: "rulingResults", - 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: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreRuler_Implementation: { - address: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NoRulerSet", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulerOnly", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "RulingModeNotSet", - 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: "UnsuccessfulCall", - 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: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "enum KlerosCoreRuler.RulingMode", - name: "mode", - type: "uint8", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "tied", - type: "bool", - }, - { - indexed: false, - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "AutoRuled", - 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]", - }, - ], - 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: 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 KlerosCoreRuler.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_oldRuler", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "RulerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - components: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - indexed: false, - internalType: "struct KlerosCoreRuler.RulerSettings", - name: "_settings", - type: "tuple", - }, - ], - name: "RulerSettingsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "bool", - name: "_jump", - type: "bool", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "address", - name: "_newRuler", - type: "address", - }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - internalType: "uint256", - name: "_presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "_presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "_presetOverridden", - type: "bool", - }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "changeRulingModeToManual", - 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]", - }, - ], - 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: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreRuler.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - 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", - }, - { - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getNextDisputeID", - 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: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - ], - internalType: "struct KlerosCoreRuler.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "rulers", - outputs: [ - { - internalType: "address", - name: "ruler", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - name: "rulingResults", - 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: "contract IArbitrableV2", - name: "arbitrable", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - internalType: "enum KlerosCoreRuler.RulingMode", - name: "rulingMode", - type: "uint8", - }, - { - internalType: "uint256", - name: "presetRuling", - type: "uint256", - }, - { - internalType: "bool", - name: "presetTied", - type: "bool", - }, - { - internalType: "bool", - name: "presetOverridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - KlerosCoreRuler_Proxy: { - address: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", - 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", - }, - ], - }, - KlerosCoreSnapshotProxy: { - address: "0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091", - abi: [ - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IKlerosCore", - name: "_core", - type: "address", - }, - ], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ - { - internalType: "contract IKlerosCore", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - ], - }, - KlerosCoreUniversity: { - address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AllJurorsDrawn", - type: "error", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NoJurorDrawn", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreUniversity.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_instructor", - type: "address", - }, - ], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", - }, - { - internalType: "bool", - name: "hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - name: "currencyRates", - outputs: [ - { - internalType: "bool", - name: "feePaymentAccepted", - type: "bool", - }, - { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "currentRuling", - outputs: [ - { - internalType: "uint256", - name: "ruling", - type: "uint256", - }, - { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputeKits", - outputs: [ - { - internalType: "contract IDisputeKit", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "contract IArbitrableV2", - name: "arbitrated", - type: "address", - }, - { - internalType: "enum KlerosCoreUniversity.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "address", - name: "_juror", - type: "address", - }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - { - internalType: "uint256", - name: "_iterations", - type: "uint256", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_destination", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfRounds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "getNumberOfVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_round", - type: "uint256", - }, - ], - name: "getRoundInfo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreUniversity.Round", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - ], - name: "getTimesPerPeriod", - outputs: [ - { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "address", - name: "_instructor", - type: "address", - }, - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModuleAddress", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "instructor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "isDisputeKitJumping", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pinakion", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", - }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "sortitionModule", - outputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_implementation", - type: "address", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - KlerosCoreUniversity_Implementation: { - address: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AllJurorsDrawn", - type: "error", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InstructorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NoJurorDrawn", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - inputs: [], - name: "UnstakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "UnsuccessfulCall", - type: "error", - }, - { - inputs: [], - name: "UnsupportedDisputeKit", - type: "error", - }, - { - inputs: [], - name: "VotePeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "WrongDisputeKitIndex", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_token", - type: "address", - }, - { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "AcceptedFeeToken", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "AppealPossible", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_courtID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_parent", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "_supportedDisputeKits", - type: "uint256[]", - }, - ], - name: "CourtCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", - }, - { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", - }, - ], - name: "CourtJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - ], - name: "DisputeCreation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "DisputeKitCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", - }, - { - indexed: true, - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "DisputeKitEnabled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_fromDisputeKitID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_toDisputeKitID", - type: "uint256", - }, - ], - name: "DisputeKitJump", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_voteID", - type: "uint256", - }, - ], - name: "Draw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_pnkAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_feeAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "LeftoverRewardSent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "enum KlerosCoreUniversity.Period", - name: "_period", - type: "uint8", - }, - ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", - }, - ], - name: "Ruling", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_account", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", - }, - { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", - }, - { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", - }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - ], - name: "appealPeriod", - outputs: [ - { - internalType: "uint256", - name: "start", - type: "uint256", - }, - { - internalType: "uint256", - name: "end", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ - { - internalType: "uint256", - name: "cost", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "bool", - name: "_accepted", - type: "bool", - }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256", - name: "_minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "_alpha", - type: "uint256", - }, - { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_jurorsForCourtJump", - type: "uint256", - }, - { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", - }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_instructor", - type: "address", - }, - ], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IERC20", - name: "_toToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + inputs: [], + name: "VotePeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "WrongDisputeKitIndex", + type: "error", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "courts", - outputs: [ - { - internalType: "uint96", - name: "parent", - type: "uint96", + indexed: true, + internalType: "contract IERC20", + name: "_token", + type: "address", }, { + indexed: true, internalType: "bool", - name: "hiddenVotes", + name: "_accepted", type: "bool", }, + ], + name: "AcceptedFeeToken", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "minStake", - type: "uint256", - }, - { - internalType: "uint256", - name: "alpha", + name: "_disputeID", type: "uint256", }, { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, + ], + name: "AppealDecision", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "jurorsForCourtJump", + name: "_disputeID", type: "uint256", }, { - internalType: "bool", - name: "disabled", - type: "bool", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - stateMutability: "view", - type: "function", + 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: "createCourt", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "CourtCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "createDispute", - outputs: [ - { - internalType: "uint256", - name: "disputeID", + name: "_disputeID", type: "uint256", }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ { + indexed: true, internalType: "uint256", - name: "_numberOfChoices", + name: "_roundID", type: "uint256", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", - type: "uint256", + indexed: true, + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", }, - ], - name: "createDispute", - outputs: [ { - internalType: "uint256", - name: "disputeID", - type: "uint256", + indexed: false, + internalType: "uint96", + name: "_toCourtID", + type: "uint96", }, ], - stateMutability: "nonpayable", - type: "function", + name: "CourtJump", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "contract IERC20", - name: "", - type: "address", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "currencyRates", - outputs: [ { + indexed: false, internalType: "bool", - name: "feePaymentAccepted", + name: "_hiddenVotes", type: "bool", }, { - internalType: "uint64", - name: "rateInEth", - type: "uint64", - }, - { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { + indexed: false, internalType: "uint256", - name: "_disputeID", + name: "_minStake", type: "uint256", }, - ], - name: "currentRuling", - outputs: [ { + indexed: false, internalType: "uint256", - name: "ruling", + name: "_alpha", type: "uint256", }, { - internalType: "bool", - name: "tied", - type: "bool", - }, - { - internalType: "bool", - name: "overridden", - type: "bool", + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_jurorsForCourtJump", type: "uint256", }, - ], - name: "disputeKits", - outputs: [ { - internalType: "contract IDisputeKit", - name: "", - type: "address", + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, ], - stateMutability: "view", - type: "function", + name: "CourtModified", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, { + indexed: true, internalType: "contract IArbitrableV2", - name: "arbitrated", + name: "_arbitrable", type: "address", }, - { - internalType: "enum KlerosCoreUniversity.Period", - name: "period", - type: "uint8", - }, - { - internalType: "bool", - name: "ruled", - type: "bool", - }, - { - internalType: "uint256", - name: "lastPeriodChange", - type: "uint256", - }, ], - stateMutability: "view", - type: "function", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_disputeKitID", type: "uint256", }, { - internalType: "address", - name: "_juror", + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", type: "address", }, ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeKitCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint96", name: "_courtID", type: "uint96", }, { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, { + indexed: true, internalType: "bool", name: "_enable", type: "bool", }, ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeKitEnabled", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, { + indexed: true, internalType: "uint256", - name: "_round", + name: "_roundID", type: "uint256", }, { + indexed: true, internalType: "uint256", - name: "_iterations", + name: "_fromDisputeKitID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_toDisputeKitID", type: "uint256", }, ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeKitJump", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_destination", + name: "_address", type: "address", }, { + indexed: true, internalType: "uint256", - name: "_amount", + name: "_disputeID", type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "_roundID", + type: "uint256", }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "_disputeID", + name: "_voteID", type: "uint256", }, ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Draw", + type: "event", }, { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - stateMutability: "view", - type: "function", + name: "Initialized", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, - ], - name: "getNumberOfRounds", - outputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_roundID", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "_disputeID", + name: "_pnkAmount", type: "uint256", }, - ], - name: "getNumberOfVotes", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_feeAmount", type: "uint256", }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, ], - stateMutability: "view", - type: "function", + name: "LeftoverRewardSent", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + indexed: true, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, { - internalType: "uint256", - name: "_round", - type: "uint256", + indexed: false, + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, - ], - name: "getRoundInfo", - outputs: [ { - components: [ - { - internalType: "uint256", - name: "disputeKitID", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkAtStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "totalFeesForJurors", - type: "uint256", - }, - { - internalType: "uint256", - name: "nbVotes", - type: "uint256", - }, - { - internalType: "uint256", - name: "repartitions", - type: "uint256", - }, - { - internalType: "uint256", - name: "pnkPenalties", - type: "uint256", - }, - { - internalType: "address[]", - name: "drawnJurors", - type: "address[]", - }, - { - internalType: "uint256", - name: "sumFeeRewardPaid", - type: "uint256", - }, - { - internalType: "uint256", - name: "sumPnkRewardPaid", - type: "uint256", - }, - { - internalType: "contract IERC20", - name: "feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "drawIterations", - type: "uint256", - }, - ], - internalType: "struct KlerosCoreUniversity.Round", - name: "", - type: "tuple", + indexed: false, + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - stateMutability: "view", - type: "function", + name: "NewCurrencyRate", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, - ], - name: "getTimesPerPeriod", - outputs: [ { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", + indexed: false, + internalType: "enum KlerosCoreUniversity.Period", + name: "_period", + type: "uint8", }, ], - stateMutability: "view", - type: "function", + name: "NewPeriod", + type: "event", }, { - inputs: [], - name: "governor", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "address", - name: "", + 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", + }, ], - stateMutability: "view", - type: "function", + name: "Ruling", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_governor", + name: "_account", type: "address", }, { - internalType: "address", - name: "_instructor", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", }, { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", + indexed: false, + internalType: "uint256", + name: "_degreeOfCoherency", + type: "uint256", }, { - internalType: "contract IDisputeKit", - name: "_disputeKit", - type: "address", + indexed: false, + internalType: "int256", + name: "_pnkAmount", + type: "int256", }, { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", + indexed: false, + internalType: "int256", + name: "_feeAmount", + type: "int256", }, { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, + ], + name: "TokenAndETHShift", + type: "event", + }, + { + anonymous: false, + inputs: [ { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [ { - internalType: "contract ISortitionModuleUniversity", - name: "_sortitionModuleAddress", + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", type: "address", }, ], - name: "initialize", + name: "addNewDisputeKit", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "instructor", - outputs: [ + inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - stateMutability: "view", + name: "appeal", + outputs: [], + stateMutability: "payable", type: "function", }, { @@ -23487,12 +14669,12 @@ export default { type: "uint256", }, ], - name: "isDisputeKitJumping", + name: "appealCost", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "cost", + type: "uint256", }, ], stateMutability: "view", @@ -23500,78 +14682,87 @@ export default { }, { inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, { internalType: "uint256", - name: "_disputeKitID", + name: "_disputeID", type: "uint256", }, ], - name: "isSupported", + name: "appealPeriod", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "start", + type: "uint256", + }, + { + internalType: "uint256", + name: "end", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "jurorProsecutionModule", - outputs: [ + inputs: [ { - internalType: "address", - name: "", + 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: "_disputeID", + name: "cost", type: "uint256", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [], - name: "pinakion", - outputs: [ + inputs: [ { internalType: "contract IERC20", - name: "", + name: "_feeToken", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "bool", + name: "_accepted", + type: "bool", }, ], - stateMutability: "view", + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -23581,13 +14772,38 @@ export default { name: "_courtID", type: "uint96", }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, { internalType: "uint256", - name: "_newStake", + 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: "setStake", + name: "changeCourtParameters", outputs: [], stateMutability: "nonpayable", type: "function", @@ -23595,868 +14811,714 @@ export default { { inputs: [ { - internalType: "address", - name: "_account", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - name: "setStakeBySortitionModule", + name: "changeCurrencyRates", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "sortitionModule", - outputs: [ + inputs: [ { - internalType: "contract ISortitionModuleUniversity", - name: "", + internalType: "address payable", + name: "_governor", type: "address", }, ], - stateMutability: "view", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "newImplementation", + name: "_instructor", type: "address", }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, ], - name: "upgradeToAndCall", + name: "changeInstructor", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, - ], - }, - KlerosCoreUniversity_Proxy: { - address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", - abi: [ { inputs: [ { internalType: "address", - name: "_implementation", + name: "_jurorProsecutionModule", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], + name: "changeJurorProsecutionModule", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - KlerosCore_Implementation: { - address: "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "AppealFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "AppealPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "ArbitrationFeesNotEnough", - type: "error", - }, - { - inputs: [], - name: "CannotDisableClassicDK", - type: "error", - }, - { - inputs: [], - name: "CommitPeriodNotPassed", - type: "error", - }, - { - inputs: [], - name: "DisputeKitNotSupportedByCourt", - type: "error", - }, - { - inputs: [], - name: "DisputeKitOnly", - type: "error", - }, - { - inputs: [], - name: "DisputeNotAppealable", - type: "error", - }, - { - inputs: [], - name: "DisputePeriodIsFinal", - type: "error", - }, - { - inputs: [], - name: "DisputeStillDrawing", - type: "error", - }, - { - inputs: [], - name: "EvidenceNotPassedAndNotAppeal", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GuardianOrGovernorOnly", - type: "error", - }, - { - inputs: [], - name: "InvalidDisputKitParent", - type: "error", - }, - { - inputs: [], - name: "InvalidForkingCourtAsParent", - type: "error", + type: "function", }, { inputs: [ { - internalType: "address", - name: "implementation", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "MinStakeLowerThanParentCourt", - type: "error", - }, - { - inputs: [], - name: "MustSupportDisputeKitClassic", - type: "error", - }, - { - inputs: [], - name: "NotEvidencePeriod", - type: "error", - }, - { - inputs: [], - name: "NotExecutionPeriod", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "RulingAlreadyExecuted", - type: "error", - }, - { - inputs: [], - name: "SortitionModuleOnly", - type: "error", - }, - { - inputs: [], - name: "StakingInTooManyCourts", - type: "error", - }, - { - inputs: [], - name: "StakingLessThanCourtMinStake", - type: "error", - }, - { - inputs: [], - name: "StakingNotPossibeInThisCourt", - type: "error", - }, - { - inputs: [], - name: "StakingTransferFailed", - type: "error", - }, - { - inputs: [], - name: "StakingZeroWhenNoStake", - type: "error", - }, - { - inputs: [], - name: "TokenNotAccepted", - type: "error", - }, - { - inputs: [], - name: "TransferFailed", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { 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", + internalType: "contract ISortitionModuleUniversity", + name: "_sortitionModule", + type: "address", + }, + ], + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "contract IERC20", - name: "_token", + name: "_toToken", type: "address", }, { - indexed: true, - internalType: "bool", - name: "_accepted", - type: "bool", + internalType: "uint256", + name: "_amountInEth", + type: "uint256", }, ], - name: "AcceptedFeeToken", - type: "event", + name: "convertEthToTokenAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "", type: "uint256", }, + ], + name: "courts", + outputs: [ { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint96", + name: "parent", + type: "uint96", + }, + { + internalType: "bool", + name: "hiddenVotes", + type: "bool", }, - ], - name: "AppealDecision", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "minStake", type: "uint256", }, { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint256", + name: "alpha", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "jurorsForCourtJump", + type: "uint256", + }, + { + internalType: "bool", + name: "disabled", + type: "bool", }, ], - name: "AppealPossible", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: true, internalType: "uint96", name: "_parent", type: "uint96", }, { - indexed: false, internalType: "bool", name: "_hiddenVotes", type: "bool", }, { - indexed: false, internalType: "uint256", name: "_minStake", type: "uint256", }, { - indexed: false, internalType: "uint256", name: "_alpha", type: "uint256", }, { - indexed: false, internalType: "uint256", name: "_feeForJuror", type: "uint256", }, { - indexed: false, internalType: "uint256", name: "_jurorsForCourtJump", type: "uint256", }, { - indexed: false, internalType: "uint256[4]", name: "_timesPerPeriod", type: "uint256[4]", }, { - indexed: false, internalType: "uint256[]", name: "_supportedDisputeKits", type: "uint256[]", }, ], - name: "CourtCreated", - type: "event", + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_numberOfChoices", type: "uint256", }, { - indexed: true, + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "createDispute", + outputs: [ + { internalType: "uint256", - name: "_roundID", + name: "disputeID", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_numberOfChoices", type: "uint256", }, { - indexed: true, - internalType: "uint96", - name: "_fromCourtID", - type: "uint96", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, { - indexed: false, - internalType: "uint96", - name: "_toCourtID", - type: "uint96", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "_feeAmount", + type: "uint256", }, ], - name: "CourtJump", - type: "event", + name: "createDispute", + outputs: [ + { + internalType: "uint256", + name: "disputeID", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "contract IERC20", + name: "", + type: "address", }, + ], + name: "currencyRates", + outputs: [ { - indexed: false, internalType: "bool", - name: "_hiddenVotes", + name: "feePaymentAccepted", type: "bool", }, { - indexed: false, + internalType: "uint64", + name: "rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "rateDecimals", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", - name: "_minStake", + name: "_disputeID", type: "uint256", }, + ], + name: "currentRuling", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_alpha", + name: "ruling", type: "uint256", }, { - indexed: false, + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", - name: "_feeForJuror", + name: "", type: "uint256", }, + ], + name: "disputeKits", + outputs: [ + { + internalType: "contract IDisputeKit", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_jurorsForCourtJump", + name: "", type: "uint256", }, + ], + name: "disputes", + outputs: [ + { + internalType: "uint96", + name: "courtID", + type: "uint96", + }, + { + internalType: "contract IArbitrableV2", + name: "arbitrated", + type: "address", + }, + { + internalType: "enum KlerosCoreUniversity.Period", + name: "period", + type: "uint8", + }, { - indexed: false, - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "bool", + name: "ruled", + type: "bool", }, - ], - name: "CourtModified", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "lastPeriodChange", type: "uint256", }, - { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", - }, ], - name: "DisputeCreation", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeKitID", + name: "_disputeID", type: "uint256", }, { - indexed: true, - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", + internalType: "address", + name: "_juror", type: "address", }, ], - name: "DisputeKitCreated", - type: "event", + name: "draw", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint96", name: "_courtID", type: "uint96", }, { - indexed: true, - internalType: "uint256", - name: "_disputeKitID", - type: "uint256", + internalType: "uint256[]", + name: "_disputeKitIDs", + type: "uint256[]", }, { - indexed: true, internalType: "bool", name: "_enable", type: "bool", }, ], - name: "DisputeKitEnabled", - type: "event", + name: "enableDisputeKits", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - 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", + name: "_round", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_toDisputeKitID", + name: "_iterations", type: "uint256", }, ], - name: "DisputeKitJump", - type: "event", + name: "execute", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_destination", type: "address", }, { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_amount", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_voteID", + name: "_disputeID", type: "uint256", }, ], - name: "Draw", - type: "event", + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "getDisputeKitsLength", + outputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Initialized", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, + ], + name: "getNumberOfRounds", + outputs: [ { - indexed: true, internalType: "uint256", - name: "_roundID", + name: "", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - indexed: false, internalType: "uint256", - name: "_pnkAmount", + name: "_disputeID", type: "uint256", }, + ], + name: "getNumberOfVotes", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_feeAmount", + name: "", type: "uint256", }, - { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, ], - name: "LeftoverRewardSent", - type: "event", + stateMutability: "view", + type: "function", }, { - 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", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, - ], - name: "NewCurrencyRate", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_round", type: "uint256", }, + ], + name: "getRoundInfo", + outputs: [ { - indexed: false, - internalType: "enum KlerosCoreBase.Period", - name: "_period", - type: "uint8", + components: [ + { + internalType: "uint256", + name: "disputeKitID", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkAtStakePerJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalFeesForJurors", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "repartitions", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkPenalties", + type: "uint256", + }, + { + internalType: "address[]", + name: "drawnJurors", + type: "address[]", + }, + { + internalType: "uint256", + name: "sumFeeRewardPaid", + type: "uint256", + }, + { + internalType: "uint256", + name: "sumPnkRewardPaid", + type: "uint256", + }, + { + internalType: "contract IERC20", + name: "feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "drawIterations", + type: "uint256", + }, + ], + internalType: "struct KlerosCoreUniversity.Round", + name: "", + type: "tuple", }, ], - name: "NewPeriod", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Paused", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "contract IArbitrableV2", - name: "_arbitrable", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, + ], + name: "getTimesPerPeriod", + outputs: [ { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_ruling", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "Ruling", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_account", + name: "_governor", type: "address", }, { - indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "address", + name: "_instructor", + type: "address", }, { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", + internalType: "contract IERC20", + name: "_pinakion", + type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_degreeOfCoherency", - type: "uint256", + internalType: "address", + name: "_jurorProsecutionModule", + type: "address", }, { - indexed: false, - internalType: "int256", - name: "_pnkAmount", - type: "int256", + internalType: "contract IDisputeKit", + name: "_disputeKit", + type: "address", }, { - indexed: false, - internalType: "int256", - name: "_feeAmount", - type: "int256", + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, { - indexed: false, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", }, - ], - name: "TokenAndETHShift", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "contract IDisputeKit", - name: "_disputeKitAddress", + internalType: "contract ISortitionModuleUniversity", + name: "_sortitionModuleAddress", type: "address", }, ], - name: "addNewDisputeKit", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "uint256", - name: "_disputeID", - type: "uint256", - }, - { - internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, + inputs: [], + name: "instructor", + outputs: [ { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "address", + name: "", + type: "address", }, ], - name: "appeal", - outputs: [], - stateMutability: "payable", + stateMutability: "view", type: "function", }, { @@ -24467,12 +15529,12 @@ export default { type: "uint256", }, ], - name: "appealCost", + name: "isDisputeKitJumping", outputs: [ { - internalType: "uint256", - name: "cost", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], stateMutability: "view", @@ -24481,46 +15543,35 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "appealPeriod", - outputs: [ { internalType: "uint256", - name: "start", + name: "_disputeKitID", type: "uint256", }, + ], + name: "isSupported", + outputs: [ { - internalType: "uint256", - name: "end", - type: "uint256", + 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", + inputs: [], + name: "jurorProsecutionModule", outputs: [ { - internalType: "uint256", - name: "cost", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], stateMutability: "view", @@ -24528,39 +15579,41 @@ export default { }, { inputs: [ - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - ], - name: "arbitrationCost", - outputs: [ { internalType: "uint256", - name: "cost", + name: "_disputeID", type: "uint256", }, ], - stateMutability: "view", + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "pinakion", + outputs: [ { internalType: "contract IERC20", - name: "_feeToken", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ { - internalType: "bool", - name: "_accepted", - type: "bool", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -24570,770 +15623,867 @@ export default { name: "_courtID", type: "uint96", }, - { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, { internalType: "uint256", - name: "_minStake", + name: "_newStake", type: "uint256", }, + ], + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_alpha", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, { - internalType: "uint256", - name: "_feeForJuror", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { internalType: "uint256", - name: "_jurorsForCourtJump", + name: "_newStake", type: "uint256", }, { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "bool", + name: "_alreadyTransferred", + type: "bool", }, ], - name: "changeCourtParameters", + name: "setStakeBySortitionModule", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "sortitionModule", + outputs: [ { - internalType: "contract IERC20", - name: "_feeToken", + internalType: "contract ISortitionModuleUniversity", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "uint64", - name: "_rateInEth", - type: "uint64", + internalType: "address", + name: "newImplementation", + type: "address", }, { - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "changeCurrencyRates", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "address payable", - name: "_governor", + internalType: "address", + name: "_implementation", type: "address", }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, ], - name: "changeGovernor", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", + }, + ], + }, + KlerosCoreUniversity_Implementation: { + address: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AllJurorsDrawn", + type: "error", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AppealFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "ArbitrationFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "ArraysLengthMismatch", + type: "error", + }, + { + inputs: [], + name: "CannotDisableClassicDK", + type: "error", + }, + { + inputs: [], + name: "CommitPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "DepthLevelMax", + type: "error", + }, + { + inputs: [], + name: "DisputeKitNotSupportedByCourt", + type: "error", + }, + { + inputs: [], + name: "DisputeKitOnly", + type: "error", + }, + { + inputs: [], + name: "DisputeNotAppealable", + type: "error", + }, + { + inputs: [], + name: "DisputePeriodIsFinal", + type: "error", + }, + { + inputs: [], + name: "DisputeStillDrawing", + type: "error", + }, + { + inputs: [], + name: "EvidenceNotPassedAndNotAppeal", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [], + name: "GovernorOnly", + type: "error", + }, + { + inputs: [], + name: "GovernorOrInstructorOnly", + type: "error", + }, + { + inputs: [], + name: "InstructorOnly", + type: "error", + }, + { + inputs: [], + name: "InvalidDisputKitParent", + type: "error", + }, + { + inputs: [], + name: "InvalidForkingCourtAsParent", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "MinStakeLowerThanParentCourt", + type: "error", + }, + { + inputs: [], + name: "MustSupportDisputeKitClassic", + type: "error", + }, + { + inputs: [], + name: "NoJurorDrawn", + type: "error", + }, + { + inputs: [], + name: "NotEvidencePeriod", + type: "error", + }, + { + inputs: [], + name: "NotExecutionPeriod", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "RulingAlreadyExecuted", + type: "error", + }, + { + inputs: [], + name: "SortitionModuleOnly", + type: "error", + }, + { + inputs: [], + name: "StakingInTooManyCourts", + type: "error", + }, + { + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", + }, + { + inputs: [], + name: "StakingNotPossibeInThisCourt", + type: "error", + }, + { + inputs: [], + name: "StakingTransferFailed", + type: "error", + }, + { + inputs: [], + name: "TokenNotAccepted", + type: "error", + }, + { + inputs: [], + name: "TransferFailed", + type: "error", }, { - inputs: [ - { - internalType: "address", - name: "_guardian", - type: "address", - }, - ], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", - type: "address", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { - inputs: [ - { - internalType: "contract IERC20", - name: "_pinakion", - type: "address", - }, - ], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "UnstakingTransferFailed", + type: "error", }, { - inputs: [ - { - internalType: "contract ISortitionModule", - name: "_sortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "UnsuccessfulCall", + type: "error", + }, + { + inputs: [], + name: "UnsupportedDisputeKit", + type: "error", + }, + { + inputs: [], + name: "VotePeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "WrongDisputeKitIndex", + type: "error", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "contract IERC20", - name: "_toToken", + name: "_token", type: "address", }, { - internalType: "uint256", - name: "_amountInEth", - type: "uint256", - }, - ], - name: "convertEthToTokenAmount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "bool", + name: "_accepted", + type: "bool", }, ], - stateMutability: "view", - type: "function", + name: "AcceptedFeeToken", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, 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", + name: "_disputeID", type: "uint256", }, { - internalType: "uint256", - name: "feeForJuror", - type: "uint256", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, + ], + name: "AppealDecision", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "jurorsForCourtJump", + name: "_disputeID", type: "uint256", }, { - internalType: "bool", - name: "disabled", - type: "bool", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - stateMutability: "view", - type: "function", + 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]", }, { - internalType: "bytes", - name: "_sortitionExtraData", - type: "bytes", - }, - { + indexed: false, 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", + name: "CourtCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_numberOfChoices", - type: "uint256", - }, - { - internalType: "bytes", - name: "_extraData", - type: "bytes", - }, - { - internalType: "contract IERC20", - name: "_feeToken", - type: "address", - }, - { - internalType: "uint256", - name: "_feeAmount", + name: "_disputeID", type: "uint256", }, - ], - name: "createDispute", - outputs: [ { + indexed: true, internalType: "uint256", - name: "disputeID", + name: "_roundID", 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", + indexed: true, + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", }, { - internalType: "uint8", - name: "rateDecimals", - type: "uint8", + indexed: false, + internalType: "uint96", + name: "_toCourtID", + type: "uint96", }, ], - stateMutability: "view", - type: "function", + name: "CourtJump", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "uint256", - name: "_disputeID", - type: "uint256", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, - ], - name: "currentRuling", - outputs: [ { + indexed: false, internalType: "uint256", - name: "ruling", + name: "_minStake", type: "uint256", }, { - internalType: "bool", - name: "tied", - type: "bool", + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", }, { - internalType: "bool", - name: "overridden", - type: "bool", + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_jurorsForCourtJump", type: "uint256", }, - ], - name: "disputeKits", - outputs: [ { - internalType: "contract IDisputeKit", - name: "", - type: "address", + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, ], - stateMutability: "view", - type: "function", + name: "CourtModified", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, - ], - name: "disputes", - outputs: [ - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, { + indexed: true, internalType: "contract IArbitrableV2", - name: "arbitrated", + name: "_arbitrable", 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", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_disputeID", + name: "_disputeKitID", type: "uint256", }, { - internalType: "uint256", - name: "_iterations", - type: "uint256", + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", }, ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeKitCreated", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint96", name: "_courtID", type: "uint96", }, { - internalType: "uint256[]", - name: "_disputeKitIDs", - type: "uint256[]", + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, { + indexed: true, internalType: "bool", name: "_enable", type: "bool", }, ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeKitEnabled", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, { + indexed: true, internalType: "uint256", - name: "_round", + name: "_roundID", type: "uint256", }, { + indexed: true, internalType: "uint256", - name: "_iterations", + name: "_fromDisputeKitID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_toDisputeKitID", type: "uint256", }, ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "DisputeKitJump", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_destination", + name: "_address", type: "address", }, { + indexed: true, internalType: "uint256", - name: "_amount", + name: "_disputeID", type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_voteID", + type: "uint256", }, ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", + 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: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "LeftoverRewardSent", + type: "event", }, { - inputs: [], - name: "getDisputeKitsLength", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + 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", }, ], - stateMutability: "view", - type: "function", + name: "NewCurrencyRate", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, - ], - name: "getNumberOfRounds", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "enum KlerosCoreUniversity.Period", + name: "_period", + type: "uint8", }, ], - stateMutability: "view", - type: "function", + name: "NewPeriod", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, + { + indexed: true, internalType: "uint256", name: "_disputeID", type: "uint256", }, - ], - name: "getNumberOfVotes", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_ruling", type: "uint256", }, ], - stateMutability: "view", - type: "function", + 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: "_round", + name: "_roundID", 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", + indexed: false, + internalType: "uint256", + name: "_degreeOfCoherency", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + indexed: false, + internalType: "int256", + name: "_pnkAmount", + type: "int256", }, - ], - name: "getTimesPerPeriod", - outputs: [ { - internalType: "uint256[4]", - name: "timesPerPeriod", - type: "uint256[4]", + indexed: false, + internalType: "int256", + name: "_feeAmount", + type: "int256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "TokenAndETHShift", + type: "event", }, { - inputs: [], - name: "guardian", - outputs: [ + anonymous: false, + inputs: [ { + indexed: true, internalType: "address", - name: "", + name: "newImplementation", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { 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", + name: "_disputeKitAddress", type: "address", }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "_hiddenVotes", - type: "bool", - }, - { - internalType: "uint256[4]", - name: "_courtParameters", - type: "uint256[4]", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "uint256[4]", - name: "_timesPerPeriod", - type: "uint256[4]", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, { internalType: "bytes", - name: "_sortitionExtraData", + name: "_extraData", type: "bytes", }, - { - internalType: "contract ISortitionModule", - name: "_sortitionModuleAddress", - type: "address", - }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize3", + name: "appeal", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -25344,12 +16494,12 @@ export default { type: "uint256", }, ], - name: "isDisputeKitJumping", + name: "appealCost", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "cost", + type: "uint256", }, ], stateMutability: "view", @@ -25357,36 +16507,23 @@ export default { }, { inputs: [ - { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, { internalType: "uint256", - name: "_disputeKitID", + name: "_disputeID", type: "uint256", }, ], - name: "isSupported", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "jurorProsecutionModule", + name: "appealPeriod", outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "start", + type: "uint256", + }, + { + internalType: "uint256", + name: "end", + type: "uint256", }, ], stateMutability: "view", @@ -25394,61 +16531,63 @@ export default { }, { inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "arbitrationCost", + outputs: [ { internalType: "uint256", - name: "_disputeID", + name: "cost", type: "uint256", }, ], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [], - name: "paused", + inputs: [ + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "arbitrationCost", outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "cost", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "pinakion", - outputs: [ + inputs: [ { internalType: "contract IERC20", - name: "", + name: "_feeToken", type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "bool", + name: "_accepted", + type: "bool", }, ], - stateMutability: "view", + name: "changeAcceptedFeeTokens", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -25458,13 +16597,38 @@ export default { name: "_courtID", type: "uint96", }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", + }, { internalType: "uint256", - name: "_newStake", + 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: "setStake", + name: "changeCourtParameters", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25472,47 +16636,35 @@ export default { { inputs: [ { - internalType: "address", - name: "_account", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "_newStake", - type: "uint256", + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - name: "setStakeBySortitionModule", + name: "changeCurrencyRates", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "sortitionModule", - outputs: [ + inputs: [ { - internalType: "contract ISortitionModule", - name: "", + internalType: "address payable", + name: "_governor", type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "unpause", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25521,172 +16673,171 @@ export default { inputs: [ { internalType: "address", - name: "newImplementation", + name: "_instructor", type: "address", }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, ], - name: "upgradeToAndCall", + name: "changeInstructor", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "version", - outputs: [ + inputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "address", + name: "_jurorProsecutionModule", + type: "address", }, ], - stateMutability: "view", + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", type: "function", }, - ], - }, - KlerosCore_Proxy: { - address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", - abi: [ { inputs: [ { - internalType: "address", - name: "_implementation", + internalType: "contract IERC20", + name: "_pinakion", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], + name: "changePinakion", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + type: "function", }, - ], - }, - KlerosV2NeoEarlyUser: { - address: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", - abi: [ { inputs: [ { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "string", - name: "_symbol", - type: "string", + internalType: "contract ISortitionModuleUniversity", + name: "_sortitionModule", + type: "address", }, ], + name: "changeSortitionModule", + outputs: [], stateMutability: "nonpayable", - type: "constructor", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "owner", + internalType: "contract IERC20", + name: "_toToken", type: "address", }, { - indexed: true, - internalType: "address", - name: "approved", - type: "address", + internalType: "uint256", + name: "_amountInEth", + type: "uint256", }, + ], + name: "convertEthToTokenAmount", + outputs: [ { - indexed: true, internalType: "uint256", - name: "tokenId", + name: "", type: "uint256", }, ], - name: "Approval", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "owner", - type: "address", + 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", }, { - indexed: true, - internalType: "address", - name: "operator", - type: "address", + internalType: "uint256", + name: "jurorsForCourtJump", + type: "uint256", }, { - indexed: false, internalType: "bool", - name: "approved", + name: "disabled", type: "bool", }, ], - name: "ApprovalForAll", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "from", - type: "address", + internalType: "uint96", + name: "_parent", + type: "uint96", }, { - indexed: true, - internalType: "address", - name: "to", - type: "address", + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, { - indexed: true, internalType: "uint256", - name: "tokenId", + name: "_minStake", type: "uint256", }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ { - internalType: "address", - name: "to", - type: "address", + internalType: "uint256", + name: "_alpha", + type: "uint256", }, { internalType: "uint256", - name: "tokenId", + name: "_feeForJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "_jurorsForCourtJump", type: "uint256", }, + { + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", + }, ], - name: "approve", + name: "createCourt", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25694,97 +16845,131 @@ export default { { inputs: [ { - internalType: "address", - name: "owner", - type: "address", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - name: "balanceOf", + name: "createDispute", outputs: [ { internalType: "uint256", - name: "", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "address", - name: "_newOwner", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, - ], - name: "changeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "tokenId", + name: "_feeAmount", type: "uint256", }, ], - name: "getApproved", + name: "createDispute", outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "operator", + internalType: "contract IERC20", + name: "", type: "address", }, ], - name: "isApprovedForAll", + name: "currencyRates", outputs: [ { internalType: "bool", - name: "", + name: "feePaymentAccepted", type: "bool", }, + { + internalType: "uint64", + name: "rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "rateDecimals", + type: "uint8", + }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "name", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "currentRuling", outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: "uint256", + name: "ruling", + type: "uint256", + }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "owner", + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "disputeKits", outputs: [ { - internalType: "address", + internalType: "contract IDisputeKit", name: "", type: "address", }, @@ -25796,30 +16981,55 @@ export default { inputs: [ { internalType: "uint256", - name: "tokenId", + name: "", type: "uint256", }, ], - name: "ownerOf", + name: "disputes", outputs: [ { - internalType: "address", - name: "", + internalType: "uint96", + name: "courtID", + type: "uint96", + }, + { + internalType: "contract IArbitrableV2", + name: "arbitrated", type: "address", }, + { + internalType: "enum KlerosCoreUniversity.Period", + name: "period", + type: "uint8", + }, + { + internalType: "bool", + name: "ruled", + type: "bool", + }, + { + internalType: "uint256", + name: "lastPeriodChange", + type: "uint256", + }, ], stateMutability: "view", type: "function", }, { inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, { internalType: "address", - name: "to", + name: "_juror", type: "address", }, ], - name: "safeMint", + name: "draw", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25827,22 +17037,45 @@ export default { { inputs: [ { - internalType: "address", - name: "from", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - internalType: "address", - name: "to", - type: "address", + 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: "tokenId", + name: "_iterations", type: "uint256", }, ], - name: "safeTransferFrom", + name: "execute", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25851,26 +17084,21 @@ export default { inputs: [ { internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", + name: "_destination", type: "address", }, { internalType: "uint256", - name: "tokenId", + name: "_amount", type: "uint256", }, { internalType: "bytes", - name: "data", + name: "_data", type: "bytes", }, ], - name: "safeTransferFrom", + name: "executeGovernorProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25878,48 +17106,43 @@ export default { { inputs: [ { - internalType: "address", - name: "operator", - type: "address", - }, - { - internalType: "bool", - name: "approved", - type: "bool", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, ], - name: "setApprovalForAll", + name: "executeRuling", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", + inputs: [], + name: "getDisputeKitsLength", outputs: [ { - internalType: "bool", + internalType: "uint256", name: "", - type: "bool", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "symbol", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "getNumberOfRounds", outputs: [ { - internalType: "string", + internalType: "uint256", name: "", - type: "string", + type: "uint256", }, ], stateMutability: "view", @@ -25929,16 +17152,16 @@ export default { inputs: [ { internalType: "uint256", - name: "tokenId", + name: "_disputeID", type: "uint256", }, ], - name: "tokenURI", + name: "getNumberOfVotes", outputs: [ { - internalType: "string", + internalType: "uint256", name: "", - type: "string", + type: "uint256", }, ], stateMutability: "view", @@ -25947,161 +17170,196 @@ export default { { inputs: [ { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { internalType: "uint256", - name: "tokenId", + name: "_round", type: "uint256", }, ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", + name: "getRoundInfo", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "disputeKitID", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkAtStakePerJuror", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalFeesForJurors", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "repartitions", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkPenalties", + type: "uint256", + }, + { + internalType: "address[]", + name: "drawnJurors", + type: "address[]", + }, + { + internalType: "uint256", + name: "sumFeeRewardPaid", + type: "uint256", + }, + { + internalType: "uint256", + name: "sumPnkRewardPaid", + type: "uint256", + }, + { + internalType: "contract IERC20", + name: "feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "drawIterations", + type: "uint256", + }, + ], + internalType: "struct KlerosCoreUniversity.Round", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", type: "function", }, - ], - }, - PNK: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, + ], + name: "getTimesPerPeriod", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, ], - name: "Approval", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, + inputs: [], + name: "governor", + outputs: [ { - indexed: true, internalType: "address", - name: "to", + name: "", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, ], - name: "Transfer", - type: "event", + stateMutability: "view", + type: "function", }, { inputs: [ { internalType: "address", - name: "owner", + name: "_governor", type: "address", }, { internalType: "address", - name: "spender", + name: "_instructor", type: "address", }, - ], - name: "allowance", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "contract IERC20", + name: "_pinakion", + type: "address", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "address", - name: "spender", + name: "_jurorProsecutionModule", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "contract IDisputeKit", + name: "_disputeKit", + type: "address", }, - ], - name: "approve", - outputs: [ { internalType: "bool", - name: "", + name: "_hiddenVotes", type: "bool", }, + { + internalType: "uint256[4]", + name: "_courtParameters", + type: "uint256[4]", + }, + { + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", + }, + { + internalType: "contract ISortitionModuleUniversity", + name: "_sortitionModuleAddress", + type: "address", + }, ], + name: "initialize", + outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "instructor", + outputs: [ { internalType: "address", - name: "account", + name: "", type: "address", }, ], - name: "balanceOf", - outputs: [ + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", + name: "isDisputeKitJumping", outputs: [ { - internalType: "uint8", + internalType: "bool", name: "", - type: "uint8", + type: "bool", }, ], stateMutability: "view", @@ -26110,17 +17368,17 @@ export default { { inputs: [ { - internalType: "address", - name: "spender", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { internalType: "uint256", - name: "subtractedValue", + name: "_disputeKitID", type: "uint256", }, ], - name: "decreaseAllowance", + name: "isSupported", outputs: [ { internalType: "bool", @@ -26128,41 +17386,43 @@ export default { type: "bool", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "jurorProsecutionModule", + outputs: [ { internalType: "address", - name: "spender", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "addedValue", + name: "_disputeID", type: "uint256", }, ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], + name: "passPeriod", + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "name", + name: "pinakion", outputs: [ { - internalType: "string", + internalType: "contract IERC20", name: "", - type: "string", + type: "address", }, ], stateMutability: "view", @@ -26170,556 +17430,466 @@ export default { }, { inputs: [], - name: "symbol", + name: "proxiableUUID", outputs: [ { - internalType: "string", + internalType: "bytes32", name: "", - type: "string", + type: "bytes32", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "totalSupply", - outputs: [ + inputs: [ + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, { internalType: "uint256", - name: "", + name: "_newStake", type: "uint256", }, ], - stateMutability: "view", + name: "setStake", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "to", + name: "_account", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, { internalType: "uint256", - name: "amount", + name: "_newStake", type: "uint256", }, - ], - name: "transfer", - outputs: [ { internalType: "bool", - name: "", + name: "_alreadyTransferred", type: "bool", }, ], + name: "setStakeBySortitionModule", + outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "sortitionModule", + outputs: [ { - internalType: "address", - name: "from", + internalType: "contract ISortitionModuleUniversity", + name: "", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "to", + name: "newImplementation", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "transferFrom", - outputs: [ + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + ], + }, + KlerosCoreUniversity_Proxy: { + address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + abi: [ + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "_implementation", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", }, ], stateMutability: "nonpayable", - type: "function", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, ], }, - PNKFaucet: { - address: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", + KlerosCore_Implementation: { + address: "0xb6839061C3aD03c208EFd697409453bf9900cAb2", abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AppealFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "ArbitrationFeesNotEnough", + type: "error", + }, + { + inputs: [], + name: "CannotDisableClassicDK", + type: "error", + }, + { + inputs: [], + name: "CommitPeriodNotPassed", + type: "error", + }, + { + inputs: [], + name: "DisputeKitNotSupportedByCourt", + type: "error", + }, + { + inputs: [], + name: "DisputeKitOnly", + type: "error", + }, + { + inputs: [], + name: "DisputeNotAppealable", + type: "error", + }, + { + inputs: [], + name: "DisputePeriodIsFinal", + type: "error", + }, + { + inputs: [], + name: "DisputeStillDrawing", + type: "error", + }, + { + inputs: [], + name: "EvidenceNotPassedAndNotAppeal", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, + { + inputs: [], + name: "GovernorOnly", + type: "error", + }, + { + inputs: [], + name: "GuardianOrGovernorOnly", + type: "error", + }, + { + inputs: [], + name: "InvalidDisputKitParent", + type: "error", + }, + { + inputs: [], + name: "InvalidForkingCourtAsParent", + type: "error", + }, { inputs: [ { - internalType: "contract IERC20", - name: "_token", + internalType: "address", + name: "implementation", type: "address", }, ], - stateMutability: "nonpayable", - type: "constructor", + name: "InvalidImplementation", + type: "error", }, { inputs: [], - name: "amount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "MinStakeLowerThanParentCourt", + type: "error", }, { inputs: [], - name: "balance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "MustSupportDisputeKitClassic", + type: "error", }, { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "NotEvidencePeriod", + type: "error", }, { - inputs: [ - { - internalType: "address", - name: "_governor", - type: "address", - }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + inputs: [], + name: "NotExecutionPeriod", + type: "error", }, { inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", + name: "NotInitializing", + type: "error", }, { inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "RulingAlreadyExecuted", + type: "error", }, { inputs: [], - name: "token", - outputs: [ - { - internalType: "contract IERC20", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", + name: "SortitionModuleOnly", + type: "error", }, { inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "StakingInTooManyCourts", + type: "error", }, { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "withdrewAlready", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", + inputs: [], + name: "StakingLessThanCourtMinStake", + type: "error", }, - ], - }, - PinakionV2: { - address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - abi: [ { inputs: [], - stateMutability: "nonpayable", - type: "constructor", + name: "StakingNotPossibeInThisCourt", + type: "error", }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", + inputs: [], + name: "StakingTransferFailed", + type: "error", }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", }, { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + inputs: [], + name: "TokenNotAccepted", + type: "error", + }, + { + inputs: [], + name: "TransferFailed", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, { inputs: [ { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "nonpayable", - type: "function", + 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: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + inputs: [], + name: "WhenNotPausedOnly", + type: "error", }, { inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", + name: "WhenPausedOnly", + type: "error", + }, + { + inputs: [], + name: "WrongDisputeKitIndex", + type: "error", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "spender", + indexed: true, + internalType: "contract IERC20", + name: "_token", type: "address", }, { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { + indexed: true, internalType: "bool", - name: "", + name: "_accepted", type: "bool", }, ], - stateMutability: "nonpayable", - type: "function", + name: "AcceptedFeeToken", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "spender", - type: "address", - }, - { + indexed: true, internalType: "uint256", - name: "addedValue", + name: "_disputeID", type: "uint256", }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ { - internalType: "string", - name: "", - type: "string", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "AppealDecision", + type: "event", }, { - inputs: [], - name: "totalSupply", - outputs: [ + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, + { + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", + }, ], - stateMutability: "view", - type: "function", + name: "AppealPossible", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "to", - type: "address", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + indexed: true, + internalType: "uint96", + name: "_parent", + type: "uint96", }, - ], - name: "transfer", - outputs: [ { + indexed: false, internalType: "bool", - name: "", + name: "_hiddenVotes", type: "bool", }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, { - internalType: "address", - name: "to", - type: "address", + indexed: false, + internalType: "uint256", + name: "_minStake", + type: "uint256", }, { + indexed: false, internalType: "uint256", - name: "amount", + name: "_alpha", type: "uint256", }, - ], - name: "transferFrom", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + internalType: "uint256", + name: "_feeForJuror", + type: "uint256", }, - ], - stateMutability: "nonpayable", - type: "function", - }, - ], - }, - PolicyRegistry: { - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ { indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256[]", + name: "_supportedDisputeKits", + type: "uint256[]", }, ], - name: "Initialized", + name: "CourtCreated", type: "event", }, { @@ -26728,23 +17898,29 @@ export default { { indexed: true, internalType: "uint256", - name: "_courtID", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", + indexed: true, + internalType: "uint96", + name: "_fromCourtID", + type: "uint96", }, { indexed: false, - internalType: "string", - name: "_policy", - type: "string", + internalType: "uint96", + name: "_toCourtID", + type: "uint96", }, ], - name: "PolicyUpdate", + name: "CourtJump", type: "event", }, { @@ -26752,225 +17928,111 @@ export default { inputs: [ { indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: false, + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + indexed: false, + internalType: "uint256", + name: "_minStake", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: false, + internalType: "uint256", + name: "_alpha", + type: "uint256", }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "_feeForJuror", type: "uint256", }, - ], - name: "policies", - outputs: [ { - internalType: "string", - name: "", - type: "string", + indexed: false, + internalType: "uint256", + name: "_jurorsForCourtJump", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + indexed: false, + internalType: "uint256[4]", + name: "_timesPerPeriod", + type: "uint256[4]", }, ], - stateMutability: "view", - type: "function", + name: "CourtModified", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "_courtID", + name: "_disputeID", 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", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, ], - stateMutability: "view", - type: "function", + name: "DisputeCreation", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + indexed: true, + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", + type: "address", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - PolicyRegistry_Implementation: { - address: "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "DisputeKitCreated", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "implementation", - type: "address", + indexed: true, + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + indexed: true, + internalType: "bool", + name: "_enable", + type: "bool", }, ], - name: "Initialized", + name: "DisputeKitEnabled", type: "event", }, { @@ -26979,23 +18041,29 @@ export default { { indexed: true, internalType: "uint256", - name: "_courtID", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", type: "uint256", }, { - indexed: false, - internalType: "string", - name: "_courtName", - type: "string", + indexed: true, + internalType: "uint256", + name: "_fromDisputeKitID", + type: "uint256", }, { indexed: false, - internalType: "string", - name: "_policy", - type: "string", + internalType: "uint256", + name: "_toDisputeKitID", + type: "uint256", }, ], - name: "PolicyUpdate", + name: "DisputeKitJump", type: "event", }, { @@ -27004,244 +18072,209 @@ export default { { indexed: true, internalType: "address", - name: "newImplementation", + name: "_address", type: "address", }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, - ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", - outputs: [ { - internalType: "address", - name: "", - type: "address", + indexed: false, + internalType: "uint256", + name: "_roundID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_voteID", + type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Draw", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Initialized", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, - ], - name: "policies", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { + indexed: false, internalType: "uint256", - name: "_courtID", + name: "_pnkAmount", type: "uint256", }, { - internalType: "string", - name: "_courtName", - type: "string", + indexed: false, + internalType: "uint256", + name: "_feeAmount", + type: "uint256", }, { - internalType: "string", - name: "_policy", - type: "string", + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "LeftoverRewardSent", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "newImplementation", + indexed: true, + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, { - internalType: "bytes", - name: "data", - type: "bytes", + indexed: false, + internalType: "uint64", + name: "_rateInEth", + type: "uint64", }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ { - internalType: "string", - name: "", - type: "string", + indexed: false, + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", }, ], - stateMutability: "view", - type: "function", + name: "NewCurrencyRate", + type: "event", }, - ], - }, - PolicyRegistry_Proxy: { - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", - abi: [ { + anonymous: false, inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + indexed: false, + internalType: "enum KlerosCoreBase.Period", + name: "_period", + type: "uint8", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - RandomizerOracle: { - address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", - abi: [], - }, - RandomizerRNG: { - address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", + name: "NewPeriod", + type: "event", }, { + anonymous: false, inputs: [], - name: "FailedDelegateCall", - type: "error", + name: "Paused", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "implementation", + indexed: true, + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + indexed: true, + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_ruling", + type: "uint256", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + 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: "uint64", - name: "version", - type: "uint64", + 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: "Initialized", + name: "TokenAndETHShift", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Unpaused", type: "event", }, { @@ -27257,71 +18290,56 @@ export default { name: "Upgraded", type: "event", }, - { - inputs: [], - name: "callbackGasLimit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { - internalType: "address", - name: "_governor", + internalType: "contract IDisputeKit", + name: "_disputeKitAddress", type: "address", }, ], - name: "changeGovernor", + name: "addNewDisputeKit", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", }, { - internalType: "address", - name: "_governor", - type: "address", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - name: "initialize", + name: "appeal", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { - inputs: [], - name: "proxiableUUID", + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + ], + name: "appealCost", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "uint256", + name: "cost", + type: "uint256", }, ], stateMutability: "view", @@ -27331,29 +18349,21 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, ], - name: "randomNumbers", + name: "appealPeriod", outputs: [ { internalType: "uint256", - name: "", + name: "start", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "randomizer", - outputs: [ { - internalType: "contract IRandomizer", - name: "", - type: "address", + internalType: "uint256", + name: "end", + type: "uint256", }, ], stateMutability: "view", @@ -27362,47 +18372,40 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_id", - type: "uint256", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, { - internalType: "bytes32", - name: "_value", - type: "bytes32", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "arbitrationCost", + outputs: [ { internalType: "uint256", - name: "_amount", + name: "cost", type: "uint256", }, ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes", + name: "_extraData", + type: "bytes", }, ], - name: "receiveRandomness", + name: "arbitrationCost", outputs: [ { internalType: "uint256", - name: "randomNumber", + name: "cost", type: "uint256", }, ], @@ -27412,12 +18415,17 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "bool", + name: "_accepted", + type: "bool", }, ], - name: "requestRandomness", + name: "changeAcceptedFeeTokens", outputs: [], stateMutability: "nonpayable", type: "function", @@ -27425,31 +18433,42 @@ export default { { inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "bool", + name: "_hiddenVotes", + type: "bool", }, - ], - name: "requesterToID", - outputs: [ { internalType: "uint256", - name: "", + name: "_minStake", type: "uint256", }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { internalType: "uint256", - name: "_callbackGasLimit", + 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: "setCallbackGasLimit", + name: "changeCourtParameters", outputs: [], stateMutability: "nonpayable", type: "function", @@ -27457,12 +18476,22 @@ export default { { inputs: [ { - internalType: "address", - name: "_randomizer", + internalType: "contract IERC20", + name: "_feeToken", type: "address", }, + { + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + internalType: "uint8", + name: "_rateDecimals", + type: "uint8", + }, ], - name: "setRandomizer", + name: "changeCurrencyRates", outputs: [], stateMutability: "nonpayable", type: "function", @@ -27470,118 +18499,82 @@ export default { { inputs: [ { - internalType: "address", - name: "newImplementation", + internalType: "address payable", + name: "_governor", type: "address", }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, ], - name: "upgradeToAndCall", + name: "changeGovernor", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_implementation", + name: "_guardian", type: "address", }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, ], + name: "changeGuardian", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - RandomizerRNG_Implementation: { - address: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", - abi: [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", + type: "function", }, { inputs: [ { internalType: "address", - name: "implementation", + name: "_jurorProsecutionModule", type: "address", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "contract IERC20", + name: "_pinakion", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "contract ISortitionModule", + name: "_sortitionModule", + type: "address", }, ], - name: "Initialized", - type: "event", + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", + internalType: "contract IERC20", + name: "_toToken", type: "address", }, + { + internalType: "uint256", + name: "_amountInEth", + type: "uint256", + }, ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "callbackGasLimit", + name: "convertEthToTokenAmount", outputs: [ { internalType: "uint256", @@ -27595,24 +18588,47 @@ export default { { inputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "governor", + name: "courts", outputs: [ { - internalType: "address", - name: "", - type: "address", + 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", @@ -27621,63 +18637,140 @@ export default { { inputs: [ { - internalType: "contract IRandomizer", - name: "_randomizer", - type: "address", + internalType: "uint96", + name: "_parent", + type: "uint96", }, { - internalType: "address", - name: "_governor", - type: "address", + 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: "initialize", + name: "createCourt", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "proxiableUUID", + inputs: [ + { + internalType: "uint256", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + ], + name: "createDispute", outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "uint256", + name: "disputeID", + type: "uint256", }, ], - stateMutability: "view", + stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "", + name: "_numberOfChoices", + type: "uint256", + }, + { + internalType: "bytes", + name: "_extraData", + type: "bytes", + }, + { + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + { + internalType: "uint256", + name: "_feeAmount", type: "uint256", }, ], - name: "randomNumbers", + name: "createDispute", outputs: [ { internalType: "uint256", - name: "", + name: "disputeID", type: "uint256", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "randomizer", - outputs: [ + inputs: [ { - internalType: "contract IRandomizer", + 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", }, @@ -27685,31 +18778,29 @@ export default { inputs: [ { internalType: "uint256", - name: "_id", + name: "_disputeID", type: "uint256", }, - { - internalType: "bytes32", - name: "_value", - type: "bytes32", - }, ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "currentRuling", + outputs: [ { internalType: "uint256", - name: "_amount", + name: "ruling", type: "uint256", }, + { + internalType: "bool", + name: "tied", + type: "bool", + }, + { + internalType: "bool", + name: "overridden", + type: "bool", + }, ], - name: "randomizerWithdraw", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -27720,12 +18811,12 @@ export default { type: "uint256", }, ], - name: "receiveRandomness", + name: "disputeKits", outputs: [ { - internalType: "uint256", - name: "randomNumber", - type: "uint256", + internalType: "contract IDisputeKit", + name: "", + type: "address", }, ], stateMutability: "view", @@ -27739,24 +18830,31 @@ export default { type: "uint256", }, ], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + name: "disputes", + outputs: [ { - internalType: "address", - name: "", + internalType: "uint96", + name: "courtID", + type: "uint96", + }, + { + internalType: "contract IArbitrableV2", + name: "arbitrated", type: "address", }, - ], - name: "requesterToID", - outputs: [ + { + internalType: "enum KlerosCoreBase.Period", + name: "period", + type: "uint8", + }, + { + internalType: "bool", + name: "ruled", + type: "bool", + }, { internalType: "uint256", - name: "", + name: "lastPeriodChange", type: "uint256", }, ], @@ -27767,24 +18865,16 @@ export default { inputs: [ { internalType: "uint256", - name: "_callbackGasLimit", + name: "_disputeID", type: "uint256", }, - ], - name: "setCallbackGasLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_randomizer", - type: "address", + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - name: "setRandomizer", + name: "draw", outputs: [], stateMutability: "nonpayable", type: "function", @@ -27792,389 +18882,365 @@ export default { { inputs: [ { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - ], - }, - RandomizerRNG_Proxy: { - address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - abi: [ - { - inputs: [ { - internalType: "address", - name: "_implementation", - type: "address", + internalType: "uint256[]", + name: "_disputeKitIDs", + type: "uint256[]", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "bool", + name: "_enable", + type: "bool", }, ], + name: "enableDisputeKits", + outputs: [], stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - ], - }, - SortitionModule: { - address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "_round", + type: "uint256", }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", - type: "uint8", + internalType: "uint256", + name: "_iterations", + type: "uint256", }, ], - name: "NewPhase", - type: "event", + name: "execute", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "_destination", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_amount", type: "uint256", }, { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "StakeDelayedAlreadyTransferredDeposited", - type: "event", + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "_disputeID", + type: "uint256", }, + ], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getDisputeKitsLength", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_disputeID", type: "uint256", }, + ], + name: "getNumberOfRounds", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedNotTransferred", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, internalType: "uint256", - name: "_relativeAmount", + name: "_disputeID", type: "uint256", }, + ], + name: "getNumberOfVotes", + outputs: [ { - indexed: false, - internalType: "bool", - name: "_unlock", - type: "bool", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "StakeLocked", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", - }, - { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "_disputeID", type: "uint256", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "_round", type: "uint256", }, + ], + name: "getRoundInfo", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_amountAllCourts", - type: "uint256", + 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", }, ], - name: "StakeSet", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", - type: "address", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ + name: "getTimesPerPeriod", + outputs: [ { - internalType: "address", - name: "_governor", - type: "address", + internalType: "uint256[4]", + name: "timesPerPeriod", + type: "uint256[4]", }, ], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "governor", + outputs: [ { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "guardian", + outputs: [ { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "_governor", type: "address", }, { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", + internalType: "address", + name: "_guardian", + type: "address", }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "core", - outputs: [ { - internalType: "contract KlerosCore", - name: "", + 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", }, ], - stateMutability: "view", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, + ], + name: "isDisputeKitJumping", + outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + internalType: "uint256", + name: "_disputeKitID", + type: "uint256", }, ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "delayedStakeReadIndex", + name: "isSupported", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], stateMutability: "view", @@ -28182,12 +19248,12 @@ export default { }, { inputs: [], - name: "delayedStakeWriteIndex", + name: "jurorProsecutionModule", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -28197,30 +19263,29 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "_disputeID", type: "uint256", }, ], - name: "delayedStakes", + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", outputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, { internalType: "bool", - name: "alreadyTransferred", + name: "", type: "bool", }, ], @@ -28229,55 +19294,44 @@ export default { }, { inputs: [], - name: "disputesWithoutJurors", + name: "pinakion", outputs: [ { - internalType: "uint256", + internalType: "contract IERC20", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "proxiableUUID", + outputs: [ { internalType: "bytes32", - name: "_key", + name: "", 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: "uint96", + name: "_courtID", + type: "uint96", + }, { internalType: "uint256", - name: "_iterations", + name: "_newStake", type: "uint256", }, ], - name: "executeDelayedStakes", + name: "setStake", outputs: [], stateMutability: "nonpayable", type: "function", @@ -28286,7 +19340,7 @@ export default { inputs: [ { internalType: "address", - name: "_juror", + name: "_account", type: "address", }, { @@ -28294,224 +19348,225 @@ export default { name: "_courtID", type: "uint96", }, - ], - name: "getJurorBalance", - outputs: [ - { - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, { internalType: "uint256", - name: "totalLocked", + name: "_newStake", type: "uint256", }, { - internalType: "uint256", - name: "stakedInCourt", - type: "uint256", + internalType: "bool", + name: "_alreadyTransferred", + type: "bool", }, + ], + name: "setStakeBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "sortitionModule", + outputs: [ { - internalType: "uint256", - name: "nbCourts", - type: "uint256", + internalType: "contract ISortitionModule", + name: "", + type: "address", }, ], stateMutability: "view", type: "function", }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { internalType: "address", - name: "_juror", + name: "newImplementation", type: "address", }, - ], - name: "getJurorCourtIDs", - outputs: [ { - internalType: "uint96[]", - name: "", - type: "uint96[]", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - stateMutability: "view", + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [], - name: "governor", + name: "version", outputs: [ { - internalType: "address", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", type: "function", }, + ], + }, + KlerosCore_Proxy: { + address: "0x4838e31E0ea315232c431598110FE677cAF2D6E6", + abi: [ { 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", + name: "_implementation", type: "address", }, { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "initialize", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, { - inputs: [], - name: "initialize3", - outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, + ], + }, + KlerosV2NeoEarlyUser: { + address: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", + abi: [ { inputs: [ { - internalType: "address", - name: "_juror", - type: "address", + internalType: "string", + name: "_name", + type: "string", }, - ], - name: "isJurorStaked", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "string", + name: "_symbol", + type: "string", }, - ], - stateMutability: "view", - type: "function", + ], + stateMutability: "nonpayable", + type: "constructor", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "account", + name: "owner", type: "address", }, - ], - name: "jurors", - outputs: [ { - internalType: "uint256", - name: "stakedPnk", - type: "uint256", + indexed: true, + internalType: "address", + name: "approved", + type: "address", }, { + indexed: true, internalType: "uint256", - name: "lockedPnk", + name: "tokenId", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Approval", + type: "event", }, { - inputs: [], - name: "lastPhaseChange", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", }, ], - stateMutability: "view", - type: "function", + name: "ApprovalForAll", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "jurorAccount", + name: "from", type: "address", }, { - internalType: "uint96", - name: "courtId", - type: "uint96", + indexed: true, + internalType: "address", + name: "to", + type: "address", }, - ], - name: "latestDelayedStakeIndex", - outputs: [ { + indexed: true, internalType: "uint256", - name: "", + name: "tokenId", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Transfer", + type: "event", }, { inputs: [ { internalType: "address", - name: "_account", + name: "to", type: "address", }, { internalType: "uint256", - name: "_relativeAmount", + name: "tokenId", type: "uint256", }, ], - name: "lockStake", + name: "approve", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "maxDrawingTime", - outputs: [ + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "owner", + type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "minStakingTime", + name: "balanceOf", outputs: [ { internalType: "uint256", @@ -28525,49 +19580,30 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", + internalType: "address", + name: "_newOwner", + type: "address", }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, { internalType: "uint256", - name: "_relativeAmount", + name: "tokenId", type: "uint256", }, ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "phase", + name: "getApproved", outputs: [ { - internalType: "enum ISortitionModule.Phase", + internalType: "address", name: "", - type: "uint8", + type: "address", }, ], stateMutability: "view", @@ -28576,29 +19612,35 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "owner", + type: "address", }, { - internalType: "uint256", + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - name: "postDrawHook", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [], - name: "proxiableUUID", + name: "name", outputs: [ { - internalType: "bytes32", + internalType: "string", name: "", - type: "bytes32", + type: "string", }, ], stateMutability: "view", @@ -28606,65 +19648,96 @@ export default { }, { inputs: [], - name: "randomNumber", + name: "owner", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "randomNumberRequestBlock", - outputs: [ + inputs: [ { internalType: "uint256", - name: "", + name: "tokenId", type: "uint256", }, ], + name: "ownerOf", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], stateMutability: "view", type: "function", }, { - inputs: [], - name: "rng", - outputs: [ + inputs: [ { - internalType: "contract RNG", - name: "", + internalType: "address", + name: "to", type: "address", }, ], - stateMutability: "view", + name: "safeMint", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "rngLookahead", - outputs: [ + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, { internalType: "uint256", - name: "", + name: "tokenId", type: "uint256", }, ], - stateMutability: "view", + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_account", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", type: "address", }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, ], - name: "setJurorInactive", + name: "safeTransferFrom", outputs: [], stateMutability: "nonpayable", type: "function", @@ -28673,138 +19746,173 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "operator", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "bool", + name: "approved", + type: "bool", }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint256", - name: "_newStake", - type: "uint256", + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", }, + ], + name: "supportsInterface", + outputs: [ { internalType: "bool", - name: "_alreadyTransferred", + name: "", type: "bool", }, ], - name: "setStake", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", outputs: [ { - internalType: "uint256", - name: "pnkDeposit", - type: "uint256", + internalType: "string", + name: "", + type: "string", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "pnkWithdrawal", + name: "tokenId", type: "uint256", }, + ], + name: "tokenURI", + outputs: [ { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", + internalType: "string", + name: "", + type: "string", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + internalType: "address", + name: "from", + type: "address", }, { - internalType: "bytes32", - name: "_ID", - type: "bytes32", + internalType: "address", + name: "to", + type: "address", }, - ], - name: "stakeOf", - outputs: [ { internalType: "uint256", - name: "", + name: "tokenId", type: "uint256", }, ], - stateMutability: "view", + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", type: "function", }, + ], + }, + PNK: { + address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_juror", + name: "owner", type: "address", }, { - internalType: "uint96", - name: "_courtID", - type: "uint96", + indexed: true, + internalType: "address", + name: "spender", + type: "address", }, - ], - name: "stakeOf", - outputs: [ { + indexed: false, internalType: "uint256", - name: "", + name: "value", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Approval", + type: "event", }, { + anonymous: false, inputs: [ { + indexed: true, internalType: "address", - name: "_account", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", type: "address", }, { + indexed: false, internalType: "uint256", - name: "_relativeAmount", + name: "value", type: "uint256", }, ], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Transfer", + type: "event", }, { inputs: [ { internalType: "address", - name: "newImplementation", + name: "owner", type: "address", }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "address", + name: "spender", + type: "address", }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "version", + name: "allowance", outputs: [ { - internalType: "string", + internalType: "uint256", name: "", - type: "string", + type: "uint256", }, ], stateMutability: "view", @@ -28814,272 +19922,249 @@ export default { inputs: [ { internalType: "address", - name: "_implementation", + name: "spender", type: "address", }, { - internalType: "bytes", - name: "_data", - type: "bytes", + internalType: "uint256", + name: "amount", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "constructor", - }, - ], - }, - SortitionModuleNeo: { - address: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - abi: [ - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "FailedDelegateCall", - type: "error", - }, - { - inputs: [ + name: "approve", + outputs: [ { - internalType: "address", - name: "implementation", - type: "address", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "slot", - type: "bytes32", + internalType: "address", + name: "account", + type: "address", }, ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ + name: "balanceOf", + outputs: [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "Initialized", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "decimals", + outputs: [ { - indexed: false, - internalType: "enum ISortitionModule.Phase", - name: "_phase", + internalType: "uint8", + name: "", type: "uint8", }, ], - name: "NewPhase", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "spender", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_courtID", + name: "subtractedValue", type: "uint256", }, + ], + name: "decreaseAllowance", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_amount", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "StakeDelayedAlreadyTransferred", - type: "event", + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "spender", type: "address", }, { - indexed: true, - internalType: "uint96", - name: "_courtID", - type: "uint96", - }, - { - indexed: false, internalType: "uint256", - name: "_amount", + name: "addedValue", type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", - type: "event", + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, - inputs: [ + inputs: [], + name: "name", + outputs: [ { - indexed: true, - internalType: "address", - name: "_address", - type: "address", + internalType: "string", + name: "", + type: "string", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", + internalType: "string", + name: "", + type: "string", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ { - indexed: false, internalType: "uint256", - name: "_amount", + name: "", type: "uint256", }, ], - name: "StakeDelayedNotTransferred", - type: "event", + stateMutability: "view", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "to", type: "address", }, { - indexed: false, internalType: "uint256", - name: "_relativeAmount", + name: "amount", type: "uint256", }, + ], + name: "transfer", + outputs: [ { - indexed: false, internalType: "bool", - name: "_unlock", + name: "", type: "bool", }, ], - name: "StakeLocked", - type: "event", + stateMutability: "nonpayable", + type: "function", }, { - anonymous: false, inputs: [ { - indexed: true, internalType: "address", - name: "_address", + name: "from", type: "address", }, { - indexed: false, - internalType: "uint256", - name: "_courtID", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, { - indexed: false, internalType: "uint256", - name: "_amount", + name: "amount", type: "uint256", }, ], - name: "StakeSet", - type: "event", + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", }, + ], + }, + PNKFaucet: { + address: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", + abi: [ { - anonymous: false, inputs: [ { - indexed: true, - internalType: "address", - name: "newImplementation", + internalType: "contract IERC20", + name: "_token", type: "address", }, ], - name: "Upgraded", - type: "event", + stateMutability: "nonpayable", + type: "constructor", }, { - inputs: [ + inputs: [], + name: "amount", + outputs: [ { internalType: "uint256", - name: "_maxDrawingTime", + name: "", type: "uint256", }, ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "balance", + outputs: [ { internalType: "uint256", - name: "_maxStakePerJuror", + name: "", type: "uint256", }, ], - name: "changeMaxStakePerJuror", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", - name: "_maxTotalStaked", + name: "_amount", type: "uint256", }, ], - name: "changeMaxTotalStaked", + name: "changeAmount", outputs: [], stateMutability: "nonpayable", type: "function", @@ -29087,40 +20172,42 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_minStakingTime", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "changeMinStakingTime", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "governor", + outputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "", type: "address", }, - { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", - }, ], - name: "changeRandomNumberGenerator", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "request", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "core", + name: "token", outputs: [ { - internalType: "contract KlerosCore", + internalType: "contract IERC20", name: "", type: "address", }, @@ -29128,58 +20215,106 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, + ], + name: "withdrewAlready", + outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - name: "createDisputeHook", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, + ], + }, + PinakionV2: { + address: "0x34B944D42cAcfC8266955D07A80181D2054aa225", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + indexed: true, + internalType: "address", + name: "owner", + type: "address", }, { - internalType: "bytes", - name: "_extraData", - type: "bytes", + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: "createTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "Approval", + type: "event", }, { - inputs: [], - name: "delayedStakeReadIndex", - outputs: [ + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, { + indexed: false, internalType: "uint256", - name: "", + name: "value", type: "uint256", }, ], - stateMutability: "view", - type: "function", + name: "Transfer", + type: "event", }, { - inputs: [], - name: "delayedStakeWriteIndex", + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", outputs: [ { internalType: "uint256", @@ -29192,46 +20327,55 @@ export default { }, { inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "", + name: "amount", type: "uint256", }, ], - name: "delayedStakes", + name: "approve", outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "address", name: "account", type: "address", }, - { - internalType: "uint96", - name: "courtID", - type: "uint96", - }, + ], + name: "balanceOf", + outputs: [ { internalType: "uint256", - name: "stake", + name: "", type: "uint256", }, - { - internalType: "bool", - name: "alreadyTransferred", - type: "bool", - }, ], stateMutability: "view", type: "function", }, { inputs: [], - name: "disputesWithoutJurors", + name: "decimals", outputs: [ { - internalType: "uint256", + internalType: "uint8", name: "", - type: "uint256", + type: "uint8", }, ], stateMutability: "view", @@ -29240,42 +20384,24 @@ export default { { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_coreDisputeID", - type: "uint256", + internalType: "address", + name: "spender", + type: "address", }, { internalType: "uint256", - name: "_nonce", + name: "subtractedValue", type: "uint256", }, ], - name: "draw", + name: "decreaseAllowance", outputs: [ { - internalType: "address", - name: "drawnAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_iterations", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "executeDelayedStakes", - outputs: [], stateMutability: "nonpayable", type: "function", }, @@ -29283,55 +20409,47 @@ export default { inputs: [ { internalType: "address", - name: "_juror", + name: "spender", 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", + name: "addedValue", type: "uint256", }, + ], + name: "increaseAllowance", + outputs: [ { - internalType: "uint256", - name: "nbCourts", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [ + inputs: [], + name: "name", + outputs: [ { - internalType: "address", - name: "_juror", - type: "address", + internalType: "string", + name: "", + type: "string", }, ], - name: "getJurorCourtIDs", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", outputs: [ { - internalType: "uint96[]", + internalType: "string", name: "", - type: "uint96[]", + type: "string", }, ], stateMutability: "view", @@ -29339,12 +20457,12 @@ export default { }, { inputs: [], - name: "governor", + name: "totalSupply", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -29354,125 +20472,182 @@ export default { inputs: [ { internalType: "address", - name: "_governor", - type: "address", - }, - { - internalType: "contract KlerosCore", - name: "_core", + name: "to", type: "address", }, { internalType: "uint256", - name: "_minStakingTime", + name: "amount", type: "uint256", }, + ], + name: "transfer", + outputs: [ { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "contract RNG", - name: "_rng", + internalType: "address", + name: "from", type: "address", }, { - internalType: "uint256", - name: "_rngLookahead", - type: "uint256", + internalType: "address", + name: "to", + type: "address", }, { internalType: "uint256", - name: "_maxStakePerJuror", + name: "amount", type: "uint256", }, + ], + name: "transferFrom", + outputs: [ { - internalType: "uint256", - name: "_maxTotalStaked", - type: "uint256", + internalType: "bool", + name: "", + type: "bool", }, ], - name: "initialize", - outputs: [], stateMutability: "nonpayable", type: "function", }, + ], + }, + PolicyRegistry: { + address: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", + abi: [ + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "FailedDelegateCall", + type: "error", + }, { inputs: [ { internalType: "address", - name: "_juror", + name: "implementation", type: "address", }, ], - name: "isJurorStaked", - outputs: [ + name: "InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - stateMutability: "view", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "", - type: "address", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "jurors", - outputs: [ + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "stakedPnk", + name: "_courtID", type: "uint256", }, { - internalType: "uint256", - name: "lockedPnk", - type: "uint256", + indexed: false, + internalType: "string", + name: "_courtName", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_policy", + type: "string", }, ], - stateMutability: "view", - type: "function", + name: "PolicyUpdate", + type: "event", }, { - inputs: [], - name: "lastPhaseChange", - outputs: [ + anonymous: false, + inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", }, ], - stateMutability: "view", - type: "function", + name: "Upgraded", + type: "event", }, { inputs: [ { internalType: "address", - name: "", + name: "_governor", type: "address", }, - { - internalType: "uint96", - name: "", - type: "uint96", - }, ], - name: "latestDelayedStakeIndex", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -29482,54 +20657,36 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "_governor", type: "address", }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, ], - name: "lockStake", + name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], - name: "maxDrawingTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "maxStakePerJuror", - outputs: [ + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "maxTotalStaked", + name: "policies", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -29537,12 +20694,12 @@ export default { }, { inputs: [], - name: "minStakingTime", + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", @@ -29552,18 +20709,21 @@ export default { inputs: [ { internalType: "uint256", - name: "_randomNumber", + name: "_courtID", type: "uint256", }, + { + internalType: "string", + name: "_courtName", + type: "string", + }, + { + internalType: "string", + name: "_policy", + type: "string", + }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "passPhase", + name: "setPolicy", outputs: [], stateMutability: "nonpayable", type: "function", @@ -29572,28 +20732,28 @@ export default { inputs: [ { internalType: "address", - name: "_account", + name: "newImplementation", type: "address", }, { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - name: "penalizeStake", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [], - name: "phase", + name: "version", outputs: [ { - internalType: "enum ISortitionModule.Phase", + internalType: "string", name: "", - type: "uint8", + type: "string", }, ], stateMutability: "view", @@ -29602,162 +20762,143 @@ export default { { inputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_implementation", + type: "address", }, { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: "postDrawHook", - outputs: [], stateMutability: "nonpayable", - type: "function", + type: "constructor", }, + ], + }, + PolicyRegistry_Implementation: { + address: "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", + abi: [ { inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], - name: "randomNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "AlreadyInitialized", + type: "error", }, { inputs: [], - name: "randomNumberRequestBlock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "FailedDelegateCall", + type: "error", }, { - inputs: [], - name: "rng", - outputs: [ + inputs: [ { - internalType: "contract RNG", - name: "", + internalType: "address", + name: "implementation", type: "address", }, ], - stateMutability: "view", - type: "function", + name: "InvalidImplementation", + type: "error", }, { inputs: [], - name: "rngLookahead", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", }, { inputs: [ { - internalType: "address", - name: "_account", - type: "address", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - name: "setJurorInactive", - outputs: [], - stateMutability: "nonpayable", - type: "function", + name: "UUPSUnsupportedProxiableUUID", + type: "error", }, { + anonymous: false, 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", + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", }, ], - name: "setStake", - outputs: [ + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ { + indexed: true, internalType: "uint256", - name: "pnkDeposit", + name: "_courtID", type: "uint256", }, { - internalType: "uint256", - name: "pnkWithdrawal", - type: "uint256", + indexed: false, + internalType: "string", + name: "_courtName", + type: "string", }, { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", + indexed: false, + internalType: "string", + name: "_policy", + type: "string", }, ], - stateMutability: "nonpayable", - type: "function", + name: "PolicyUpdate", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [ { - internalType: "bytes32", - name: "_ID", - type: "bytes32", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "stakeOf", + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "governor", outputs: [ { - internalType: "uint256", + internalType: "address", name: "", - type: "uint256", + type: "address", }, ], stateMutability: "view", @@ -29767,21 +20908,36 @@ export default { inputs: [ { internalType: "address", - name: "_juror", + name: "_governor", type: "address", }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "uint96", - name: "_courtID", - type: "uint96", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "stakeOf", + name: "policies", outputs: [ { - internalType: "uint256", + internalType: "string", name: "", - type: "uint256", + type: "string", }, ], stateMutability: "view", @@ -29789,12 +20945,12 @@ export default { }, { inputs: [], - name: "totalStaked", + name: "proxiableUUID", outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], stateMutability: "view", @@ -29802,18 +20958,23 @@ export default { }, { inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, { internalType: "uint256", - name: "_relativeAmount", + name: "_courtID", type: "uint256", }, + { + internalType: "string", + name: "_courtName", + type: "string", + }, + { + internalType: "string", + name: "_policy", + type: "string", + }, ], - name: "unlockStake", + name: "setPolicy", outputs: [], stateMutability: "nonpayable", type: "function", @@ -29836,6 +20997,24 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + }, + PolicyRegistry_Proxy: { + address: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", + abi: [ { inputs: [ { @@ -29852,15 +21031,30 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, ], }, - SortitionModuleNeo_Implementation: { - address: "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", + RandomizerOracle: { + address: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", + abi: [], + }, + SortitionModule: { + address: "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -29952,7 +21146,7 @@ export default { type: "uint256", }, ], - name: "StakeDelayedAlreadyTransferred", + name: "StakeDelayedAlreadyTransferredDeposited", type: "event", }, { @@ -30051,6 +21245,12 @@ export default { name: "_amount", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "_amountAllCourts", + type: "uint256", + }, ], name: "StakeSet", type: "event", @@ -30071,25 +21271,12 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_maxDrawingTime", - type: "uint256", - }, - ], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", + internalType: "address", + name: "_governor", + type: "address", }, ], - name: "changeMaxStakePerJuror", + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", type: "function", @@ -30098,11 +21285,11 @@ export default { inputs: [ { internalType: "uint256", - name: "_maxTotalStaked", + name: "_maxDrawingTime", type: "uint256", }, ], - name: "changeMaxTotalStaked", + name: "changeMaxDrawingTime", outputs: [], stateMutability: "nonpayable", type: "function", @@ -30405,22 +21592,19 @@ export default { name: "_rngLookahead", type: "uint256", }, - { - internalType: "uint256", - name: "_maxStakePerJuror", - type: "uint256", - }, - { - internalType: "uint256", - name: "_maxTotalStaked", - type: "uint256", - }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -30444,7 +21628,7 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, ], @@ -30481,12 +21665,12 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "jurorAccount", type: "address", }, { internalType: "uint96", - name: "", + name: "courtId", type: "uint96", }, ], @@ -30532,32 +21716,6 @@ export default { 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", @@ -30810,19 +21968,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "totalStaked", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { @@ -30859,11 +22004,19 @@ export default { stateMutability: "payable", type: "function", }, - ], - }, - SortitionModuleNeo_Proxy: { - address: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", - abi: [ + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -30880,14 +22033,6 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, SortitionModuleUniversity: { @@ -32039,7 +23184,7 @@ export default { ], }, SortitionModule_Implementation: { - address: "0x45129beB9B84BFb07bA885085C1D60437494a93f", + address: "0xB37919A50d3BddA9982e3c84aA47e501c454364B", abi: [ { inputs: [], @@ -33010,7 +24155,7 @@ export default { ], }, SortitionModule_Proxy: { - address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + address: "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", abi: [ { inputs: [ diff --git a/contracts/deployments/devnet.viem.ts b/contracts/deployments/devnet.viem.ts index 127d161ee..8e3a6c1f0 100644 --- a/contracts/deployments/devnet.viem.ts +++ b/contracts/deployments/devnet.viem.ts @@ -1994,7 +1994,7 @@ export const daiFaucetConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457) */ export const disputeKitClassicAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -2547,14 +2547,14 @@ export const disputeKitClassicAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457) */ export const disputeKitClassicAddress = { - 421614: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", + 421614: "0x2246821E1313A93e2F8CdF7a3422d078f560b457", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457) */ export const disputeKitClassicConfig = { address: disputeKitClassicAddress, @@ -2562,13 +2562,13 @@ export const disputeKitClassicConfig = { } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicNeo +// DisputeKitClassicUniversity ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ -export const disputeKitClassicNeoAbi = [ +export const disputeKitClassicUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, { type: "receive", stateMutability: "payable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, @@ -3098,28 +3098,28 @@ export const disputeKitClassicNeoAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ -export const disputeKitClassicNeoAddress = { - 421614: "0xd40aA608801a639E292e10C235B90488D04070b1", +export const disputeKitClassicUniversityAddress = { + 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ -export const disputeKitClassicNeoConfig = { - address: disputeKitClassicNeoAddress, - abi: disputeKitClassicNeoAbi, +export const disputeKitClassicUniversityConfig = { + address: disputeKitClassicUniversityAddress, + abi: disputeKitClassicUniversityAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicNeo_Implementation +// DisputeKitClassicUniversity_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE636AB278fBfc8712E807c589A362dc2396d2d2F) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) */ -export const disputeKitClassicNeoImplementationAbi = [ +export const disputeKitClassicUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, @@ -3640,28 +3640,28 @@ export const disputeKitClassicNeoImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE636AB278fBfc8712E807c589A362dc2396d2d2F) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) */ -export const disputeKitClassicNeoImplementationAddress = { - 421614: "0xE636AB278fBfc8712E807c589A362dc2396d2d2F", +export const disputeKitClassicUniversityImplementationAddress = { + 421614: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE636AB278fBfc8712E807c589A362dc2396d2d2F) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) */ -export const disputeKitClassicNeoImplementationConfig = { - address: disputeKitClassicNeoImplementationAddress, - abi: disputeKitClassicNeoImplementationAbi, +export const disputeKitClassicUniversityImplementationConfig = { + address: disputeKitClassicUniversityImplementationAddress, + abi: disputeKitClassicUniversityImplementationAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicNeo_Proxy +// DisputeKitClassicUniversity_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ -export const disputeKitClassicNeoProxyAbi = [ +export const disputeKitClassicUniversityProxyAbi = [ { type: "constructor", inputs: [ @@ -3675,30 +3675,29 @@ export const disputeKitClassicNeoProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ -export const disputeKitClassicNeoProxyAddress = { - 421614: "0xd40aA608801a639E292e10C235B90488D04070b1", +export const disputeKitClassicUniversityProxyAddress = { + 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) */ -export const disputeKitClassicNeoProxyConfig = { - address: disputeKitClassicNeoProxyAddress, - abi: disputeKitClassicNeoProxyAbi, +export const disputeKitClassicUniversityProxyConfig = { + address: disputeKitClassicUniversityProxyAddress, + abi: disputeKitClassicUniversityProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicUniversity +// DisputeKitClassic_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24) */ -export const disputeKitClassicUniversityAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, +export const disputeKitClassicImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { @@ -4171,6 +4170,13 @@ export const disputeKitClassicUniversityAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -4189,6 +4195,13 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -4199,6 +4212,13 @@ export const disputeKitClassicUniversityAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -4215,6 +4235,31 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24) + */ +export const disputeKitClassicImplementationAddress = { + 421614: "0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc51Ac08b07832Cf9b51Ff9E9dd3E85a3D205ff24) + */ +export const disputeKitClassicImplementationConfig = { + address: disputeKitClassicImplementationAddress, + abi: disputeKitClassicImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeKitClassic_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457) + */ +export const disputeKitClassicProxyAbi = [ { type: "constructor", inputs: [ @@ -4223,609 +4268,745 @@ export const disputeKitClassicUniversityAbi = [ ], stateMutability: "nonpayable", }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457) */ -export const disputeKitClassicUniversityAddress = { - 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", +export const disputeKitClassicProxyAddress = { + 421614: "0x2246821E1313A93e2F8CdF7a3422d078f560b457", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457) */ -export const disputeKitClassicUniversityConfig = { - address: disputeKitClassicUniversityAddress, - abi: disputeKitClassicUniversityAbi, +export const disputeKitClassicProxyConfig = { + address: disputeKitClassicProxyAddress, + abi: disputeKitClassicProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicUniversity_Implementation +// DisputeResolver ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) + * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x524C5541f440204E0B4577334c439277018F971f) */ -export const disputeKitClassicUniversityImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, +export const disputeResolverAbi = [ { - type: "event", - anonymous: false, + type: "constructor", inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", }, { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", }, ], - name: "ChoiceFunded", + stateMutability: "nonpayable", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", + name: "_arbitrator", + internalType: "contract IArbitratorV2", type: "address", indexed: true, }, { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", + name: "_arbitratorDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_coreRoundID", + name: "_externalDisputeID", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_choice", + name: "_templateId", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", + name: "_templateUri", + internalType: "string", + type: "string", indexed: false, }, ], - name: "Contribution", + name: "DisputeRequest", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", indexed: true, }, { - name: "_numberOfChoices", + name: "_disputeID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { - name: "_extraData", - internalType: "bytes", - type: "bytes", + name: "_ruling", + internalType: "uint256", + type: "uint256", indexed: false, }, ], - name: "DisputeCreation", + name: "Ruling", }, { - type: "event", - anonymous: false, + type: "function", + inputs: [], + name: "arbitrator", + outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "arbitratorDisputeIDToLocalID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", }, ], - name: "Initialized", + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", inputs: [ { - name: "newImplementation", - internalType: "address", + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", type: "address", - indexed: true, }, ], - name: "Upgraded", + name: "changeTemplateRegistry", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplate", internalType: "string", type: "string" }, { - name: "_coreDisputeID", + name: "_disputeTemplateDataMappings", + internalType: "string", + type: "string", + }, + { + name: "_numberOfRulingOptions", internalType: "uint256", type: "uint256", - indexed: true, }, + ], + name: "createDisputeForTemplate", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplateUri", internalType: "string", type: "string" }, { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", }, + ], + name: "createDisputeForTemplateUri", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "isRuled", internalType: "bool", type: "bool" }, + { name: "ruling", internalType: "uint256", type: "uint256" }, { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, + name: "numberOfRulingOptions", + internalType: "uint256", + type: "uint256", }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ { - name: "_choice", + name: "_arbitratorDisputeID", internalType: "uint256", type: "uint256", - indexed: true, }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + ], + name: "rule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "templateRegistry", + outputs: [ { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, + name: "", + internalType: "contract IDisputeTemplateRegistry", + type: "address", }, ], - name: "VoteCast", + stateMutability: "view", + }, +] as const; + +/** + * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x524C5541f440204E0B4577334c439277018F971f) + */ +export const disputeResolverAddress = { + 10200: "0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb", + 421614: "0x524C5541f440204E0B4577334c439277018F971f", +} as const; + +/** + * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x524C5541f440204E0B4577334c439277018F971f) + */ +export const disputeResolverConfig = { + address: disputeResolverAddress, + abi: disputeResolverAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeResolverRuler +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) + */ +export const disputeResolverRulerAbi = [ + { + type: "constructor", + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + stateMutability: "nonpayable", }, { type: "event", anonymous: false, inputs: [ { - name: "_coreDisputeID", + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_arbitratorDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_coreRoundID", + name: "_externalDisputeID", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_choice", + name: "_templateId", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_contributor", - internalType: "address", + name: "_templateUri", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "DisputeRequest", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", type: "address", indexed: true, }, { - name: "_amount", + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "Withdrawal", - }, - { - type: "function", - inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "Ruling", }, { type: "function", inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "arbitrator", + outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "arbitratorDisputeIDToLocalID", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, ], - name: "castCommit", + name: "changeArbitrator", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, - ], - name: "castVote", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", + inputs: [ + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, + ], + name: "changeTemplateRegistry", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplate", internalType: "string", type: "string" }, + { + name: "_disputeTemplateDataMappings", + internalType: "string", + type: "string", + }, + { + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + name: "createDisputeForTemplate", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplateUri", internalType: "string", type: "string" }, + { + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, ], - name: "createDispute", - outputs: [], - stateMutability: "nonpayable", + name: "createDisputeForTemplateUri", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", outputs: [ + { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "isRuled", internalType: "bool", type: "bool" }, { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, + { + name: "numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, ], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + name: "rule", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + inputs: [], + name: "templateRegistry", + outputs: [ + { + name: "", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) + */ +export const disputeResolverRulerAddress = { + 421614: "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) + */ +export const disputeResolverRulerConfig = { + address: disputeResolverRulerAddress, + abi: disputeResolverRulerAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeResolverUniversity +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) + */ +export const disputeResolverUniversityAbi = [ { - type: "function", + type: "constructor", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, ], - name: "fundAppeal", - outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateUri", + internalType: "string", + type: "string", + indexed: false, + }, ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "DisputeRequest", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "Ruling", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], + inputs: [], + name: "arbitrator", + outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, - ], + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "arbitratorDisputeIDToLocalID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + }, ], - stateMutability: "view", + name: "changeArbitrator", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, + { + name: "_templateRegistry", + internalType: "contract IDisputeTemplateRegistry", + type: "address", + }, ], - name: "initialize", + name: "changeTemplateRegistry", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplate", internalType: "string", type: "string" }, + { + name: "_disputeTemplateDataMappings", + internalType: "string", + type: "string", + }, + { + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + name: "createDisputeForTemplate", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "_disputeTemplateUri", internalType: "string", type: "string" }, + { + name: "_numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], + name: "createDisputeForTemplateUri", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, + { name: "isRuled", internalType: "bool", type: "bool" }, + { name: "ruling", internalType: "uint256", type: "uint256" }, + { + name: "numberOfRulingOptions", + internalType: "uint256", + type: "uint256", + }, + ], stateMutability: "view", }, { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, ], - name: "upgradeToAndCall", + name: "rule", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + inputs: [], + name: "templateRegistry", + outputs: [ { - name: "_beneficiary", - internalType: "address payable", + name: "", + internalType: "contract IDisputeTemplateRegistry", type: "address", }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", + stateMutability: "view", }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) */ -export const disputeKitClassicUniversityImplementationAddress = { - 421614: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", +export const disputeResolverUniversityAddress = { + 421614: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) */ -export const disputeKitClassicUniversityImplementationConfig = { - address: disputeKitClassicUniversityImplementationAddress, - abi: disputeKitClassicUniversityImplementationAbi, +export const disputeResolverUniversityConfig = { + address: disputeResolverUniversityAddress, + abi: disputeResolverUniversityAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassicUniversity_Proxy +// DisputeTemplateRegistry ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a) */ -export const disputeKitClassicUniversityProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, +export const disputeTemplateRegistryAbi = [ { type: "fallback", stateMutability: "payable" }, { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityProxyAddress = { - 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) - */ -export const disputeKitClassicUniversityProxyConfig = { - address: disputeKitClassicUniversityProxyAddress, - abi: disputeKitClassicUniversityProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) - */ -export const disputeKitClassicImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { @@ -4845,118 +5026,31 @@ export const disputeKitClassicImplementationAbi = [ anonymous: false, inputs: [ { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "ChoiceFunded", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_commit", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - ], - name: "CommitCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", + name: "_templateId", internalType: "uint256", type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", indexed: true, }, { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Contribution", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", + name: "_templateTag", + internalType: "string", + type: "string", indexed: true, }, { - name: "_numberOfChoices", - internalType: "uint256", - type: "uint256", + name: "_templateData", + internalType: "string", + type: "string", indexed: false, }, { - name: "_extraData", - internalType: "bytes", - type: "bytes", + name: "_templateDataMappings", + internalType: "string", + type: "string", indexed: false, }, ], - name: "DisputeCreation", + name: "DisputeTemplate", }, { type: "event", @@ -4985,155 +5079,186 @@ export const disputeKitClassicImplementationAbi = [ name: "Upgraded", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_juror", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_voteIDs", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_justification", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "VoteCast", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_coreDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_coreRoundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_choice", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_contributor", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Withdrawal", + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "LOSER_APPEAL_PERIOD_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "LOSER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areCommitsAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [ + { name: "_templateTag", internalType: "string", type: "string" }, + { name: "_templateData", internalType: "string", type: "string" }, + { name: "_templateDataMappings", internalType: "string", type: "string" }, + ], + name: "setDisputeTemplate", + outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "areVotesAllCast", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "templates", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_commit", internalType: "bytes32", type: "bytes32" }, + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], - name: "castCommit", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", }, { type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "constructor", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_voteIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - { name: "_salt", internalType: "uint256", type: "uint256" }, - { name: "_justification", internalType: "string", type: "string" }, + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "castVote", - outputs: [], stateMutability: "nonpayable", }, +] as const; + +/** + * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a) + */ +export const disputeTemplateRegistryAddress = { + 10200: "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", + 421614: "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", +} as const; + +/** + * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a) + */ +export const disputeTemplateRegistryConfig = { + address: disputeTemplateRegistryAddress, + abi: disputeTemplateRegistryAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistry_Implementation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592) + */ +export const disputeTemplateRegistryImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, { - type: "function", - inputs: [{ name: "_core", internalType: "address", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", + type: "event", + anonymous: false, + inputs: [ + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_templateTag", + internalType: "string", + type: "string", + indexed: true, + }, + { + name: "_templateData", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_templateDataMappings", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "DisputeTemplate", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], + inputs: [{ name: "_governor", internalType: "address", type: "address" }], name: "changeGovernor", outputs: [], stateMutability: "nonpayable", @@ -5141,145 +5266,192 @@ export const disputeKitClassicImplementationAbi = [ { type: "function", inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "coreDisputeIDToLocal", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", + inputs: [], + name: "initialize2", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "jumped", internalType: "bool", type: "bool" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, + { name: "_templateTag", internalType: "string", type: "string" }, + { name: "_templateData", internalType: "string", type: "string" }, + { name: "_templateDataMappings", internalType: "string", type: "string" }, ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + name: "setDisputeTemplate", + outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "templates", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], - name: "fundAppeal", + name: "upgradeToAndCall", outputs: [], stateMutability: "payable", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - ], - name: "getCoherentCount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592) + */ +export const disputeTemplateRegistryImplementationAddress = { + 421614: "0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0406ea6E28fAb9A23BF0d6f0f23f4352383A8592) + */ +export const disputeTemplateRegistryImplementationConfig = { + address: disputeTemplateRegistryImplementationAddress, + abi: disputeTemplateRegistryImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistry_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a) + */ +export const disputeTemplateRegistryProxyAbi = [ { - type: "function", + type: "constructor", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a) + */ +export const disputeTemplateRegistryProxyAddress = { + 421614: "0x45f0662ec4aA4164b187c1bd39D35D0E3168787a", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45f0662ec4aA4164b187c1bd39D35D0E3168787a) + */ +export const disputeTemplateRegistryProxyConfig = { + address: disputeTemplateRegistryProxyAddress, + abi: disputeTemplateRegistryProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// EvidenceModule +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C) + */ +export const evidenceModuleAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "function", - inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], - name: "getFundedChoices", - outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { name: "winningChoice", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, - { name: "nbVoters", internalType: "uint256", type: "uint256" }, - { name: "choiceCount", internalType: "uint256", type: "uint256" }, + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_party", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_evidence", + internalType: "string", + type: "string", + indexed: false, + }, ], - stateMutability: "view", + name: "Evidence", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, ], - name: "getVoteInfo", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "commit", internalType: "bytes32", type: "bytes32" }, - { name: "choice", internalType: "uint256", type: "uint256" }, - { name: "voted", internalType: "bool", type: "bool" }, + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, ], - stateMutability: "view", + name: "Upgraded", }, { type: "function", @@ -5290,10 +5462,7 @@ export const disputeKitClassicImplementationAbi = [ }, { type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - ], + inputs: [{ name: "_governor", internalType: "address", type: "address" }], name: "initialize", outputs: [], stateMutability: "nonpayable", @@ -5305,17 +5474,6 @@ export const disputeKitClassicImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_voteID", internalType: "uint256", type: "uint256" }, - ], - name: "isVoteActive", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -5325,10 +5483,13 @@ export const disputeKitClassicImplementationAbi = [ }, { type: "function", - inputs: [], - name: "singleDrawPerJuror", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [ + { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_evidence", internalType: "string", type: "string" }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", @@ -5348,380 +5509,369 @@ export const disputeKitClassicImplementationAbi = [ stateMutability: "view", }, { - type: "function", + type: "constructor", inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { - name: "_beneficiary", - internalType: "address payable", - type: "address", - }, - { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, - { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "withdrawFeesAndRewards", - outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C) */ -export const disputeKitClassicImplementationAddress = { - 421614: "0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa", +export const evidenceModuleAddress = { + 421614: "0x990f44d19a5F46889801B31bf58e0536fBECf27C", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCb9621470b3081f7164445bd8522F8A6c5Bfe3fa) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C) */ -export const disputeKitClassicImplementationConfig = { - address: disputeKitClassicImplementationAddress, - abi: disputeKitClassicImplementationAbi, +export const evidenceModuleConfig = { + address: evidenceModuleAddress, + abi: evidenceModuleAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeKitClassic_Proxy +// EvidenceModule_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8) */ -export const disputeKitClassicProxyAbi = [ +export const evidenceModuleImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b) - */ -export const disputeKitClassicProxyAddress = { - 421614: "0x9426F127116C3652A262AE1eA48391AC8F44D35b", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b) - */ -export const disputeKitClassicProxyConfig = { - address: disputeKitClassicProxyAddress, - abi: disputeKitClassicProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolver -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61) - */ -export const disputeResolverAbi = [ + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "constructor", - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - stateMutability: "nonpayable", + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { type: "event", anonymous: false, inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, { name: "_externalDisputeID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "_party", + internalType: "address", + type: "address", + indexed: true, }, { - name: "_templateUri", + name: "_evidence", internalType: "string", type: "string", indexed: false, }, ], - name: "DisputeRequest", + name: "Evidence", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", + name: "version", + internalType: "uint64", + type: "uint64", indexed: false, }, ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "Initialized", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "newImplementation", + internalType: "address", type: "address", + indexed: true, }, ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", + name: "Upgraded", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", + name: "initialize", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", + inputs: [], + name: "initialize2", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_evidence", internalType: "string", type: "string" }, ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], - name: "rule", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", }, { type: "function", inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, ] as const; /** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8) */ -export const disputeResolverAddress = { - 10200: "0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb", - 421614: "0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61", +export const evidenceModuleImplementationAddress = { + 421614: "0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8", } as const; /** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x16f20604a51Ac1e68c9aAd1C0E53e951B62CC1Cb) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xf9f41910696DadF83a7B0b3e856a175D6aEEC8e8) */ -export const disputeResolverConfig = { - address: disputeResolverAddress, - abi: disputeResolverAbi, +export const evidenceModuleImplementationConfig = { + address: evidenceModuleImplementationAddress, + abi: evidenceModuleImplementationAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverNeo +// EvidenceModule_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C) */ -export const disputeResolverNeoAbi = [ +export const evidenceModuleProxyAbi = [ { type: "constructor", inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, ], stateMutability: "nonpayable", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, - { - name: "_arbitratorDisputeID", - internalType: "uint256", + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C) + */ +export const evidenceModuleProxyAddress = { + 421614: "0x990f44d19a5F46889801B31bf58e0536fBECf27C", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x990f44d19a5F46889801B31bf58e0536fBECf27C) + */ +export const evidenceModuleProxyConfig = { + address: evidenceModuleProxyAddress, + abi: evidenceModuleProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ForeignGatewayOnGnosis +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) + */ +export const foreignGatewayOnGnosisAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_token", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, + ], + name: "AcceptedFeeToken", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "ArbitrationCostModified", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_foreignBlockHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + { + name: "_foreignArbitrable", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_foreignDisputeID", + internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_externalDisputeID", + name: "_choices", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateId", + name: "_extraData", + internalType: "bytes", + type: "bytes", + indexed: false, + }, + ], + name: "CrossChainDisputeOutgoing", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", internalType: "uint256", type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "DisputeCreation", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", indexed: false, }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "_templateUri", - internalType: "string", - type: "string", + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { + name: "_rateInEth", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + { + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", indexed: false, }, ], - name: "DisputeRequest", + name: "NewCurrencyRate", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", indexed: true, }, @@ -5740,30 +5890,50 @@ export const disputeResolverNeoAbi = [ ], name: "Ruling", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, { type: "function", inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], + name: "DEFAULT_NB_OF_JURORS", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", + inputs: [ + { name: "", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "contract IERC20", type: "address" }, + ], + name: "arbitrationCost", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, ], - name: "changeArbitrator", + name: "changeCourtJurorFee", outputs: [], stateMutability: "nonpayable", }, @@ -5774,70 +5944,97 @@ export const disputeResolverNeoAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], + name: "changeHomeGateway", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, + { name: "_veaOutbox", internalType: "address", type: "address" }, + { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, ], - name: "changeTemplateRegistry", + name: "changeVea", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "_choices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, ], - name: "createDisputeForTemplate", + name: "createDispute", outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], stateMutability: "payable", }, { type: "function", inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "contract IERC20", type: "address" }, + { name: "", internalType: "uint256", type: "uint256" }, ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", + name: "createDispute", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", + name: "currentRuling", outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bool", type: "bool" }, + { name: "", internalType: "bool", type: "bool" }, + ], + stateMutability: "pure", + }, + { + type: "function", + inputs: [], + name: "deprecatedVeaOutbox", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "deprecatedVeaOutboxExpiration", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], + name: "disputeHashToForeignID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "disputeHashtoDisputeData", + outputs: [ + { name: "id", internalType: "uint248", type: "uint248" }, + { name: "ruled", internalType: "bool", type: "bool" }, + { name: "arbitrable", internalType: "address", type: "address" }, + { name: "paid", internalType: "uint256", type: "uint256" }, + { name: "relayer", internalType: "address", type: "address" }, ], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "", internalType: "uint96", type: "uint96" }], + name: "feeForJuror", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [], @@ -5845,121 +6042,204 @@ export const disputeResolverNeoAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "homeChainID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "homeGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, + { name: "_governor", internalType: "address", type: "address" }, + { name: "_veaOutbox", internalType: "address", type: "address" }, + { name: "_homeChainID", internalType: "uint256", type: "uint256" }, + { name: "_homeGateway", internalType: "address", type: "address" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_messageSender", internalType: "address", type: "address" }, + { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "_relayer", internalType: "address", type: "address" }, ], - name: "rule", + name: "relayRule", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, + name: "senderGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [], + name: "veaOutbox", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], + name: "withdrawFees", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C) + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) */ -export const disputeResolverNeoAddress = { - 421614: "0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C", +export const foreignGatewayOnGnosisAddress = { + 10200: "0x078dAd05373d19d7fd6829735b765F12242a4300", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C) + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) */ -export const disputeResolverNeoConfig = { - address: disputeResolverNeoAddress, - abi: disputeResolverNeoAbi, +export const foreignGatewayOnGnosisConfig = { + address: foreignGatewayOnGnosisAddress, + abi: foreignGatewayOnGnosisAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverRuler +// ForeignGatewayOnGnosis_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) */ -export const disputeResolverRulerAbi = [ +export const foreignGatewayOnGnosisImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "constructor", + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", + name: "_token", + internalType: "contract IERC20", type: "address", + indexed: true, }, + { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, ], - stateMutability: "nonpayable", + name: "AcceptedFeeToken", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", + name: "_courtID", + internalType: "uint96", + type: "uint96", indexed: true, }, { - name: "_arbitratorDisputeID", + name: "_feeForJuror", internalType: "uint256", type: "uint256", + indexed: false, + }, + ], + name: "ArbitrationCostModified", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_foreignBlockHash", + internalType: "bytes32", + type: "bytes32", + indexed: false, + }, + { + name: "_foreignArbitrable", + internalType: "address", + type: "address", indexed: true, }, { - name: "_externalDisputeID", + name: "_foreignDisputeID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { - name: "_templateId", + name: "_choices", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateUri", - internalType: "string", - type: "string", + name: "_extraData", + internalType: "bytes", + type: "bytes", indexed: false, }, ], - name: "DisputeRequest", + name: "CrossChainDisputeOutgoing", }, { type: "event", anonymous: false, inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, { name: "_disputeID", internalType: "uint256", @@ -5967,273 +6247,121 @@ export const disputeResolverRulerAbi = [ indexed: true, }, { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, }, ], - name: "Ruling", - }, - { - type: "function", - inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "DisputeCreation", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, }, ], - name: "changeArbitrator", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], - name: "changeTemplateRegistry", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplate", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + name: "Initialized", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", + name: "_feeToken", + internalType: "contract IERC20", type: "address", + indexed: true, }, - ], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) - */ -export const disputeResolverRulerAddress = { - 421614: "0x199893232ECC74cC7898B24b5Ff58d613029f6B7", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7) - */ -export const disputeResolverRulerConfig = { - address: disputeResolverRulerAddress, - abi: disputeResolverRulerAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeResolverUniversity -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - */ -export const disputeResolverUniversityAbi = [ - { - type: "constructor", - inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", + name: "_rateInEth", + internalType: "uint64", + type: "uint64", + indexed: false, }, { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", + indexed: false, }, ], - stateMutability: "nonpayable", + name: "NewCurrencyRate", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", indexed: true, }, { - name: "_arbitratorDisputeID", + name: "_disputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_templateId", + name: "_ruling", internalType: "uint256", type: "uint256", indexed: false, }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, ], - name: "DisputeRequest", + name: "Ruling", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "newImplementation", + internalType: "address", type: "address", indexed: true, }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, ], - name: "Ruling", + name: "Upgraded", }, { type: "function", inputs: [], - name: "arbitrator", - outputs: [{ name: "", internalType: "contract IArbitratorV2", type: "address" }], + name: "DEFAULT_NB_OF_JURORS", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "arbitratorDisputeIDToLocalID", + inputs: [ + { name: "", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "contract IERC20", type: "address" }, + ], + name: "arbitrationCost", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, ], - name: "changeArbitrator", + name: "changeCourtJurorFee", outputs: [], stateMutability: "nonpayable", }, @@ -6244,209 +6372,96 @@ export const disputeResolverUniversityAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], + name: "changeHomeGateway", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ - { - name: "_templateRegistry", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, + { name: "_veaOutbox", internalType: "address", type: "address" }, + { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, ], - name: "changeTemplateRegistry", + name: "changeVea", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplate", internalType: "string", type: "string" }, - { - name: "_disputeTemplateDataMappings", - internalType: "string", - type: "string", - }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "_choices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, ], - name: "createDisputeForTemplate", + name: "createDispute", outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], stateMutability: "payable", }, { type: "function", inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "contract IERC20", type: "address" }, + { name: "", internalType: "uint256", type: "uint256" }, ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", + name: "createDispute", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", + name: "currentRuling", outputs: [ - { name: "arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "isRuled", internalType: "bool", type: "bool" }, - { name: "ruling", internalType: "uint256", type: "uint256" }, - { - name: "numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bool", type: "bool" }, + { name: "", internalType: "bool", type: "bool" }, ], - stateMutability: "view", + stateMutability: "pure", }, { type: "function", inputs: [], - name: "governor", + name: "deprecatedVeaOutbox", outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [ - { - name: "_arbitratorDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [], - name: "templateRegistry", - outputs: [ - { - name: "", - internalType: "contract IDisputeTemplateRegistry", - type: "address", - }, - ], + name: "deprecatedVeaOutboxExpiration", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - */ -export const disputeResolverUniversityAddress = { - 421614: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) - */ -export const disputeResolverUniversityConfig = { - address: disputeResolverUniversityAddress, - abi: disputeResolverUniversityAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391) - */ -export const disputeTemplateRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_templateId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_templateTag", - internalType: "string", - type: "string", - indexed: true, - }, - { - name: "_templateData", - internalType: "string", - type: "string", - indexed: false, - }, - { - name: "_templateDataMappings", - internalType: "string", - type: "string", - indexed: false, - }, - ], - name: "DisputeTemplate", - }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", + type: "function", + inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], + name: "disputeHashToForeignID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, + type: "function", + inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "disputeHashtoDisputeData", + outputs: [ + { name: "id", internalType: "uint248", type: "uint248" }, + { name: "ruled", internalType: "bool", type: "bool" }, + { name: "arbitrable", internalType: "address", type: "address" }, + { name: "paid", internalType: "uint256", type: "uint256" }, + { name: "relayer", internalType: "address", type: "address" }, ], - name: "Upgraded", + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "", internalType: "uint96", type: "uint96" }], + name: "feeForJuror", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", @@ -6457,15 +6472,27 @@ export const disputeTemplateRegistryAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "homeChainID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "initialize2", + name: "homeGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_veaOutbox", internalType: "address", type: "address" }, + { name: "_homeChainID", internalType: "uint256", type: "uint256" }, + { name: "_homeGateway", internalType: "address", type: "address" }, + ], + name: "initialize", outputs: [], stateMutability: "nonpayable", }, @@ -6479,19 +6506,20 @@ export const disputeTemplateRegistryAbi = [ { type: "function", inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, + { name: "_messageSender", internalType: "address", type: "address" }, + { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "_relayer", internalType: "address", type: "address" }, ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], + name: "relayRule", + outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "senderGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { @@ -6507,613 +6535,528 @@ export const disputeTemplateRegistryAbi = [ { type: "function", inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "veaOutbox", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], + type: "function", + inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], + name: "withdrawFees", + outputs: [], stateMutability: "nonpayable", }, ] as const; /** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391) + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) */ -export const disputeTemplateRegistryAddress = { - 10200: "0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957", - 421614: "0x596D3B09E684D62217682216e9b7a0De75933391", +export const foreignGatewayOnGnosisImplementationAddress = { + 10200: "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", } as const; /** - * - [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x96E49552669ea81B8E9cE8694F7E4A55D8bFb957) - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391) + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) */ -export const disputeTemplateRegistryConfig = { - address: disputeTemplateRegistryAddress, - abi: disputeTemplateRegistryAbi, +export const foreignGatewayOnGnosisImplementationConfig = { + address: foreignGatewayOnGnosisImplementationAddress, + abi: foreignGatewayOnGnosisImplementationAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Implementation +// ForeignGatewayOnGnosis_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) */ -export const disputeTemplateRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, +export const foreignGatewayOnGnosisProxyAbi = [ { - type: "event", - anonymous: false, + type: "constructor", inputs: [ - { - name: "_templateId", + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) + */ +export const foreignGatewayOnGnosisProxyAddress = { + 10200: "0x078dAd05373d19d7fd6829735b765F12242a4300", +} as const; + +/** + * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) + */ +export const foreignGatewayOnGnosisProxyConfig = { + address: foreignGatewayOnGnosisProxyAddress, + abi: foreignGatewayOnGnosisProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// IHomeGateway +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const iHomeGatewayAbi = [ + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: false, + }, + { + name: "_arbitrableChainId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_arbitrable", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_arbitrableDisputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_templateTag", - internalType: "string", - type: "string", + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", indexed: true, }, { - name: "_templateData", - internalType: "string", - type: "string", + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", indexed: false, }, { - name: "_templateDataMappings", + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateUri", internalType: "string", type: "string", indexed: false, }, ], - name: "DisputeTemplate", + name: "CrossChainDisputeIncoming", }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", + name: "_arbitrator", + internalType: "contract IArbitratorV2", + type: "address", + indexed: true, + }, + { + name: "_arbitratorDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_templateUri", + internalType: "string", + type: "string", indexed: false, }, ], - name: "Initialized", + name: "DisputeRequest", }, { type: "event", anonymous: false, inputs: [ { - name: "newImplementation", - internalType: "address", + name: "_arbitrator", + internalType: "contract IArbitratorV2", type: "address", indexed: true, }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], - name: "Upgraded", + name: "Ruling", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], + name: "disputeHashToHomeID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "feeToken", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "foreignChainID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", + name: "foreignGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "receiverGateway", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_templateTag", internalType: "string", type: "string" }, - { name: "_templateData", internalType: "string", type: "string" }, - { name: "_templateDataMappings", internalType: "string", type: "string" }, + { + name: "_params", + internalType: "struct IHomeGateway.RelayCreateDisputeParams", + type: "tuple", + components: [ + { + name: "foreignBlockHash", + internalType: "bytes32", + type: "bytes32", + }, + { name: "foreignChainID", internalType: "uint256", type: "uint256" }, + { + name: "foreignArbitrable", + internalType: "address", + type: "address", + }, + { + name: "foreignDisputeID", + internalType: "uint256", + type: "uint256", + }, + { + name: "externalDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "templateId", internalType: "uint256", type: "uint256" }, + { name: "templateUri", internalType: "string", type: "string" }, + { name: "choices", internalType: "uint256", type: "uint256" }, + { name: "extraData", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, ], - name: "setDisputeTemplate", - outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], + name: "relayCreateDispute", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "templates", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { + name: "_params", + internalType: "struct IHomeGateway.RelayCreateDisputeParams", + type: "tuple", + components: [ + { + name: "foreignBlockHash", + internalType: "bytes32", + type: "bytes32", + }, + { name: "foreignChainID", internalType: "uint256", type: "uint256" }, + { + name: "foreignArbitrable", + internalType: "address", + type: "address", + }, + { + name: "foreignDisputeID", + internalType: "uint256", + type: "uint256", + }, + { + name: "externalDisputeID", + internalType: "uint256", + type: "uint256", + }, + { name: "templateId", internalType: "uint256", type: "uint256" }, + { name: "templateUri", internalType: "string", type: "string" }, + { name: "choices", internalType: "uint256", type: "uint256" }, + { name: "extraData", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "relayCreateDispute", + outputs: [], + stateMutability: "payable", }, { type: "function", inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, ], - name: "upgradeToAndCall", + name: "rule", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "veaInbox", + outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], stateMutability: "view", }, ] as const; -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) - */ -export const disputeTemplateRegistryImplementationAddress = { - 421614: "0x03D29FE2bDd759613B92C190e2991036b2939Ff1", -} as const; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCore +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x03D29FE2bDd759613B92C190e2991036b2939Ff1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6) */ -export const disputeTemplateRegistryImplementationConfig = { - address: disputeTemplateRegistryImplementationAddress, - abi: disputeTemplateRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391) - */ -export const disputeTemplateRegistryProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391) - */ -export const disputeTemplateRegistryProxyAddress = { - 421614: "0x596D3B09E684D62217682216e9b7a0De75933391", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391) - */ -export const disputeTemplateRegistryProxyConfig = { - address: disputeTemplateRegistryProxyAddress, - abi: disputeTemplateRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09) - */ -export const evidenceModuleAbi = [ +export const klerosCoreAbi = [ { type: "fallback", stateMutability: "payable" }, { type: "receive", stateMutability: "payable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "AppealFeesNotEnough" }, + { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, + { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, + { type: "error", inputs: [], name: "CannotDisableClassicDK" }, + { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, + { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, + { type: "error", inputs: [], name: "DisputeKitOnly" }, + { type: "error", inputs: [], name: "DisputeNotAppealable" }, + { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, + { type: "error", inputs: [], name: "DisputeStillDrawing" }, + { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, + { type: "error", inputs: [], name: "GovernorOnly" }, + { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, + { type: "error", inputs: [], name: "InvalidDisputKitParent" }, + { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, + { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, + { type: "error", inputs: [], name: "NotEvidencePeriod" }, + { type: "error", inputs: [], name: "NotExecutionPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, + { type: "error", inputs: [], name: "SortitionModuleOnly" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, + { type: "error", inputs: [], name: "TokenNotAccepted" }, + { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", inputs: [{ name: "slot", internalType: "bytes32", 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: "event", anonymous: false, inputs: [ { - name: "_externalDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_party", - internalType: "address", + name: "_token", + internalType: "contract IERC20", type: "address", indexed: true, }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, + { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, ], - name: "Evidence", + name: "AcceptedFeeToken", }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "newImplementation", - internalType: "address", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", indexed: true, }, ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09) - */ -export const evidenceModuleAddress = { - 421614: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09) - */ -export const evidenceModuleConfig = { - address: evidenceModuleAddress, - abi: evidenceModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) - */ -export const evidenceModuleImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + name: "AppealDecision", }, { type: "event", anonymous: false, inputs: [ { - name: "_externalDisputeID", + name: "_disputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_party", - internalType: "address", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", indexed: true, }, - { - name: "_evidence", - internalType: "string", - type: "string", - indexed: false, - }, ], - name: "Evidence", + name: "AppealPossible", }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "newImplementation", - internalType: "address", - type: "address", + name: "_parent", + internalType: "uint96", + type: "uint96", indexed: true, }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_alpha", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + indexed: false, + }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) - */ -export const evidenceModuleImplementationAddress = { - 421614: "0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x6C255c01E6547f6C9ed98E7f3d9BB3eF9a347C52) - */ -export const evidenceModuleImplementationConfig = { - address: evidenceModuleImplementationAddress, - abi: evidenceModuleImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09) - */ -export const evidenceModuleProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09) - */ -export const evidenceModuleProxyAddress = { - 421614: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09) - */ -export const evidenceModuleProxyConfig = { - address: evidenceModuleProxyAddress, - abi: evidenceModuleProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + name: "CourtCreated", }, { type: "event", anonymous: false, inputs: [ { - name: "_token", - internalType: "contract IERC20", - type: "address", + name: "_disputeID", + internalType: "uint256", + type: "uint256", indexed: true, }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromCourtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_toCourtID", + internalType: "uint96", + type: "uint96", + indexed: false, + }, ], - name: "AcceptedFeeToken", + name: "CourtJump", }, { type: "event", @@ -7126,50 +7069,43 @@ export const foreignGatewayOnGnosisAbi = [ indexed: true, }, { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", + name: "_hiddenVotes", + internalType: "bool", + type: "bool", indexed: false, }, - ], - name: "ArbitrationCostModified", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "_foreignBlockHash", - internalType: "bytes32", - type: "bytes32", + name: "_minStake", + internalType: "uint256", + type: "uint256", indexed: false, }, { - name: "_foreignArbitrable", - internalType: "address", - type: "address", - indexed: true, + name: "_alpha", + internalType: "uint256", + type: "uint256", + indexed: false, }, { - name: "_foreignDisputeID", + name: "_feeForJuror", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_choices", + name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_extraData", - internalType: "bytes", - type: "bytes", + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", indexed: false, }, ], - name: "CrossChainDisputeOutgoing", + name: "CourtModified", }, { type: "event", @@ -7195,26 +7131,164 @@ export const foreignGatewayOnGnosisAbi = [ anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + indexed: true, }, ], - name: "Initialized", + name: "DisputeKitCreated", }, { type: "event", anonymous: false, inputs: [ { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", + name: "_courtID", + internalType: "uint96", + type: "uint96", indexed: true, }, { - name: "_rateInEth", + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "_enable", internalType: "bool", type: "bool", indexed: true }, + ], + name: "DisputeKitEnabled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_toDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "DisputeKitJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_address", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_voteID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Draw", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_pnkAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "LeftoverRewardSent", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { + name: "_rateInEth", internalType: "uint64", type: "uint64", indexed: false, @@ -7228,6 +7302,26 @@ export const foreignGatewayOnGnosisAbi = [ ], name: "NewCurrencyRate", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + indexed: false, + }, + ], + name: "NewPeriod", + }, + { type: "event", anonymous: false, inputs: [], name: "Paused" }, { type: "event", anonymous: false, @@ -7253,6 +7347,56 @@ export const foreignGatewayOnGnosisAbi = [ ], name: "Ruling", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_degreeOfCoherency", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_pnkAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "TokenAndETHShift", + }, + { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -7268,623 +7412,558 @@ export const foreignGatewayOnGnosisAbi = [ }, { type: "function", - inputs: [], - name: "DEFAULT_NB_OF_JURORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, ], - name: "arbitrationCost", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", + name: "appeal", + outputs: [], + stateMutability: "payable", }, { type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealCost", outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealPeriod", + outputs: [ + { name: "start", internalType: "uint256", type: "uint256" }, + { name: "end", internalType: "uint256", type: "uint256" }, ], - name: "changeCourtJurorFee", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + ], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], - name: "changeHomeGateway", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_accepted", internalType: "bool", type: "bool" }, ], - name: "changeVea", + name: "changeAcceptedFeeTokens", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_choices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", + name: "changeCourtParameters", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_rateInEth", internalType: "uint64", type: "uint64" }, + { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, ], - name: "createDispute", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", + name: "changeCurrencyRates", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bool", type: "bool" }, - { name: "", internalType: "bool", type: "bool" }, - ], - stateMutability: "pure", + inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "deprecatedVeaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [{ name: "_guardian", internalType: "address", type: "address" }], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "deprecatedVeaOutboxExpiration", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, + ], + name: "changeJurorProsecutionModule", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToForeignID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashtoDisputeData", - outputs: [ - { name: "id", internalType: "uint248", type: "uint248" }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "arbitrable", internalType: "address", type: "address" }, - { name: "paid", internalType: "uint256", type: "uint256" }, - { name: "relayer", internalType: "address", type: "address" }, + inputs: [ + { + name: "_sortitionModule", + internalType: "contract ISortitionModule", + type: "address", + }, ], - stateMutability: "view", + name: "changeSortitionModule", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint96", type: "uint96" }], - name: "feeForJuror", + inputs: [ + { name: "_toToken", internalType: "contract IERC20", type: "address" }, + { name: "_amountInEth", internalType: "uint256", type: "uint256" }, + ], + name: "convertEthToTokenAmount", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "courts", + outputs: [ + { name: "parent", internalType: "uint96", type: "uint96" }, + { name: "hiddenVotes", internalType: "bool", type: "bool" }, + { name: "minStake", internalType: "uint256", type: "uint256" }, + { name: "alpha", internalType: "uint256", type: "uint256" }, + { name: "feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { name: "disabled", internalType: "bool", type: "bool" }, + ], stateMutability: "view", }, { type: "function", - inputs: [], - name: "homeChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "_parent", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + }, + ], + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "homeGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [ + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + ], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_homeChainID", internalType: "uint256", type: "uint256" }, - { name: "_homeGateway", internalType: "address", type: "address" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, ], - name: "initialize", - outputs: [], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + name: "currencyRates", + outputs: [ + { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, + { name: "rateInEth", internalType: "uint64", type: "uint64" }, + { name: "rateDecimals", internalType: "uint8", type: "uint8" }, + ], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_messageSender", internalType: "address", type: "address" }, - { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "_relayer", internalType: "address", type: "address" }, + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "currentRuling", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, ], - name: "relayRule", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", }, { type: "function", - inputs: [], - name: "senderGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputeKits", + outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "courtID", internalType: "uint96", type: "uint96" }, + { + name: "arbitrated", + internalType: "contract IArbitrableV2", + type: "address", + }, + { + name: "period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + }, + { name: "ruled", internalType: "bool", type: "bool" }, + { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "veaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "withdrawFees", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "draw", outputs: [], stateMutability: "nonpayable", }, { - type: "constructor", + type: "function", inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_enable", internalType: "bool", type: "bool" }, ], + name: "enableDisputeKits", + outputs: [], stateMutability: "nonpayable", }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisAddress = { - 10200: "0x078dAd05373d19d7fd6829735b765F12242a4300", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisConfig = { - address: foreignGatewayOnGnosisAddress, - abi: foreignGatewayOnGnosisAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) - */ -export const foreignGatewayOnGnosisImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "execute", + outputs: [], + stateMutability: "nonpayable", }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + type: "function", + inputs: [ + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + name: "executeGovernorProposal", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "getDisputeKitsLength", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfRounds", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfVotes", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + ], + name: "getRoundInfo", + outputs: [ { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, + name: "", + internalType: "struct KlerosCoreBase.Round", + type: "tuple", + components: [ + { name: "disputeKitID", internalType: "uint256", type: "uint256" }, + { + name: "pnkAtStakePerJuror", + internalType: "uint256", + type: "uint256", + }, + { + name: "totalFeesForJurors", + internalType: "uint256", + type: "uint256", + }, + { name: "nbVotes", internalType: "uint256", type: "uint256" }, + { name: "repartitions", internalType: "uint256", type: "uint256" }, + { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, + { name: "drawnJurors", internalType: "address[]", type: "address[]" }, + { + name: "sumFeeRewardPaid", + internalType: "uint256", + type: "uint256", + }, + { + name: "sumPnkRewardPaid", + internalType: "uint256", + type: "uint256", + }, + { + name: "feeToken", + internalType: "contract IERC20", + type: "address", + }, + { name: "drawIterations", internalType: "uint256", type: "uint256" }, + ], }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, ], - name: "AcceptedFeeToken", + stateMutability: "view", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, + type: "function", + inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], + name: "getTimesPerPeriod", + outputs: [ { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", }, ], - name: "ArbitrationCostModified", + stateMutability: "view", }, { - type: "event", - anonymous: false, + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "guardian", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_guardian", internalType: "address", type: "address" }, + { name: "_pinakion", internalType: "contract IERC20", type: "address" }, { - name: "_foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - indexed: false, - }, - { - name: "_foreignArbitrable", + name: "_jurorProsecutionModule", internalType: "address", type: "address", - indexed: true, - }, - { - name: "_foreignDisputeID", - internalType: "uint256", - type: "uint256", - indexed: true, }, { - name: "_choices", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "_disputeKit", + internalType: "contract IDisputeKit", + type: "address", }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, { - name: "_extraData", - internalType: "bytes", - type: "bytes", - indexed: false, + name: "_courtParameters", + internalType: "uint256[4]", + type: "uint256[4]", }, - ], - name: "CrossChainDisputeOutgoing", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, { - name: "_arbitrable", - internalType: "contract IArbitrableV2", + name: "_sortitionModuleAddress", + internalType: "contract ISortitionModule", type: "address", - indexed: true, }, ], - name: "DisputeCreation", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "isDisputeKitJumping", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", + name: "isSupported", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "DEFAULT_NB_OF_JURORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + name: "jurorProsecutionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - ], - name: "changeCourtJurorFee", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_homeGateway", internalType: "address", type: "address" }], - name: "changeHomeGateway", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "passPeriod", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_gracePeriod", internalType: "uint256", type: "uint256" }, - ], - name: "changeVea", + inputs: [], + name: "pause", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "_choices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "", internalType: "contract IERC20", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "pure", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bool", type: "bool" }, - { name: "", internalType: "bool", type: "bool" }, - ], - stateMutability: "pure", - }, - { - type: "function", - inputs: [], - name: "deprecatedVeaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [], - name: "deprecatedVeaOutboxExpiration", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToForeignID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashtoDisputeData", - outputs: [ - { name: "id", internalType: "uint248", type: "uint248" }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "arbitrable", internalType: "address", type: "address" }, - { name: "paid", internalType: "uint256", type: "uint256" }, - { name: "relayer", internalType: "address", type: "address" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint96", type: "uint96" }], - name: "feeForJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "paused", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "pinakion", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "homeChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "homeGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + ], + name: "setStake", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_veaOutbox", internalType: "address", type: "address" }, - { name: "_homeChainID", internalType: "uint256", type: "uint256" }, - { name: "_homeGateway", internalType: "address", type: "address" }, + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, ], - name: "initialize", + name: "setStakeBySortitionModule", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "sortitionModule", + outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_messageSender", internalType: "address", type: "address" }, - { name: "_disputeHash", internalType: "bytes32", type: "bytes32" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "_relayer", internalType: "address", type: "address" }, - ], - name: "relayRule", + inputs: [], + name: "unpause", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [], - name: "senderGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -7898,176 +7977,301 @@ export const foreignGatewayOnGnosisImplementationAbi = [ { type: "function", inputs: [], - name: "veaOutbox", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "withdrawFees", - outputs: [], + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], stateMutability: "nonpayable", }, ] as const; /** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6) */ -export const foreignGatewayOnGnosisImplementationAddress = { - 10200: "0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace", +export const klerosCoreAddress = { + 421614: "0x4838e31E0ea315232c431598110FE677cAF2D6E6", } as const; /** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0xA4096fDA5291D5bbDD5Ed0D6CF2AF98229168Ace) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6) */ -export const foreignGatewayOnGnosisImplementationConfig = { - address: foreignGatewayOnGnosisImplementationAddress, - abi: foreignGatewayOnGnosisImplementationAbi, +export const klerosCoreConfig = { + address: klerosCoreAddress, + abi: klerosCoreAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ForeignGatewayOnGnosis_Proxy +// KlerosCoreRuler ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) */ -export const foreignGatewayOnGnosisProxyAbi = [ +export const klerosCoreRulerAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "AppealFeesNotEnough" }, + { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, + { type: "error", inputs: [], name: "DisputeNotAppealable" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { type: "error", inputs: [], name: "GovernorOnly" }, + { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, + { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { - type: "constructor", + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NoRulerSet" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "RulerOnly" }, + { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, + { type: "error", inputs: [], name: "RulingModeNotSet" }, + { type: "error", inputs: [], name: "TokenNotAccepted" }, + { type: "error", inputs: [], name: "TransferFailed" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { type: "error", inputs: [], name: "UnsuccessfulCall" }, + { + type: "event", + anonymous: false, inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { + name: "_token", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, ], - stateMutability: "nonpayable", + name: "AcceptedFeeToken", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisProxyAddress = { - 10200: "0x078dAd05373d19d7fd6829735b765F12242a4300", -} as const; - -/** - * [__View Contract on Gnosis Chiado Blockscout__](https://blockscout.chiadochain.net/address/0x078dAd05373d19d7fd6829735b765F12242a4300) - */ -export const foreignGatewayOnGnosisProxyConfig = { - address: foreignGatewayOnGnosisProxyAddress, - abi: foreignGatewayOnGnosisProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IHomeGateway -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const iHomeGatewayAbi = [ { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", - indexed: false, + indexed: true, }, + ], + name: "AppealDecision", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "_arbitrableChainId", + name: "_disputeID", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, { name: "_arbitrable", - internalType: "address", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + ], + name: "AppealPossible", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", indexed: true, }, { - name: "_arbitrableDisputeID", + name: "mode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + indexed: true, + }, + { + name: "_disputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_arbitratorDisputeID", + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { name: "tied", internalType: "bool", type: "bool", indexed: false }, + { + name: "overridden", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "AutoRuled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_externalDisputeID", + name: "_parent", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateId", + name: "_alpha", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateUri", - internalType: "string", - type: "string", + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", indexed: false, }, ], - name: "CrossChainDisputeIncoming", + name: "CourtCreated", }, { type: "event", anonymous: false, inputs: [ { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", + name: "_disputeID", + internalType: "uint256", + type: "uint256", indexed: true, }, { - name: "_arbitratorDisputeID", + name: "_roundID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_externalDisputeID", + name: "_fromCourtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_toCourtID", + internalType: "uint96", + type: "uint96", + indexed: false, + }, + ], + name: "CourtJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_hiddenVotes", + internalType: "bool", + type: "bool", + indexed: false, + }, + { + name: "_minStake", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateId", + name: "_alpha", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_templateUri", - internalType: "string", - type: "string", + name: "_feeForJuror", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_jurorsForCourtJump", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", indexed: false, }, ], - name: "DisputeRequest", + name: "CourtModified", }, { type: "event", anonymous: false, inputs: [ - { - name: "_arbitrator", - internalType: "contract IArbitratorV2", - type: "address", - indexed: true, - }, { name: "_disputeID", internalType: "uint256", @@ -8075,221 +8279,88 @@ export const iHomeGatewayAbi = [ indexed: true, }, { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, }, ], - name: "Ruling", + name: "DisputeCreation", }, { - type: "function", - inputs: [{ name: "_disputeHash", internalType: "bytes32", type: "bytes32" }], - name: "disputeHashToHomeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "feeToken", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignChainID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "foreignGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "receiverGateway", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "nonpayable", + name: "Initialized", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ { - name: "_params", - internalType: "struct IHomeGateway.RelayCreateDisputeParams", - type: "tuple", - components: [ - { - name: "foreignBlockHash", - internalType: "bytes32", - type: "bytes32", - }, - { name: "foreignChainID", internalType: "uint256", type: "uint256" }, - { - name: "foreignArbitrable", - internalType: "address", - type: "address", - }, - { - name: "foreignDisputeID", - internalType: "uint256", - type: "uint256", - }, - { - name: "externalDisputeID", - internalType: "uint256", - type: "uint256", - }, - { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, - { name: "choices", internalType: "uint256", type: "uint256" }, - { name: "extraData", internalType: "bytes", type: "bytes" }, - ], + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_pnkAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, }, ], - name: "relayCreateDispute", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - ], - name: "rule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "veaInbox", - outputs: [{ name: "", internalType: "contract IVeaInbox", type: "address" }], - stateMutability: "view", - }, -] as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8) - */ -export const klerosCoreAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + name: "LeftoverRewardSent", }, - { 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: "event", anonymous: false, inputs: [ { - name: "_token", + name: "_feeToken", internalType: "contract IERC20", type: "address", indexed: true, }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, + { + name: "_rateInEth", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + { + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", + indexed: false, + }, ], - name: "AcceptedFeeToken", + name: "NewCurrencyRate", }, { type: "event", @@ -8302,236 +8373,78 @@ export const klerosCoreAbi = [ indexed: true, }, { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, + name: "_period", + internalType: "enum KlerosCoreRuler.Period", + type: "uint8", + indexed: false, }, ], - name: "AppealDecision", + name: "NewPeriod", }, { type: "event", anonymous: false, inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, { name: "_arbitrable", internalType: "contract IArbitrableV2", type: "address", indexed: true, }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", + name: "_oldRuler", + internalType: "address", + type: "address", indexed: true, }, { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", + name: "_newRuler", + internalType: "address", + type: "address", indexed: true, }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, ], - name: "CourtJump", + name: "RulerChanged", }, { type: "event", anonymous: false, inputs: [ { - name: "_courtID", - internalType: "uint96", - type: "uint96", + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", indexed: true, }, { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", + name: "_settings", + internalType: "struct KlerosCoreRuler.RulerSettings", + type: "tuple", + components: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], indexed: false, }, ], - name: "CourtModified", + name: "RulerSettingsChanged", }, { type: "event", anonymous: false, inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, { name: "_arbitrable", internalType: "contract IArbitrableV2", type: "address", indexed: true, }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ { name: "_disputeID", internalType: "uint256", @@ -8539,32 +8452,20 @@ export const klerosCoreAbi = [ indexed: true, }, { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", + name: "_ruling", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "DisputeKitJump", + name: "Ruling", }, { type: "event", anonymous: false, inputs: [ { - name: "_address", + name: "_account", internalType: "address", type: "address", indexed: true, @@ -8579,56 +8480,24 @@ export const klerosCoreAbi = [ name: "_roundID", internalType: "uint256", type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", indexed: true, }, { - name: "_roundID", + name: "_degreeOfCoherency", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { name: "_pnkAmount", - internalType: "uint256", - type: "uint256", + internalType: "int256", + type: "int256", indexed: false, }, { name: "_feeAmount", - internalType: "uint256", - type: "uint256", + internalType: "int256", + type: "int256", indexed: false, }, { @@ -8638,128 +8507,8 @@ export const klerosCoreAbi = [ indexed: false, }, ], - name: "LeftoverRewardSent", + name: "TokenAndETHShift", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -8773,25 +8522,13 @@ export const klerosCoreAbi = [ ], name: "Upgraded", }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "bytes", type: "bytes" }, + { name: "_jump", internalType: "bool", type: "bool" }, ], name: "appeal", outputs: [], @@ -8799,21 +8536,14 @@ export const klerosCoreAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_jump", internalType: "bool", type: "bool" }, + ], name: "appealCost", outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -8880,8 +8610,8 @@ export const klerosCoreAbi = [ }, { type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", outputs: [], stateMutability: "nonpayable", }, @@ -8889,19 +8619,29 @@ export const klerosCoreAbi = [ type: "function", inputs: [ { - name: "_jurorProsecutionModule", - internalType: "address", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, + { name: "_newRuler", internalType: "address", type: "address" }, ], - name: "changeJurorProsecutionModule", + name: "changeRuler", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + { name: "_presetRuling", internalType: "uint256", type: "uint256" }, + { name: "_presetTied", internalType: "bool", type: "bool" }, + { name: "_presetOverridden", internalType: "bool", type: "bool" }, + ], + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", }, @@ -8909,12 +8649,25 @@ export const klerosCoreAbi = [ type: "function", inputs: [ { - name: "_sortitionModule", - internalType: "contract ISortitionModule", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToAutomaticRandom", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", }, @@ -8957,12 +8710,6 @@ export const klerosCoreAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -9012,13 +8759,6 @@ export const klerosCoreAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -9032,41 +8772,18 @@ export const klerosCoreAbi = [ }, { name: "period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", type: "uint8", }, { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], stateMutability: "view", }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, ], name: "execute", outputs: [], @@ -9085,7 +8802,12 @@ export const klerosCoreAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], name: "executeRuling", outputs: [], stateMutability: "nonpayable", @@ -9093,7 +8815,7 @@ export const klerosCoreAbi = [ { type: "function", inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, @@ -9121,40 +8843,24 @@ export const klerosCoreAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCoreBase.Round", + internalType: "struct KlerosCoreRuler.Round", type: "tuple", components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, { name: "totalFeesForJurors", internalType: "uint256", type: "uint256", }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, { name: "sumFeeRewardPaid", internalType: "uint256", type: "uint256", }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, { name: "feeToken", internalType: "contract IERC20", type: "address", }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, ], }, ], @@ -9180,103 +8886,21 @@ export const klerosCoreAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, { name: "_courtParameters", internalType: "uint256[4]", type: "uint256[4]", }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [], - name: "initialize3", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -9294,38 +8918,48 @@ export const klerosCoreAbi = [ { type: "function", inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + name: "rulers", + outputs: [{ name: "ruler", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + name: "rulingResults", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "settings", + outputs: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", }, { type: "function", @@ -9337,13 +8971,6 @@ export const klerosCoreAbi = [ outputs: [], stateMutability: "payable", }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, { type: "constructor", inputs: [ @@ -9355,69 +8982,47 @@ export const klerosCoreAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) */ -export const klerosCoreAddress = { - 421614: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", +export const klerosCoreRulerAddress = { + 421614: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) */ -export const klerosCoreConfig = { - address: klerosCoreAddress, - abi: klerosCoreAbi, +export const klerosCoreRulerConfig = { + address: klerosCoreRulerAddress, + abi: klerosCoreRulerAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreNeo +// KlerosCoreRuler_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) */ -export const klerosCoreNeoAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, +export const klerosCoreRulerImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", 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: "GovernorOrInstructorOnly" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", 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: "NoRulerSet" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "RulerOnly" }, { 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: "RulingModeNotSet" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -9426,13 +9031,7 @@ export const klerosCoreNeoAbi = [ inputs: [{ name: "slot", internalType: "bytes32", 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: "event", anonymous: false, @@ -9485,6 +9084,44 @@ export const klerosCoreNeoAbi = [ ], name: "AppealPossible", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "mode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { name: "tied", internalType: "bool", type: "bool", indexed: false }, + { + name: "overridden", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "AutoRuled", + }, { type: "event", anonymous: false, @@ -9537,12 +9174,6 @@ export const klerosCoreNeoAbi = [ type: "uint256[4]", indexed: false, }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, ], name: "CourtCreated", }, @@ -9650,39 +9281,13 @@ export const klerosCoreNeoAbi = [ anonymous: false, inputs: [ { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, }, ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", + name: "Initialized", }, { type: "event", @@ -9701,63 +9306,50 @@ export const klerosCoreNeoAbi = [ indexed: true, }, { - name: "_fromDisputeKitID", + name: "_pnkAmount", internalType: "uint256", type: "uint256", - indexed: true, + indexed: false, }, { - name: "_toDisputeKitID", + name: "_feeAmount", internalType: "uint256", type: "uint256", indexed: false, }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, ], - name: "DisputeKitJump", + name: "LeftoverRewardSent", }, { type: "event", anonymous: false, inputs: [ { - name: "_address", - internalType: "address", + name: "_feeToken", + internalType: "contract IERC20", type: "address", indexed: true, }, { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", + name: "_rateInEth", + internalType: "uint64", + type: "uint64", indexed: false, }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", indexed: false, }, ], - name: "Initialized", + name: "NewCurrencyRate", }, { type: "event", @@ -9770,77 +9362,68 @@ export const klerosCoreNeoAbi = [ indexed: true, }, { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", + name: "_period", + internalType: "enum KlerosCoreRuler.Period", + type: "uint8", indexed: false, }, ], - name: "LeftoverRewardSent", + name: "NewPeriod", }, { type: "event", anonymous: false, inputs: [ { - name: "_feeToken", - internalType: "contract IERC20", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", indexed: true, }, { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "_oldRuler", + internalType: "address", + type: "address", + indexed: true, }, { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, + name: "_newRuler", + internalType: "address", + type: "address", + indexed: true, }, ], - name: "NewCurrencyRate", + name: "RulerChanged", }, { type: "event", anonymous: false, inputs: [ { - name: "_disputeID", - internalType: "uint256", - type: "uint256", + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", indexed: true, }, { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", + name: "_settings", + internalType: "struct KlerosCoreRuler.RulerSettings", + type: "tuple", + components: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], indexed: false, }, ], - name: "NewPeriod", + name: "RulerSettingsChanged", }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, { type: "event", anonymous: false, @@ -9915,7 +9498,6 @@ export const klerosCoreNeoAbi = [ ], name: "TokenAndETHShift", }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -9929,25 +9511,13 @@ export const klerosCoreNeoAbi = [ ], name: "Upgraded", }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "bytes", type: "bytes" }, + { name: "_jump", internalType: "bool", type: "bool" }, ], name: "appeal", outputs: [], @@ -9955,28 +9525,14 @@ export const klerosCoreNeoAbi = [ }, { type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_jump", internalType: "bool", type: "bool" }, + ], name: "appealCost", outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "arbitrableWhitelist", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -10004,16 +9560,6 @@ export const klerosCoreNeoAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "_arbitrable", internalType: "address", type: "address" }, - { name: "_allowed", internalType: "bool", type: "bool" }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ @@ -10053,15 +9599,22 @@ export const klerosCoreNeoAbi = [ }, { type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], - name: "changeJurorNft", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + { name: "_newRuler", internalType: "address", type: "address" }, + ], + name: "changeRuler", outputs: [], stateMutability: "nonpayable", }, @@ -10069,19 +9622,28 @@ export const klerosCoreNeoAbi = [ type: "function", inputs: [ { - name: "_jurorProsecutionModule", - internalType: "address", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, + { name: "_presetRuling", internalType: "uint256", type: "uint256" }, + { name: "_presetTied", internalType: "bool", type: "bool" }, + { name: "_presetOverridden", internalType: "bool", type: "bool" }, ], - name: "changeJurorProsecutionModule", + name: "changeRulingModeToAutomaticPreset", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", + inputs: [ + { + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "changeRulingModeToAutomaticRandom", outputs: [], stateMutability: "nonpayable", }, @@ -10089,12 +9651,12 @@ export const klerosCoreNeoAbi = [ type: "function", inputs: [ { - name: "_sortitionModule", - internalType: "contract ISortitionModule", + name: "_arbitrable", + internalType: "contract IArbitrableV2", type: "address", }, ], - name: "changeSortitionModule", + name: "changeRulingModeToManual", outputs: [], stateMutability: "nonpayable", }, @@ -10137,12 +9699,6 @@ export const klerosCoreNeoAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, ], name: "createCourt", outputs: [], @@ -10192,13 +9748,6 @@ export const klerosCoreNeoAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -10212,11 +9761,10 @@ export const klerosCoreNeoAbi = [ }, { name: "period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreRuler.Period", type: "uint8", }, { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], stateMutability: "view", }, @@ -10224,20 +9772,20 @@ export const klerosCoreNeoAbi = [ type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, ], - name: "draw", + name: "execute", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "enableDisputeKits", + name: "executeGovernorProposal", outputs: [], stateMutability: "nonpayable", }, @@ -10245,27 +9793,10 @@ export const klerosCoreNeoAbi = [ type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "_ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], name: "executeRuling", outputs: [], stateMutability: "nonpayable", @@ -10273,7 +9804,7 @@ export const klerosCoreNeoAbi = [ { type: "function", inputs: [], - name: "getDisputeKitsLength", + name: "getNextDisputeID", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, @@ -10301,40 +9832,24 @@ export const klerosCoreNeoAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCoreBase.Round", + internalType: "struct KlerosCoreRuler.Round", type: "tuple", components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, { name: "totalFeesForJurors", internalType: "uint256", type: "uint256", }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, { name: "sumFeeRewardPaid", internalType: "uint256", type: "uint256", }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, { name: "feeToken", internalType: "contract IERC20", type: "address", }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, ], }, ], @@ -10360,104 +9875,21 @@ export const klerosCoreNeoAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, { name: "_courtParameters", internalType: "uint256[4]", type: "uint256[4]", }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorNft", - outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -10475,38 +9907,48 @@ export const klerosCoreNeoAbi = [ { type: "function", inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", + name: "rulers", + outputs: [{ name: "ruler", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + name: "rulingResults", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { + name: "arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + }, + ], + name: "settings", + outputs: [ + { + name: "rulingMode", + internalType: "enum KlerosCoreRuler.RulingMode", + type: "uint8", + }, + { name: "presetRuling", internalType: "uint256", type: "uint256" }, + { name: "presetTied", internalType: "bool", type: "bool" }, + { name: "presetOverridden", internalType: "bool", type: "bool" }, + ], + stateMutability: "view", }, { type: "function", @@ -10518,6 +9960,31 @@ export const klerosCoreNeoAbi = [ outputs: [], stateMutability: "payable", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) + */ +export const klerosCoreRulerImplementationAddress = { + 421614: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) + */ +export const klerosCoreRulerImplementationConfig = { + address: klerosCoreRulerImplementationAddress, + abi: klerosCoreRulerImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreRuler_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + */ +export const klerosCoreRulerProxyAbi = [ { type: "constructor", inputs: [ @@ -10526,73 +9993,164 @@ export const klerosCoreNeoAbi = [ ], stateMutability: "nonpayable", }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) */ -export const klerosCoreNeoAddress = { - 421614: "0x26bf077037550e437605F07e25EfcAd510715C3A", +export const klerosCoreRulerProxyAddress = { + 421614: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) */ -export const klerosCoreNeoConfig = { - address: klerosCoreNeoAddress, - abi: klerosCoreNeoAbi, +export const klerosCoreRulerProxyConfig = { + address: klerosCoreRulerProxyAddress, + abi: klerosCoreRulerProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreNeo_Implementation +// KlerosCoreSnapshotProxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xa2425b724B32D40cbB85ea6e181cfb023CE9c014) */ -export const klerosCoreNeoImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", 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" }, +export const klerosCoreSnapshotProxyAbi = [ { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", + type: "constructor", + inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_core", internalType: "contract IKlerosCore", type: "address" }, + ], + stateMutability: "nonpayable", }, - { 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: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], + name: "changeCore", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "core", + outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xa2425b724B32D40cbB85ea6e181cfb023CE9c014) + */ +export const klerosCoreSnapshotProxyAddress = { + 421614: "0xa2425b724B32D40cbB85ea6e181cfb023CE9c014", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xa2425b724B32D40cbB85ea6e181cfb023CE9c014) + */ +export const klerosCoreSnapshotProxyConfig = { + address: klerosCoreSnapshotProxyAddress, + abi: klerosCoreSnapshotProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreUniversity +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + */ +export const klerosCoreUniversityAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AllJurorsDrawn" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "AppealFeesNotEnough" }, + { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, + { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, + { type: "error", inputs: [], name: "ArraysLengthMismatch" }, + { type: "error", inputs: [], name: "CannotDisableClassicDK" }, + { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, + { type: "error", inputs: [], name: "DepthLevelMax" }, + { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, + { type: "error", inputs: [], name: "DisputeKitOnly" }, + { type: "error", inputs: [], name: "DisputeNotAppealable" }, + { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, + { type: "error", inputs: [], name: "DisputeStillDrawing" }, + { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { type: "error", inputs: [], name: "GovernorOnly" }, + { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, + { type: "error", inputs: [], name: "InstructorOnly" }, + { type: "error", inputs: [], name: "InvalidDisputKitParent" }, + { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, + { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, + { type: "error", inputs: [], name: "NoJurorDrawn" }, + { type: "error", inputs: [], name: "NotEvidencePeriod" }, + { type: "error", inputs: [], name: "NotExecutionPeriod" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, + { type: "error", inputs: [], name: "SortitionModuleOnly" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "TokenNotAccepted" }, + { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", @@ -10603,8 +10161,6 @@ export const klerosCoreNeoImplementationAbi = [ { 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: "event", @@ -11006,14 +10562,13 @@ export const klerosCoreNeoImplementationAbi = [ }, { name: "_period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreUniversity.Period", type: "uint8", indexed: false, }, ], name: "NewPeriod", }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, { type: "event", anonymous: false, @@ -11088,7 +10643,6 @@ export const klerosCoreNeoImplementationAbi = [ ], name: "TokenAndETHShift", }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -11143,13 +10697,6 @@ export const klerosCoreNeoImplementationAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "arbitrableWhitelist", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -11177,16 +10724,6 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "_arbitrable", internalType: "address", type: "address" }, - { name: "_allowed", internalType: "bool", type: "bool" }, - ], - name: "changeArbitrableWhitelist", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ @@ -11226,15 +10763,8 @@ export const klerosCoreNeoImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_jurorNft", internalType: "contract IERC721", type: "address" }], - name: "changeJurorNft", + inputs: [{ name: "_instructor", internalType: "address", type: "address" }], + name: "changeInstructor", outputs: [], stateMutability: "nonpayable", }, @@ -11263,7 +10793,7 @@ export const klerosCoreNeoImplementationAbi = [ inputs: [ { name: "_sortitionModule", - internalType: "contract ISortitionModule", + internalType: "contract ISortitionModuleUniversity", type: "address", }, ], @@ -11310,7 +10840,6 @@ export const klerosCoreNeoImplementationAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, { name: "_supportedDisputeKits", internalType: "uint256[]", @@ -11385,7 +10914,7 @@ export const klerosCoreNeoImplementationAbi = [ }, { name: "period", - internalType: "enum KlerosCoreBase.Period", + internalType: "enum KlerosCoreUniversity.Period", type: "uint8", }, { name: "ruled", internalType: "bool", type: "bool" }, @@ -11397,7 +10926,7 @@ export const klerosCoreNeoImplementationAbi = [ type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, + { name: "_juror", internalType: "address", type: "address" }, ], name: "draw", outputs: [], @@ -11474,7 +11003,7 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCoreBase.Round", + internalType: "struct KlerosCoreUniversity.Round", type: "tuple", components: [ { name: "disputeKitID", internalType: "uint256", type: "uint256" }, @@ -11533,18 +11062,11 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, + { name: "_instructor", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, { name: "_jurorProsecutionModule", @@ -11567,18 +11089,23 @@ export const klerosCoreNeoImplementationAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, { name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", + internalType: "contract ISortitionModuleUniversity", type: "address", }, - { name: "_jurorNft", internalType: "contract IERC721", type: "address" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "instructor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -11596,13 +11123,6 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "jurorNft", - outputs: [{ name: "", internalType: "contract IERC721", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -11617,20 +11137,6 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -11671,16 +11177,15 @@ export const klerosCoreNeoImplementationAbi = [ type: "function", inputs: [], name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], + outputs: [ + { + name: "", + internalType: "contract ISortitionModuleUniversity", + type: "address", + }, + ], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ @@ -11691,31 +11196,6 @@ export const klerosCoreNeoImplementationAbi = [ outputs: [], stateMutability: "payable", }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB) - */ -export const klerosCoreNeoImplementationAddress = { - 421614: "0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB) - */ -export const klerosCoreNeoImplementationConfig = { - address: klerosCoreNeoImplementationAddress, - abi: klerosCoreNeoImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreNeo_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A) - */ -export const klerosCoreNeoProxyAbi = [ { type: "constructor", inputs: [ @@ -11724,53 +11204,70 @@ export const klerosCoreNeoProxyAbi = [ ], stateMutability: "nonpayable", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ -export const klerosCoreNeoProxyAddress = { - 421614: "0x26bf077037550e437605F07e25EfcAd510715C3A", +export const klerosCoreUniversityAddress = { + 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ -export const klerosCoreNeoProxyConfig = { - address: klerosCoreNeoProxyAddress, - abi: klerosCoreNeoProxyAbi, +export const klerosCoreUniversityConfig = { + address: klerosCoreUniversityAddress, + abi: klerosCoreUniversityAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler +// KlerosCoreUniversity_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) */ -export const klerosCoreRulerAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, +export const klerosCoreUniversityImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AllJurorsDrawn" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "AppealFeesNotEnough" }, + { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, + { type: "error", inputs: [], name: "ArraysLengthMismatch" }, + { type: "error", inputs: [], name: "CannotDisableClassicDK" }, + { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, + { type: "error", inputs: [], name: "DepthLevelMax" }, + { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, + { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, + { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, + { type: "error", inputs: [], name: "DisputeStillDrawing" }, + { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { type: "error", inputs: [], name: "GovernorOnly" }, { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, + { type: "error", inputs: [], name: "InstructorOnly" }, + { type: "error", inputs: [], name: "InvalidDisputKitParent" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, - { type: "error", inputs: [], name: "NoRulerSet" }, + { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, + { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, + { type: "error", inputs: [], name: "NoJurorDrawn" }, + { type: "error", inputs: [], name: "NotEvidencePeriod" }, + { type: "error", inputs: [], name: "NotExecutionPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulerOnly" }, { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "RulingModeNotSet" }, + { type: "error", inputs: [], name: "SortitionModuleOnly" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -11779,7 +11276,11 @@ export const klerosCoreRulerAbi = [ inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], name: "UUPSUnsupportedProxiableUUID", }, + { type: "error", inputs: [], name: "UnstakingTransferFailed" }, { type: "error", inputs: [], name: "UnsuccessfulCall" }, + { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, + { type: "error", inputs: [], name: "VotePeriodNotPassed" }, + { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, { type: "event", anonymous: false, @@ -11832,44 +11333,6 @@ export const klerosCoreRulerAbi = [ ], name: "AppealPossible", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "mode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "tied", internalType: "bool", type: "bool", indexed: false }, - { - name: "overridden", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "AutoRuled", - }, { type: "event", anonymous: false, @@ -11922,6 +11385,12 @@ export const klerosCoreRulerAbi = [ type: "uint256[4]", indexed: false, }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, ], name: "CourtCreated", }, @@ -12024,6 +11493,107 @@ export const klerosCoreRulerAbi = [ ], name: "DisputeCreation", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + indexed: true, + }, + ], + name: "DisputeKitCreated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { name: "_enable", internalType: "bool", type: "bool", indexed: true }, + ], + name: "DisputeKitEnabled", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_fromDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_toDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "DisputeKitJump", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_address", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_voteID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Draw", + }, { type: "event", anonymous: false, @@ -12111,67 +11681,13 @@ export const klerosCoreRulerAbi = [ }, { name: "_period", - internalType: "enum KlerosCoreRuler.Period", + internalType: "enum KlerosCoreUniversity.Period", type: "uint8", indexed: false, }, ], name: "NewPeriod", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_oldRuler", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_newRuler", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RulerChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_settings", - internalType: "struct KlerosCoreRuler.RulerSettings", - type: "tuple", - components: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - indexed: false, - }, - ], - name: "RulerSettingsChanged", - }, { type: "event", anonymous: false, @@ -12259,13 +11775,25 @@ export const klerosCoreRulerAbi = [ ], name: "Upgraded", }, + { + type: "function", + inputs: [ + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + }, + ], + name: "addNewDisputeKit", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "_jump", internalType: "bool", type: "bool" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, ], name: "appeal", outputs: [], @@ -12273,14 +11801,21 @@ export const klerosCoreRulerAbi = [ }, { type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], name: "appealCost", outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealPeriod", + outputs: [ + { name: "start", internalType: "uint256", type: "uint256" }, + { name: "end", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -12347,8 +11882,8 @@ export const klerosCoreRulerAbi = [ }, { type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", + inputs: [{ name: "_instructor", internalType: "address", type: "address" }], + name: "changeInstructor", outputs: [], stateMutability: "nonpayable", }, @@ -12356,42 +11891,19 @@ export const klerosCoreRulerAbi = [ type: "function", inputs: [ { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_newRuler", internalType: "address", type: "address" }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", + name: "_jurorProsecutionModule", + internalType: "address", type: "address", }, - { name: "_presetRuling", internalType: "uint256", type: "uint256" }, - { name: "_presetTied", internalType: "bool", type: "bool" }, - { name: "_presetOverridden", internalType: "bool", type: "bool" }, ], - name: "changeRulingModeToAutomaticPreset", + name: "changeJurorProsecutionModule", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", outputs: [], stateMutability: "nonpayable", }, @@ -12399,12 +11911,12 @@ export const klerosCoreRulerAbi = [ type: "function", inputs: [ { - name: "_arbitrable", - internalType: "contract IArbitrableV2", + name: "_sortitionModule", + internalType: "contract ISortitionModuleUniversity", type: "address", }, ], - name: "changeRulingModeToManual", + name: "changeSortitionModule", outputs: [], stateMutability: "nonpayable", }, @@ -12447,6 +11959,11 @@ export const klerosCoreRulerAbi = [ internalType: "uint256[4]", type: "uint256[4]", }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + }, ], name: "createCourt", outputs: [], @@ -12496,6 +12013,13 @@ export const klerosCoreRulerAbi = [ ], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputeKits", + outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -12509,18 +12033,41 @@ export const klerosCoreRulerAbi = [ }, { name: "period", - internalType: "enum KlerosCoreRuler.Period", + internalType: "enum KlerosCoreUniversity.Period", type: "uint8", }, { name: "ruled", internalType: "bool", type: "bool" }, + { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, ], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_juror", internalType: "address", type: "address" }, + ], + name: "draw", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_enable", internalType: "bool", type: "bool" }, + ], + name: "enableDisputeKits", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ { name: "_disputeID", internalType: "uint256", type: "uint256" }, { name: "_round", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, ], name: "execute", outputs: [], @@ -12539,12 +12086,7 @@ export const klerosCoreRulerAbi = [ }, { type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], name: "executeRuling", outputs: [], stateMutability: "nonpayable", @@ -12552,7 +12094,7 @@ export const klerosCoreRulerAbi = [ { type: "function", inputs: [], - name: "getNextDisputeID", + name: "getDisputeKitsLength", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, @@ -12580,24 +12122,40 @@ export const klerosCoreRulerAbi = [ outputs: [ { name: "", - internalType: "struct KlerosCoreRuler.Round", + internalType: "struct KlerosCoreUniversity.Round", type: "tuple", components: [ + { name: "disputeKitID", internalType: "uint256", type: "uint256" }, + { + name: "pnkAtStakePerJuror", + internalType: "uint256", + type: "uint256", + }, { name: "totalFeesForJurors", internalType: "uint256", type: "uint256", }, + { name: "nbVotes", internalType: "uint256", type: "uint256" }, + { name: "repartitions", internalType: "uint256", type: "uint256" }, + { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, + { name: "drawnJurors", internalType: "address[]", type: "address[]" }, { name: "sumFeeRewardPaid", internalType: "uint256", type: "uint256", }, + { + name: "sumPnkRewardPaid", + internalType: "uint256", + type: "uint256", + }, { name: "feeToken", internalType: "contract IERC20", type: "address", }, + { name: "drawIterations", internalType: "uint256", type: "uint256" }, ], }, ], @@ -12627,17 +12185,77 @@ export const klerosCoreRulerAbi = [ type: "function", inputs: [ { name: "_governor", internalType: "address", type: "address" }, + { name: "_instructor", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, + { + name: "_disputeKit", + internalType: "contract IDisputeKit", + type: "address", + }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, { name: "_courtParameters", internalType: "uint256[4]", type: "uint256[4]", }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { + name: "_sortitionModuleAddress", + internalType: "contract ISortitionModuleUniversity", + type: "address", + }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "instructor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "isDisputeKitJumping", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, + ], + name: "isSupported", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "jurorProsecutionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "passPeriod", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -12655,46 +12273,35 @@ export const klerosCoreRulerAbi = [ { type: "function", inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, ], - name: "rulers", - outputs: [{ name: "ruler", internalType: "address", type: "address" }], - stateMutability: "view", + name: "setStake", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - name: "rulingResults", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, ], - stateMutability: "view", + name: "setStakeBySortitionModule", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "settings", + inputs: [], + name: "sortitionModule", outputs: [ { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", + name: "", + internalType: "contract ISortitionModuleUniversity", + type: "address", }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, ], stateMutability: "view", }, @@ -12708,6 +12315,31 @@ export const klerosCoreRulerAbi = [ outputs: [], stateMutability: "payable", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) + */ +export const klerosCoreUniversityImplementationAddress = { + 421614: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) + */ +export const klerosCoreUniversityImplementationConfig = { + address: klerosCoreUniversityImplementationAddress, + abi: klerosCoreUniversityImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// KlerosCoreUniversity_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + */ +export const klerosCoreUniversityProxyAbi = [ { type: "constructor", inputs: [ @@ -12716,50 +12348,68 @@ export const klerosCoreRulerAbi = [ ], stateMutability: "nonpayable", }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ -export const klerosCoreRulerAddress = { - 421614: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", +export const klerosCoreUniversityProxyAddress = { + 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) */ -export const klerosCoreRulerConfig = { - address: klerosCoreRulerAddress, - abi: klerosCoreRulerAbi, +export const klerosCoreUniversityProxyConfig = { + address: klerosCoreUniversityProxyAddress, + abi: klerosCoreUniversityProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Implementation +// KlerosCore_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb6839061C3aD03c208EFd697409453bf9900cAb2) */ -export const klerosCoreRulerImplementationAbi = [ +export const klerosCoreImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "AppealFeesNotEnough" }, + { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, + { type: "error", inputs: [], name: "CannotDisableClassicDK" }, + { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, + { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, + { type: "error", inputs: [], name: "DisputeKitOnly" }, + { type: "error", inputs: [], name: "DisputeNotAppealable" }, + { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, + { type: "error", inputs: [], name: "DisputeStillDrawing" }, + { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, + { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, + { type: "error", inputs: [], name: "InvalidDisputKitParent" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, - { type: "error", inputs: [], name: "NoRulerSet" }, + { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, + { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, + { type: "error", inputs: [], name: "NotEvidencePeriod" }, + { type: "error", inputs: [], name: "NotExecutionPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulerOnly" }, { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "RulingModeNotSet" }, + { type: "error", inputs: [], name: "SortitionModuleOnly" }, + { type: "error", inputs: [], name: "StakingInTooManyCourts" }, + { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, + { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, + { type: "error", inputs: [], name: "StakingTransferFailed" }, + { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, { type: "error", inputs: [], name: "TokenNotAccepted" }, { type: "error", inputs: [], name: "TransferFailed" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, @@ -12768,7 +12418,13 @@ export const klerosCoreRulerImplementationAbi = [ inputs: [{ name: "slot", internalType: "bytes32", 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: "event", anonymous: false, @@ -12821,52 +12477,14 @@ export const klerosCoreRulerImplementationAbi = [ ], name: "AppealPossible", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "mode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "tied", internalType: "bool", type: "bool", indexed: false }, - { - name: "overridden", - internalType: "bool", - type: "bool", - indexed: false, - }, - ], - name: "AutoRuled", - }, { type: "event", anonymous: false, inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -12911,6 +12529,12 @@ export const klerosCoreRulerImplementationAbi = [ type: "uint256[4]", indexed: false, }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, ], name: "CourtCreated", }, @@ -13016,5147 +12640,274 @@ export const klerosCoreRulerImplementationAbi = [ { type: "event", anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_oldRuler", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_newRuler", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "RulerChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_settings", - internalType: "struct KlerosCoreRuler.RulerSettings", - type: "tuple", - components: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - indexed: false, - }, - ], - name: "RulerSettingsChanged", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_jump", internalType: "bool", type: "bool" }, - ], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_newRuler", internalType: "address", type: "address" }, - ], - name: "changeRuler", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - { name: "_presetRuling", internalType: "uint256", type: "uint256" }, - { name: "_presetTied", internalType: "bool", type: "bool" }, - { name: "_presetOverridden", internalType: "bool", type: "bool" }, - ], - name: "changeRulingModeToAutomaticPreset", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToAutomaticRandom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "changeRulingModeToManual", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreRuler.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getNextDisputeID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreRuler.Round", - type: "tuple", - components: [ - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "rulers", - outputs: [{ name: "ruler", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - name: "rulingResults", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { - name: "arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - }, - ], - name: "settings", - outputs: [ - { - name: "rulingMode", - internalType: "enum KlerosCoreRuler.RulingMode", - type: "uint8", - }, - { name: "presetRuling", internalType: "uint256", type: "uint256" }, - { name: "presetTied", internalType: "bool", type: "bool" }, - { name: "presetOverridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) - */ -export const klerosCoreRulerImplementationAddress = { - 421614: "0x97e30A3A940856A3913437912C746f1aF6ccC76c", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c) - */ -export const klerosCoreRulerImplementationConfig = { - address: klerosCoreRulerImplementationAddress, - abi: klerosCoreRulerImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreRuler_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) - */ -export const klerosCoreRulerProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) - */ -export const klerosCoreRulerProxyAddress = { - 421614: "0x7ffcd32A0521645E6fCFd071A68F0e26957775a5", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5) - */ -export const klerosCoreRulerProxyConfig = { - address: klerosCoreRulerProxyAddress, - abi: klerosCoreRulerProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreSnapshotProxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) - */ -export const klerosCoreSnapshotProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract IKlerosCore", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "totalStaked", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_core", internalType: "contract IKlerosCore", type: "address" }], - name: "changeCore", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract IKlerosCore", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) - */ -export const klerosCoreSnapshotProxyAddress = { - 421614: "0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9300D415af6e747ADe3C6cbA09a3b3CD5fb0c091) - */ -export const klerosCoreSnapshotProxyConfig = { - address: klerosCoreSnapshotProxyAddress, - abi: klerosCoreSnapshotProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreUniversity -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AllJurorsDrawn" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InstructorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NoJurorDrawn" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_instructor", internalType: "address", type: "address" }], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_juror", internalType: "address", type: "address" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreUniversity.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_instructor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "instructor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [ - { - name: "", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityAddress = { - 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityConfig = { - address: klerosCoreUniversityAddress, - abi: klerosCoreUniversityAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreUniversity_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - */ -export const klerosCoreUniversityImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AllJurorsDrawn" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, - { type: "error", inputs: [], name: "InstructorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NoJurorDrawn" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { type: "error", inputs: [], name: "UnstakingTransferFailed" }, - { type: "error", inputs: [], name: "UnsuccessfulCall" }, - { type: "error", inputs: [], name: "UnsupportedDisputeKit" }, - { type: "error", inputs: [], name: "VotePeriodNotPassed" }, - { type: "error", inputs: [], name: "WrongDisputeKitIndex" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_instructor", internalType: "address", type: "address" }], - name: "changeInstructor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreUniversity.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_juror", internalType: "address", type: "address" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreUniversity.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_instructor", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "instructor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [ - { - name: "", - internalType: "contract ISortitionModuleUniversity", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - */ -export const klerosCoreUniversityImplementationAddress = { - 421614: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) - */ -export const klerosCoreUniversityImplementationConfig = { - address: klerosCoreUniversityImplementationAddress, - abi: klerosCoreUniversityImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCoreUniversity_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityProxyAddress = { - 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) - */ -export const klerosCoreUniversityProxyConfig = { - address: klerosCoreUniversityProxyAddress, - abi: klerosCoreUniversityProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) - */ -export const klerosCoreImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "AppealFeesNotEnough" }, - { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, - { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "CannotDisableClassicDK" }, - { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, - { type: "error", inputs: [], name: "DisputeKitOnly" }, - { type: "error", inputs: [], name: "DisputeNotAppealable" }, - { type: "error", inputs: [], name: "DisputePeriodIsFinal" }, - { type: "error", inputs: [], name: "DisputeStillDrawing" }, - { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GuardianOrGovernorOnly" }, - { type: "error", inputs: [], name: "InvalidDisputKitParent" }, - { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "MinStakeLowerThanParentCourt" }, - { type: "error", inputs: [], name: "MustSupportDisputeKitClassic" }, - { type: "error", inputs: [], name: "NotEvidencePeriod" }, - { type: "error", inputs: [], name: "NotExecutionPeriod" }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "RulingAlreadyExecuted" }, - { type: "error", inputs: [], name: "SortitionModuleOnly" }, - { type: "error", inputs: [], name: "StakingInTooManyCourts" }, - { type: "error", inputs: [], name: "StakingLessThanCourtMinStake" }, - { type: "error", inputs: [], name: "StakingNotPossibeInThisCourt" }, - { type: "error", inputs: [], name: "StakingTransferFailed" }, - { type: "error", inputs: [], name: "StakingZeroWhenNoStake" }, - { type: "error", inputs: [], name: "TokenNotAccepted" }, - { type: "error", inputs: [], name: "TransferFailed" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", 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: "event", - anonymous: false, - inputs: [ - { - name: "_token", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { name: "_accepted", internalType: "bool", type: "bool", indexed: true }, - ], - name: "AcceptedFeeToken", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealDecision", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "AppealPossible", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_parent", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "CourtCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromCourtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_toCourtID", - internalType: "uint96", - type: "uint96", - indexed: false, - }, - ], - name: "CourtJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_hiddenVotes", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "_minStake", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_alpha", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeForJuror", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_jurorsForCourtJump", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - indexed: false, - }, - ], - name: "CourtModified", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - ], - name: "DisputeCreation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - indexed: true, - }, - ], - name: "DisputeKitCreated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_disputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { name: "_enable", internalType: "bool", type: "bool", indexed: true }, - ], - name: "DisputeKitEnabled", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_fromDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_toDisputeKitID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "DisputeKitJump", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_voteID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Draw", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_pnkAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "LeftoverRewardSent", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: true, - }, - { - name: "_rateInEth", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - { - name: "_rateDecimals", - internalType: "uint8", - type: "uint8", - indexed: false, - }, - ], - name: "NewCurrencyRate", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - indexed: false, - }, - ], - name: "NewPeriod", - }, - { type: "event", anonymous: false, inputs: [], name: "Paused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_arbitrable", - internalType: "contract IArbitrableV2", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_ruling", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Ruling", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, - { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", - }, - { - type: "function", - inputs: [ - { - name: "_disputeKitAddress", - internalType: "contract IDisputeKit", - type: "address", - }, - ], - name: "addNewDisputeKit", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "appeal", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "appealPeriod", - outputs: [ - { name: "start", internalType: "uint256", type: "uint256" }, - { name: "end", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - ], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], - name: "arbitrationCost", - outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_accepted", internalType: "bool", type: "bool" }, - ], - name: "changeAcceptedFeeTokens", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - name: "changeCourtParameters", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_rateInEth", internalType: "uint64", type: "uint64" }, - { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, - ], - name: "changeCurrencyRates", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_guardian", internalType: "address", type: "address" }], - name: "changeGuardian", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - ], - name: "changeJurorProsecutionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], - name: "changePinakion", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { - name: "_sortitionModule", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "changeSortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_toToken", internalType: "contract IERC20", type: "address" }, - { name: "_amountInEth", internalType: "uint256", type: "uint256" }, - ], - name: "convertEthToTokenAmount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "courts", - outputs: [ - { name: "parent", internalType: "uint96", type: "uint96" }, - { name: "hiddenVotes", internalType: "bool", type: "bool" }, - { name: "minStake", internalType: "uint256", type: "uint256" }, - { name: "alpha", internalType: "uint256", type: "uint256" }, - { name: "feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_parent", internalType: "uint96", type: "uint96" }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { name: "_minStake", internalType: "uint256", type: "uint256" }, - { name: "_alpha", internalType: "uint256", type: "uint256" }, - { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, - { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_supportedDisputeKits", - internalType: "uint256[]", - type: "uint256[]", - }, - ], - name: "createCourt", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, - { - type: "function", - inputs: [ - { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_feeToken", internalType: "contract IERC20", type: "address" }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "createDispute", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - name: "currencyRates", - outputs: [ - { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, - { name: "rateInEth", internalType: "uint64", type: "uint64" }, - { name: "rateDecimals", internalType: "uint8", type: "uint8" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "currentRuling", - outputs: [ - { name: "ruling", internalType: "uint256", type: "uint256" }, - { name: "tied", internalType: "bool", type: "bool" }, - { name: "overridden", internalType: "bool", type: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputeKits", - outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "disputes", - outputs: [ - { name: "courtID", internalType: "uint96", type: "uint96" }, - { - name: "arbitrated", - internalType: "contract IArbitrableV2", - type: "address", - }, - { - name: "period", - internalType: "enum KlerosCoreBase.Period", - type: "uint8", - }, - { name: "ruled", internalType: "bool", type: "bool" }, - { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, - { name: "_enable", internalType: "bool", type: "bool" }, - ], - name: "enableDisputeKits", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - { name: "_iterations", internalType: "uint256", type: "uint256" }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_destination", internalType: "address", type: "address" }, - { name: "_amount", internalType: "uint256", type: "uint256" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - name: "executeGovernorProposal", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "executeRuling", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getDisputeKitsLength", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfRounds", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "getNumberOfVotes", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_disputeID", internalType: "uint256", type: "uint256" }, - { name: "_round", internalType: "uint256", type: "uint256" }, - ], - name: "getRoundInfo", - outputs: [ - { - name: "", - internalType: "struct KlerosCoreBase.Round", - type: "tuple", - components: [ - { name: "disputeKitID", internalType: "uint256", type: "uint256" }, - { - name: "pnkAtStakePerJuror", - internalType: "uint256", - type: "uint256", - }, - { - name: "totalFeesForJurors", - internalType: "uint256", - type: "uint256", - }, - { name: "nbVotes", internalType: "uint256", type: "uint256" }, - { name: "repartitions", internalType: "uint256", type: "uint256" }, - { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, - { name: "drawnJurors", internalType: "address[]", type: "address[]" }, - { - name: "sumFeeRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "sumPnkRewardPaid", - internalType: "uint256", - type: "uint256", - }, - { - name: "feeToken", - internalType: "contract IERC20", - type: "address", - }, - { name: "drawIterations", internalType: "uint256", type: "uint256" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], - name: "getTimesPerPeriod", - outputs: [ - { - name: "timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "guardian", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_guardian", internalType: "address", type: "address" }, - { name: "_pinakion", internalType: "contract IERC20", type: "address" }, - { - name: "_jurorProsecutionModule", - internalType: "address", - type: "address", - }, - { - name: "_disputeKit", - internalType: "contract IDisputeKit", - type: "address", - }, - { name: "_hiddenVotes", internalType: "bool", type: "bool" }, - { - name: "_courtParameters", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { - name: "_timesPerPeriod", - internalType: "uint256[4]", - type: "uint256[4]", - }, - { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, - { - name: "_sortitionModuleAddress", - internalType: "contract ISortitionModule", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize3", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "isDisputeKitJumping", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, - ], - name: "isSupported", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "jurorProsecutionModule", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], - name: "passPeriod", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "pause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "paused", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "pinakion", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - ], - name: "setStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStakeBySortitionModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "sortitionModule", - outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "unpause", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) - */ -export const klerosCoreImplementationAddress = { - 421614: "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827) - */ -export const klerosCoreImplementationConfig = { - address: klerosCoreImplementationAddress, - abi: klerosCoreImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosCore_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8) - */ -export const klerosCoreProxyAbi = [ - { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", - }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8) - */ -export const klerosCoreProxyAddress = { - 421614: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8) - */ -export const klerosCoreProxyConfig = { - address: klerosCoreProxyAddress, - abi: klerosCoreProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// KlerosV2NeoEarlyUser -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - */ -export const klerosV2NeoEarlyUserAbi = [ - { - type: "constructor", - inputs: [ - { name: "_name", internalType: "string", type: "string" }, - { name: "_symbol", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "approved", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "operator", - internalType: "address", - type: "address", - indexed: true, - }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, - ], - name: "ApprovalForAll", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_newOwner", internalType: "address", type: "address" }], - name: "changeOwner", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "getApproved", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "operator", internalType: "address", type: "address" }, - ], - name: "isApprovedForAll", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "ownerOf", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "safeMint", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "tokenURI", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - */ -export const klerosV2NeoEarlyUserAddress = { - 421614: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - */ -export const klerosV2NeoEarlyUserConfig = { - address: klerosV2NeoEarlyUserAddress, - abi: klerosV2NeoEarlyUserAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNK -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkAddress = { - 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - */ -export const pnkConfig = { address: pnkAddress, abi: pnkAbi } as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PNKFaucet -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - */ -export const pnkFaucetAbi = [ - { - type: "constructor", - inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "amount", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "balance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "changeAmount", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "request", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "withdrewAlready", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - */ -export const pnkFaucetAddress = { - 421614: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - */ -export const pnkFaucetConfig = { - address: pnkFaucetAddress, - abi: pnkFaucetAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PinakionV2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Abi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "spender", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Approval", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, - ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "subtractedValue", internalType: "uint256", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "addedValue", internalType: "uint256", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Address = { - 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", - 11155111: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", -} as const; - -/** - * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - */ -export const pinakionV2Config = { - address: pinakionV2Address, - abi: pinakionV2Abi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) - */ -export const policyRegistryAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + inputs: [ + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + indexed: true, + }, + ], + name: "DisputeKitCreated", }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "_courtID", + internalType: "uint96", + type: "uint96", + indexed: true, + }, + { + name: "_disputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, }, + { name: "_enable", internalType: "bool", type: "bool", indexed: true }, ], - name: "Initialized", + name: "DisputeKitEnabled", }, { type: "event", anonymous: false, inputs: [ { - name: "_courtID", + name: "_disputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_courtName", - internalType: "string", - type: "string", - indexed: false, + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, }, { - name: "_policy", - internalType: "string", - type: "string", + name: "_fromDisputeKitID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_toDisputeKitID", + internalType: "uint256", + type: "uint256", indexed: false, }, ], - name: "PolicyUpdate", + name: "DisputeKitJump", }, { type: "event", anonymous: false, inputs: [ { - name: "newImplementation", + name: "_address", internalType: "address", type: "address", indexed: true, }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_voteID", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], - name: "Upgraded", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", + name: "Draw", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, ], - name: "setPolicy", - outputs: [], - stateMutability: "nonpayable", + name: "Initialized", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_pnkAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + name: "LeftoverRewardSent", }, { - type: "constructor", + type: "event", + anonymous: false, inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: true, + }, + { + name: "_rateInEth", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + { + name: "_rateDecimals", + internalType: "uint8", + type: "uint8", + indexed: false, + }, ], - stateMutability: "nonpayable", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) - */ -export const policyRegistryAddress = { - 421614: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) - */ -export const policyRegistryConfig = { - address: policyRegistryAddress, - abi: policyRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) - */ -export const policyRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", + name: "NewCurrencyRate", }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + indexed: false, + }, + ], + name: "NewPeriod", }, + { type: "event", anonymous: false, inputs: [], name: "Paused" }, { type: "event", anonymous: false, inputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", + name: "_arbitrable", + internalType: "contract IArbitrableV2", + type: "address", + indexed: true, + }, + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_ruling", + internalType: "uint256", + type: "uint256", indexed: false, }, ], - name: "Initialized", + name: "Ruling", }, { type: "event", anonymous: false, inputs: [ { - name: "_courtID", + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_disputeID", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_courtName", - internalType: "string", - type: "string", + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_degreeOfCoherency", + internalType: "uint256", + type: "uint256", indexed: false, }, { - name: "_policy", - internalType: "string", - type: "string", + name: "_pnkAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeAmount", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", indexed: false, }, ], - name: "PolicyUpdate", + name: "TokenAndETHShift", }, + { type: "event", anonymous: false, inputs: [], name: "Unpaused" }, { type: "event", anonymous: false, @@ -18172,422 +12923,451 @@ export const policyRegistryImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", + inputs: [ + { + name: "_disputeKitAddress", + internalType: "contract IDisputeKit", + type: "address", + }, + ], + name: "addNewDisputeKit", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + ], + name: "appeal", + outputs: [], + stateMutability: "payable", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", - inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "appealPeriod", + outputs: [ + { name: "start", internalType: "uint256", type: "uint256" }, + { name: "end", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "policies", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [ + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + ], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [{ name: "_extraData", internalType: "bytes", type: "bytes" }], + name: "arbitrationCost", + outputs: [{ name: "cost", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_courtID", internalType: "uint256", type: "uint256" }, - { name: "_courtName", internalType: "string", type: "string" }, - { name: "_policy", internalType: "string", type: "string" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_accepted", internalType: "bool", type: "bool" }, ], - name: "setPolicy", + name: "changeAcceptedFeeTokens", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, ], - name: "upgradeToAndCall", + name: "changeCourtParameters", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) - */ -export const policyRegistryImplementationAddress = { - 421614: "0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xda6Da4CCb1EA9aD670A1380De84c5dD4aef87adf) - */ -export const policyRegistryImplementationConfig = { - address: policyRegistryImplementationAddress, - abi: policyRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PolicyRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) - */ -export const policyRegistryProxyAbi = [ - { - type: "constructor", inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_rateInEth", internalType: "uint64", type: "uint64" }, + { name: "_rateDecimals", internalType: "uint8", type: "uint8" }, ], + name: "changeCurrencyRates", + outputs: [], stateMutability: "nonpayable", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) - */ -export const policyRegistryProxyAddress = { - 421614: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) - */ -export const policyRegistryProxyConfig = { - address: policyRegistryProxyAddress, - abi: policyRegistryProxyAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerOracle -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleAbi = [] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleAddress = { - 421614: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) - */ -export const randomizerOracleConfig = { - address: randomizerOracleAddress, - abi: randomizerOracleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) - */ -export const randomizerRngAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + type: "function", + inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", + type: "function", + inputs: [{ name: "_guardian", internalType: "address", type: "address" }], + name: "changeGuardian", + outputs: [], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ { - name: "newImplementation", + name: "_jurorProsecutionModule", internalType: "address", type: "address", - indexed: true, }, ], - name: "Upgraded", - }, - { - type: "function", - inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", + name: "changeJurorProsecutionModule", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], + name: "changePinakion", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ { - name: "_randomizer", - internalType: "contract IRandomizer", + name: "_sortitionModule", + internalType: "contract ISortitionModule", type: "address", }, - { name: "_governor", internalType: "address", type: "address" }, ], - name: "initialize", + name: "changeSortitionModule", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [ + { name: "_toToken", internalType: "contract IERC20", type: "address" }, + { name: "_amountInEth", internalType: "uint256", type: "uint256" }, + ], + name: "convertEthToTokenAmount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "courts", + outputs: [ + { name: "parent", internalType: "uint96", type: "uint96" }, + { name: "hiddenVotes", internalType: "bool", type: "bool" }, + { name: "minStake", internalType: "uint256", type: "uint256" }, + { name: "alpha", internalType: "uint256", type: "uint256" }, + { name: "feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { name: "disabled", internalType: "bool", type: "bool" }, + ], stateMutability: "view", }, { type: "function", - inputs: [], - name: "randomizer", - outputs: [{ name: "", internalType: "contract IRandomizer", type: "address" }], - stateMutability: "view", + inputs: [ + { name: "_parent", internalType: "uint96", type: "uint96" }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { name: "_minStake", internalType: "uint256", type: "uint256" }, + { name: "_alpha", internalType: "uint256", type: "uint256" }, + { name: "_feeForJuror", internalType: "uint256", type: "uint256" }, + { name: "_jurorsForCourtJump", internalType: "uint256", type: "uint256" }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_supportedDisputeKits", + internalType: "uint256[]", + type: "uint256[]", + }, + ], + name: "createCourt", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_id", internalType: "uint256", type: "uint256" }, - { name: "_value", internalType: "bytes32", type: "bytes32" }, + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, ], - name: "randomizerCallback", - outputs: [], - stateMutability: "nonpayable", + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], + stateMutability: "payable", }, { type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "randomizerWithdraw", - outputs: [], + inputs: [ + { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, + { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "_feeToken", internalType: "contract IERC20", type: "address" }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, + ], + name: "createDispute", + outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + name: "currencyRates", + outputs: [ + { name: "feePaymentAccepted", internalType: "bool", type: "bool" }, + { name: "rateInEth", internalType: "uint64", type: "uint64" }, + { name: "rateDecimals", internalType: "uint8", type: "uint8" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "currentRuling", + outputs: [ + { name: "ruling", internalType: "uint256", type: "uint256" }, + { name: "tied", internalType: "bool", type: "bool" }, + { name: "overridden", internalType: "bool", type: "bool" }, + ], stateMutability: "view", }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", + name: "disputeKits", + outputs: [{ name: "", internalType: "contract IDisputeKit", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "requesterToID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "disputes", + outputs: [ + { name: "courtID", internalType: "uint96", type: "uint96" }, + { + name: "arbitrated", + internalType: "contract IArbitrableV2", + type: "address", + }, + { + name: "period", + internalType: "enum KlerosCoreBase.Period", + type: "uint8", + }, + { name: "ruled", internalType: "bool", type: "bool" }, + { name: "lastPeriodChange", internalType: "uint256", type: "uint256" }, + ], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint256", type: "uint256" }], - name: "setCallbackGasLimit", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, + ], + name: "draw", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_randomizer", internalType: "address", type: "address" }], - name: "setRandomizer", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitIDs", internalType: "uint256[]", type: "uint256[]" }, + { name: "_enable", internalType: "bool", type: "bool" }, + ], + name: "enableDisputeKits", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + { name: "_iterations", internalType: "uint256", type: "uint256" }, ], - name: "upgradeToAndCall", + name: "execute", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { - type: "constructor", + type: "function", inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, + { name: "_destination", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, { name: "_data", internalType: "bytes", type: "bytes" }, ], + name: "executeGovernorProposal", + outputs: [], stateMutability: "nonpayable", }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) - */ -export const randomizerRngAddress = { - 421614: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) - */ -export const randomizerRngConfig = { - address: randomizerRngAddress, - abi: randomizerRngAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG_Implementation -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) - */ -export const randomizerRngImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "executeRuling", + outputs: [], + stateMutability: "nonpayable", }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", + type: "function", + inputs: [], + name: "getDisputeKitsLength", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfRounds", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfVotes", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + ], + name: "getRoundInfo", + outputs: [ { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, + name: "", + internalType: "struct KlerosCoreBase.Round", + type: "tuple", + components: [ + { name: "disputeKitID", internalType: "uint256", type: "uint256" }, + { + name: "pnkAtStakePerJuror", + internalType: "uint256", + type: "uint256", + }, + { + name: "totalFeesForJurors", + internalType: "uint256", + type: "uint256", + }, + { name: "nbVotes", internalType: "uint256", type: "uint256" }, + { name: "repartitions", internalType: "uint256", type: "uint256" }, + { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, + { name: "drawnJurors", internalType: "address[]", type: "address[]" }, + { + name: "sumFeeRewardPaid", + internalType: "uint256", + type: "uint256", + }, + { + name: "sumPnkRewardPaid", + internalType: "uint256", + type: "uint256", + }, + { + name: "feeToken", + internalType: "contract IERC20", + type: "address", + }, + { name: "drawIterations", internalType: "uint256", type: "uint256" }, + ], }, ], - name: "Initialized", + stateMutability: "view", }, { - type: "event", - anonymous: false, - inputs: [ + type: "function", + inputs: [{ name: "_courtID", internalType: "uint96", type: "uint96" }], + name: "getTimesPerPeriod", + outputs: [ { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, + name: "timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", }, ], - name: "Upgraded", + stateMutability: "view", }, { type: "function", inputs: [], - name: "callbackGasLimit", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [], - name: "governor", + name: "guardian", outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [ + { name: "_governor", internalType: "address", type: "address" }, + { name: "_guardian", internalType: "address", type: "address" }, + { name: "_pinakion", internalType: "contract IERC20", type: "address" }, + { + name: "_jurorProsecutionModule", + internalType: "address", + type: "address", + }, { - name: "_randomizer", - internalType: "contract IRandomizer", + name: "_disputeKit", + internalType: "contract IDisputeKit", + type: "address", + }, + { name: "_hiddenVotes", internalType: "bool", type: "bool" }, + { + name: "_courtParameters", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { + name: "_timesPerPeriod", + internalType: "uint256[4]", + type: "uint256[4]", + }, + { name: "_sortitionExtraData", internalType: "bytes", type: "bytes" }, + { + name: "_sortitionModuleAddress", + internalType: "contract ISortitionModule", type: "address", }, - { name: "_governor", internalType: "address", type: "address" }, ], name: "initialize", outputs: [], @@ -18596,73 +13376,102 @@ export const randomizerRngImplementationAbi = [ { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "isDisputeKitJumping", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "randomNumbers", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_disputeKitID", internalType: "uint256", type: "uint256" }, + ], + name: "isSupported", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "randomizer", - outputs: [{ name: "", internalType: "contract IRandomizer", type: "address" }], + name: "jurorProsecutionModule", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_id", internalType: "uint256", type: "uint256" }, - { name: "_value", internalType: "bytes32", type: "bytes32" }, - ], - name: "randomizerCallback", + inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], + name: "passPeriod", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], - name: "randomizerWithdraw", + inputs: [], + name: "pause", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "receiveRandomness", - outputs: [{ name: "randomNumber", internalType: "uint256", type: "uint256" }], + inputs: [], + name: "paused", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "requestRandomness", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "pinakion", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "requesterToID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_callbackGasLimit", internalType: "uint256", type: "uint256" }], - name: "setCallbackGasLimit", + inputs: [ + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + ], + name: "setStake", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + ], + name: "setStakeBySortitionModule", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_randomizer", internalType: "address", type: "address" }], - name: "setRandomizer", + inputs: [], + name: "sortitionModule", + outputs: [{ name: "", internalType: "contract ISortitionModule", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "unpause", outputs: [], stateMutability: "nonpayable", }, @@ -18676,31 +13485,38 @@ export const randomizerRngImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb6839061C3aD03c208EFd697409453bf9900cAb2) */ -export const randomizerRngImplementationAddress = { - 421614: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", +export const klerosCoreImplementationAddress = { + 421614: "0xb6839061C3aD03c208EFd697409453bf9900cAb2", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb6839061C3aD03c208EFd697409453bf9900cAb2) */ -export const randomizerRngImplementationConfig = { - address: randomizerRngImplementationAddress, - abi: randomizerRngImplementationAbi, +export const klerosCoreImplementationConfig = { + address: klerosCoreImplementationAddress, + abi: klerosCoreImplementationAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RandomizerRNG_Proxy +// KlerosCore_Proxy ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6) */ -export const randomizerRngProxyAbi = [ +export const klerosCoreProxyAbi = [ { type: "constructor", inputs: [ @@ -18714,921 +13530,746 @@ export const randomizerRngProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6) */ -export const randomizerRngProxyAddress = { - 421614: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", +export const klerosCoreProxyAddress = { + 421614: "0x4838e31E0ea315232c431598110FE677cAF2D6E6", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4838e31E0ea315232c431598110FE677cAF2D6E6) */ -export const randomizerRngProxyConfig = { - address: randomizerRngProxyAddress, - abi: randomizerRngProxyAbi, +export const klerosCoreProxyConfig = { + address: klerosCoreProxyAddress, + abi: klerosCoreProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModule +// KlerosV2NeoEarlyUser ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) */ -export const sortitionModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayedAlreadyTransferredDeposited", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, +export const klerosV2NeoEarlyUserAbi = [ + { + type: "constructor", + inputs: [ + { name: "_name", internalType: "string", type: "string" }, + { name: "_symbol", internalType: "string", type: "string" }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", + stateMutability: "nonpayable", }, { type: "event", anonymous: false, inputs: [ { - name: "_address", + name: "owner", internalType: "address", type: "address", indexed: true, }, { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayedNotTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", + name: "approved", internalType: "address", type: "address", indexed: true, }, { - name: "_relativeAmount", + name: "tokenId", internalType: "uint256", type: "uint256", - indexed: false, + indexed: true, }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, ], - name: "StakeLocked", + name: "Approval", }, { type: "event", anonymous: false, inputs: [ { - name: "_address", + name: "owner", internalType: "address", type: "address", indexed: true, }, { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amountAllCourts", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "operator", + internalType: "address", + type: "address", + indexed: true, }, + { name: "approved", internalType: "bool", type: "bool", indexed: false }, ], - name: "StakeSet", + name: "ApprovalForAll", }, { type: "event", anonymous: false, inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, { - name: "newImplementation", - internalType: "address", - type: "address", + name: "tokenId", + internalType: "uint256", + type: "uint256", indexed: true, }, ], - name: "Upgraded", + name: "Transfer", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", + inputs: [ + { name: "to", internalType: "address", type: "address" }, + { name: "tokenId", internalType: "uint256", type: "uint256" }, + ], + name: "approve", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", + inputs: [{ name: "_newOwner", internalType: "address", type: "address" }], + name: "changeOwner", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], + name: "getApproved", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, + { name: "owner", internalType: "address", type: "address" }, + { name: "operator", internalType: "address", type: "address" }, ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", + name: "isApprovedForAll", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "createDisputeHook", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], + name: "ownerOf", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "to", internalType: "address", type: "address" }], + name: "safeMint", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "tokenId", internalType: "uint256", type: "uint256" }, ], - name: "createTree", + name: "safeTransferFrom", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "tokenId", internalType: "uint256", type: "uint256" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "operator", internalType: "address", type: "address" }, + { name: "approved", internalType: "bool", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, - ], + inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], + name: "tokenURI", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "tokenId", internalType: "uint256", type: "uint256" }, + ], + name: "transferFrom", outputs: [], stateMutability: "nonpayable", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) + */ +export const klerosV2NeoEarlyUserAddress = { + 421614: "0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) + */ +export const klerosV2NeoEarlyUserConfig = { + address: klerosV2NeoEarlyUserAddress, + abi: klerosV2NeoEarlyUserAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PNK +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) + */ +export const pnkAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "spender", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "value", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], - stateMutability: "view", + name: "Approval", }, { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + { + name: "value", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Transfer", }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "initialize3", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", + name: "approve", outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + stateMutability: "nonpayable", }, { type: "function", inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], + name: "balanceOf", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "jurorAccount", internalType: "address", type: "address" }, - { name: "courtId", internalType: "uint96", type: "uint96" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "subtractedValue", internalType: "uint256", type: "uint256" }, ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "decreaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "addedValue", internalType: "uint256", type: "uint256" }, ], - name: "lockStake", - outputs: [], + name: "increaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", + name: "totalSupply", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "penalizeStake", - outputs: [], + name: "transfer", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", - }, { type: "function", inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "postDrawHook", - outputs: [], + name: "transferFrom", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) + */ +export const pnkAddress = { + 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) + */ +export const pnkConfig = { address: pnkAddress, abi: pnkAbi } as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PNKFaucet +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) + */ +export const pnkFaucetAbi = [ { - type: "function", - inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + type: "constructor", + inputs: [{ name: "_token", internalType: "contract IERC20", type: "address" }], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "randomNumberRequestBlock", + name: "amount", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", + name: "balance", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", + inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }], + name: "changeAmount", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "unlockStake", + inputs: [], + name: "request", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + inputs: [], + name: "token", + outputs: [{ name: "", internalType: "contract IERC20", type: "address" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "version", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", }, { - type: "constructor", - inputs: [ - { name: "_implementation", internalType: "address", type: "address" }, - { name: "_data", internalType: "bytes", type: "bytes" }, - ], - stateMutability: "nonpayable", + type: "function", + inputs: [{ name: "", internalType: "address", type: "address" }], + name: "withdrewAlready", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) */ -export const sortitionModuleAddress = { - 421614: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", +export const pnkFaucetAddress = { + 421614: "0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) */ -export const sortitionModuleConfig = { - address: sortitionModuleAddress, - abi: sortitionModuleAbi, +export const pnkFaucetConfig = { + address: pnkFaucetAddress, + abi: pnkFaucetAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModuleNeo +// PinakionV2 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64) + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) */ -export const sortitionModuleNeoAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, - { type: "error", inputs: [], name: "AlreadyInitialized" }, - { type: "error", inputs: [], name: "FailedDelegateCall" }, - { - type: "error", - inputs: [{ name: "implementation", internalType: "address", type: "address" }], - name: "InvalidImplementation", - }, - { type: "error", inputs: [], name: "NotInitializing" }, - { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, - { - type: "error", - inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], - name: "UUPSUnsupportedProxiableUUID", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "version", - internalType: "uint64", - type: "uint64", - indexed: false, - }, - ], - name: "Initialized", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_phase", - internalType: "enum ISortitionModule.Phase", - type: "uint8", - indexed: false, - }, - ], - name: "NewPhase", - }, +export const pinakionV2Abi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "event", anonymous: false, inputs: [ { - name: "_address", + name: "owner", internalType: "address", type: "address", indexed: true, }, { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StakeDelayedAlreadyTransferred", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_address", + name: "spender", internalType: "address", type: "address", indexed: true, }, { - name: "_courtID", - internalType: "uint96", - type: "uint96", - indexed: true, - }, - { - name: "_amount", + name: "value", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "StakeDelayedAlreadyTransferredWithdrawn", + name: "Approval", }, { type: "event", anonymous: false, inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", + name: "value", internalType: "uint256", type: "uint256", indexed: false, }, ], - name: "StakeDelayedNotTransferred", + name: "Transfer", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_relativeAmount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "_unlock", internalType: "bool", type: "bool", indexed: false }, + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, ], - name: "StakeLocked", + name: "allowance", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "_address", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_courtID", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, + { name: "spender", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "StakeSet", + name: "approve", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", }, { - type: "event", - anonymous: false, - inputs: [ - { - name: "newImplementation", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "Upgraded", + type: "function", + inputs: [{ name: "account", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }], - name: "changeMaxStakePerJuror", - outputs: [], + inputs: [ + { name: "spender", internalType: "address", type: "address" }, + { name: "subtractedValue", internalType: "uint256", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }], - name: "changeMaxTotalStaked", - outputs: [], + inputs: [ + { name: "spender", internalType: "address", type: "address" }, + { name: "addedValue", internalType: "uint256", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_minStakingTime", internalType: "uint256", type: "uint256" }], - name: "changeMinStakingTime", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - ], - name: "changeRandomNumberGenerator", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "core", - outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], + name: "totalSupply", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "createDisputeHook", - outputs: [], + name: "transfer", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_extraData", internalType: "bytes", type: "bytes" }, + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "createTree", - outputs: [], + name: "transferFrom", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, +] as const; + +/** + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) + */ +export const pinakionV2Address = { + 421614: "0x34B944D42cAcfC8266955D07A80181D2054aa225", + 11155111: "0x593e89704D285B0c3fbF157c7CF2537456CE64b5", +} as const; + +/** + * - [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) + */ +export const pinakionV2Config = { + address: pinakionV2Address, + abi: pinakionV2Abi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PolicyRegistry +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b) + */ +export const policyRegistryAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "function", - inputs: [], - name: "delayedStakeReadIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "function", - inputs: [], - name: "delayedStakeWriteIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { - type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], - name: "delayedStakes", - outputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "courtID", internalType: "uint96", type: "uint96" }, - { name: "stake", internalType: "uint256", type: "uint256" }, - { name: "alreadyTransferred", internalType: "bool", type: "bool" }, + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "disputesWithoutJurors", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "Initialized", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_nonce", internalType: "uint256", type: "uint256" }, + { + name: "_courtID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_courtName", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_policy", + internalType: "string", + type: "string", + indexed: false, + }, ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], - name: "executeDelayedStakes", - outputs: [], - stateMutability: "nonpayable", + name: "PolicyUpdate", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "getJurorBalance", - outputs: [ - { name: "totalStaked", internalType: "uint256", type: "uint256" }, - { name: "totalLocked", internalType: "uint256", type: "uint256" }, - { name: "stakedInCourt", internalType: "uint256", type: "uint256" }, - { name: "nbCourts", internalType: "uint256", type: "uint256" }, + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, ], - stateMutability: "view", + name: "Upgraded", }, { type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "getJurorCourtIDs", - outputs: [{ name: "", internalType: "uint96[]", type: "uint96[]" }], - stateMutability: "view", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", @@ -19639,229 +14280,209 @@ export const sortitionModuleNeoAbi = [ }, { type: "function", - inputs: [ - { name: "_governor", internalType: "address", type: "address" }, - { name: "_core", internalType: "contract KlerosCore", type: "address" }, - { name: "_minStakingTime", internalType: "uint256", type: "uint256" }, - { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, - { name: "_rng", internalType: "contract RNG", type: "address" }, - { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - { name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }, - { name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }, - ], + inputs: [{ name: "_governor", internalType: "address", type: "address" }], name: "initialize", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_juror", internalType: "address", type: "address" }], - name: "isJurorStaked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], - name: "jurors", - outputs: [ - { name: "stakedPnk", internalType: "uint256", type: "uint256" }, - { name: "lockedPnk", internalType: "uint256", type: "uint256" }, - ], + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "policies", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "lastPhaseChange", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint96", type: "uint96" }, + { name: "_courtID", internalType: "uint256", type: "uint256" }, + { name: "_courtName", internalType: "string", type: "string" }, + { name: "_policy", internalType: "string", type: "string" }, ], - name: "latestDelayedStakeIndex", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + name: "setPolicy", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], - name: "lockStake", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", }, { type: "function", inputs: [], - name: "maxDrawingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { - type: "function", - inputs: [], - name: "maxStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b) + */ +export const policyRegistryAddress = { + 421614: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b) + */ +export const policyRegistryConfig = { + address: policyRegistryAddress, + abi: policyRegistryAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PolicyRegistry_Implementation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0) + */ +export const policyRegistryImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, { - type: "function", - inputs: [], - name: "maxTotalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { - type: "function", - inputs: [], - name: "minStakingTime", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { - type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", }, { - type: "function", - inputs: [], - name: "passPhase", - outputs: [], - stateMutability: "nonpayable", + type: "event", + anonymous: false, + inputs: [ + { + name: "_courtID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_courtName", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_policy", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "PolicyUpdate", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, ], - name: "penalizeStake", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "phase", - outputs: [{ name: "", internalType: "enum ISortitionModule.Phase", type: "uint8" }], - stateMutability: "view", + name: "Upgraded", }, { type: "function", - inputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "postDrawHook", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumber", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "randomNumberRequestBlock", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rng", - outputs: [{ name: "", internalType: "contract RNG", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "rngLookahead", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, - ], - name: "setStake", - outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, - ], + inputs: [], + name: "initialize2", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, - { name: "_ID", internalType: "bytes32", type: "bytes32" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "_juror", internalType: "address", type: "address" }, - { name: "_courtID", internalType: "uint96", type: "uint96" }, - ], - name: "stakeOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "policies", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "totalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, + { name: "_courtID", internalType: "uint256", type: "uint256" }, + { name: "_courtName", internalType: "string", type: "string" }, + { name: "_policy", internalType: "string", type: "string" }, ], - name: "unlockStake", + name: "setPolicy", outputs: [], stateMutability: "nonpayable", }, @@ -19875,6 +14496,38 @@ export const sortitionModuleNeoAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0) + */ +export const policyRegistryImplementationAddress = { + 421614: "0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x09ba3234B3aD786aE46EcDAF388C93D54c145DC0) + */ +export const policyRegistryImplementationConfig = { + address: policyRegistryImplementationAddress, + abi: policyRegistryImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PolicyRegistry_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b) + */ +export const policyRegistryProxyAbi = [ { type: "constructor", inputs: [ @@ -19883,32 +14536,59 @@ export const sortitionModuleNeoAbi = [ ], stateMutability: "nonpayable", }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b) */ -export const sortitionModuleNeoAddress = { - 421614: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", +export const policyRegistryProxyAddress = { + 421614: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x31d067405184d7FaA64b0834511cBcFAF32CdC4b) */ -export const sortitionModuleNeoConfig = { - address: sortitionModuleNeoAddress, - abi: sortitionModuleNeoAbi, +export const policyRegistryProxyConfig = { + address: policyRegistryProxyAddress, + abi: policyRegistryProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModuleNeo_Implementation +// RandomizerOracle ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) */ -export const sortitionModuleNeoImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, +export const randomizerOracleAbi = [] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) + */ +export const randomizerOracleAddress = { + 421614: "0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xE775D7fde1d0D09ae627C0131040012ccBcC4b9b) + */ +export const randomizerOracleConfig = { + address: randomizerOracleAddress, + abi: randomizerOracleAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SortitionModule +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD) + */ +export const sortitionModuleAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { @@ -19972,7 +14652,7 @@ export const sortitionModuleNeoImplementationAbi = [ indexed: false, }, ], - name: "StakeDelayedAlreadyTransferred", + name: "StakeDelayedAlreadyTransferredDeposited", }, { type: "event", @@ -20066,6 +14746,12 @@ export const sortitionModuleNeoImplementationAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -20084,22 +14770,15 @@ export const sortitionModuleNeoImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], - name: "changeMaxDrawingTime", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }], - name: "changeMaxStakePerJuror", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }], - name: "changeMaxTotalStaked", + inputs: [{ name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }], + name: "changeMaxDrawingTime", outputs: [], stateMutability: "nonpayable", }, @@ -20236,13 +14915,18 @@ export const sortitionModuleNeoImplementationAbi = [ { name: "_maxDrawingTime", internalType: "uint256", type: "uint256" }, { name: "_rng", internalType: "contract RNG", type: "address" }, { name: "_rngLookahead", internalType: "uint256", type: "uint256" }, - { name: "_maxStakePerJuror", internalType: "uint256", type: "uint256" }, - { name: "_maxTotalStaked", internalType: "uint256", type: "uint256" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "initialize3", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_juror", internalType: "address", type: "address" }], @@ -20252,7 +14936,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" }, @@ -20270,8 +14954,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" }], @@ -20294,20 +14978,6 @@ export const sortitionModuleNeoImplementationAbi = [ outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "maxStakePerJuror", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "maxTotalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -20438,13 +15108,6 @@ export const sortitionModuleNeoImplementationAbi = [ outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "totalStaked", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, { type: "function", inputs: [ @@ -20465,31 +15128,13 @@ export const sortitionModuleNeoImplementationAbi = [ outputs: [], stateMutability: "payable", }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0) - */ -export const sortitionModuleNeoImplementationAddress = { - 421614: "0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0) - */ -export const sortitionModuleNeoImplementationConfig = { - address: sortitionModuleNeoImplementationAddress, - abi: sortitionModuleNeoImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SortitionModuleNeo_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64) - */ -export const sortitionModuleNeoProxyAbi = [ + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -20498,23 +15143,21 @@ export const sortitionModuleNeoProxyAbi = [ ], stateMutability: "nonpayable", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD) */ -export const sortitionModuleNeoProxyAddress = { - 421614: "0x809533c303c10915BB5c0585f2d8D738e2a4fB64", +export const sortitionModuleAddress = { + 421614: "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD) */ -export const sortitionModuleNeoProxyConfig = { - address: sortitionModuleNeoProxyAddress, - abi: sortitionModuleNeoProxyAbi, +export const sortitionModuleConfig = { + address: sortitionModuleAddress, + abi: sortitionModuleAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -21232,7 +15875,7 @@ export const sortitionModuleUniversityProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB37919A50d3BddA9982e3c84aA47e501c454364B) */ export const sortitionModuleImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -21785,14 +16428,14 @@ export const sortitionModuleImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB37919A50d3BddA9982e3c84aA47e501c454364B) */ export const sortitionModuleImplementationAddress = { - 421614: "0x45129beB9B84BFb07bA885085C1D60437494a93f", + 421614: "0xB37919A50d3BddA9982e3c84aA47e501c454364B", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x45129beB9B84BFb07bA885085C1D60437494a93f) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xB37919A50d3BddA9982e3c84aA47e501c454364B) */ export const sortitionModuleImplementationConfig = { address: sortitionModuleImplementationAddress, @@ -21804,7 +16447,7 @@ export const sortitionModuleImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD) */ export const sortitionModuleProxyAbi = [ { @@ -21820,14 +16463,14 @@ export const sortitionModuleProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD) */ export const sortitionModuleProxyAddress = { - 421614: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + 421614: "0xb34651b65A40553C444c6F0D27286C80ec34fbfD", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb34651b65A40553C444c6F0D27286C80ec34fbfD) */ export const sortitionModuleProxyConfig = { address: sortitionModuleProxyAddress, diff --git a/contracts/package.json b/contracts/package.json index 481fa0d3c..641cac636 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/kleros-v2-contracts", - "version": "0.8.0", + "version": "0.8.1", "description": "Smart contracts for Kleros version 2", "main": "typechain-types/index.ts", "repository": "git@github.com:kleros/kleros-v2.git",