kleros/kleros-v2

View on GitHub
bot-pinner/watchlist/DisputeKitClassic.json

Summary

Maintainability
Test Coverage
{
  "address": "0x8F1a2B8F9b04320375856580Fc6B1669Cb12a9EE",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_governor",
          "type": "address"
        },
        {
          "internalType": "contract KlerosCore",
          "name": "_core",
          "type": "address"
        },
        {
          "internalType": "contract RNG",
          "name": "_rng",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "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": "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": "contract IArbitrator",
          "name": "_arbitrator",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_evidenceGroupID",
          "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": true,
          "internalType": "uint256",
          "name": "_coreDisputeID",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "_juror",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_choice",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "string",
          "name": "_justification",
          "type": "string"
        }
      ],
      "name": "Justification",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "enum DisputeKitClassic.Phase",
          "name": "_phase",
          "type": "uint8"
        }
      ],
      "name": "NewPhaseDisputeKit",
      "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": "RN",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "RNBlock",
      "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": [
        {
          "internalType": "contract RNG",
          "name": "_rng",
          "type": "address"
        }
      ],
      "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"
        }
      ],
      "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"
        }
      ],
      "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": [],
      "name": "disputesWithoutJurors",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_coreDisputeID",
          "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": "getLastRoundResult",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "winningChoice",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "tied",
          "type": "bool"
        }
      ],
      "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": [],
      "name": "isResolving",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_coreDisputeID",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_coreRoundID",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_voteID",
          "type": "uint256"
        }
      ],
      "name": "isVoteActive",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "passPhase",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "phase",
      "outputs": [
        {
          "internalType": "enum DisputeKitClassic.Phase",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "rng",
      "outputs": [
        {
          "internalType": "contract RNG",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_evidenceGroupID",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "_evidence",
          "type": "string"
        }
      ],
      "name": "submitEvidence",
      "outputs": [],
      "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",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "transactionHash": "0x4b45304bb73451188e13c640f8469233418c330fbc60347b56b467d18268389e",
  "receipt": {
    "to": null,
    "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3",
    "contractAddress": "0xA2c538AA05BBCc44c213441f6f3777223D2BF9e5",
    "transactionIndex": 1,
    "gasUsed": "3795502",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "blockHash": "0x55bd2d69b9b0a124bb59bdcdf9d6df315b912dac22ab468cd6fc9f4badba4404",
    "transactionHash": "0x4b45304bb73451188e13c640f8469233418c330fbc60347b56b467d18268389e",
    "logs": [],
    "blockNumber": 14452891,
    "cumulativeGasUsed": "3795502",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3",
    "0x0000000000000000000000000000000000000000",
    "0x078dAd05373d19d7fd6829735b765F12242a4300"
  ],
  "numDeployments": 4,
  "solcInputHash": "344957ae5857246fac5b346f78fc8116",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"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\":\"contract IArbitrator\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_evidenceGroupID\",\"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\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"Justification\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enum DisputeKitClassic.Phase\",\"name\":\"_phase\",\"type\":\"uint8\"}],\"name\":\"NewPhaseDisputeKit\",\"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\":\"RN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RNBlock\",\"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\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"}],\"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\"}],\"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\"}],\"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\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"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\":\"getLastRoundResult\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"}],\"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\":[],\"name\":\"isResolving\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum DisputeKitClassic.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_evidenceGroupID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"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\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"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.\"}},\"changeRandomNumberGenerator(address)\":{\"details\":\"Changes the `_rng` storage variable.\",\"params\":{\"_rng\":\"The new value for the `RNGenerator` storage variable.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\",\"_rng\":\"The random number generator.\"}},\"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\":{\"ruling\":\"The current ruling.\"}},\"draw(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.\"},\"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.\"}},\"getLastRoundResult(uint256)\":{\"details\":\"Returns the voting data from the most relevant round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"tied\":\"Whether it's a tie or not.\",\"winningChoice\":\"The winning choice of this round.\"}},\"isResolving()\":{\"details\":\"Returns true if the dispute kit is ready to Resolve, regardless of the number of disputes without jurors.\",\"returns\":{\"_0\":\"Whether the dispute kit is ready to resolve, regardless of the number of disputes without jurors.\"}},\"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.\"}},\"passPhase()\":{\"details\":\"Passes the phase.\"},\"submitEvidence(uint256,string)\":{\"details\":\"Submits evidence.\",\"params\":{\"_evidence\":\"IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.\",\"_evidenceGroupID\":\"Unique identifier of the evidence group the evidence belongs to. It's the submitter responsability to submit the right evidence group ID.\"}},\"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.\"}}},\"stateVariables\":{\"disputesWithoutJurors\":{\"details\":\"Returns the number of disputes without jurors in the dispute kit.\",\"return\":\"The number of disputes without jurors in the dispute kit.\",\"returns\":{\"_0\":\"The number of disputes without jurors in the dispute kit.\"}}},\"title\":\"DisputeKitClassic  Dispute kit implementation of the Kleros v1 features including:  - a drawing system: proportional to staked PNK,  - a vote aggreation system: plurality,  - an incentive system: equal split between coherent votes,  - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"src/arbitration/IArbitrable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./IArbitrator.sol\\\";\\n\\n/**\\n * @title IArbitrable\\n * Arbitrable interface. Note that this interface follows the ERC-792 standard.\\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);\\n */\\ninterface IArbitrable {\\n    /**\\n     * @dev To be raised when a ruling is given.\\n     * @param _arbitrator The arbitrator giving the ruling.\\n     * @param _disputeID ID of the dispute in the Arbitrator contract.\\n     * @param _ruling The ruling which was given.\\n     */\\n    event Ruling(IArbitrator indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n    /**\\n     * @dev Give a ruling for a dispute. 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 ID of the dispute in the Arbitrator contract.\\n     * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n     */\\n    function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x8f1c36f6206566f0790448a654190e68a43a1dd2e039c2b77e7455d3fcd599a4\",\"license\":\"MIT\"},\"src/arbitration/IArbitrator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./IArbitrable.sol\\\";\\n\\n/**\\n * @title Arbitrator\\n * Arbitrator interface that implements the new arbitration standard.\\n * Unlike the ERC-792 this standard doesn't have anything related to 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).\\n */\\ninterface IArbitrator {\\n    /**\\n     * @dev To be emitted when a dispute is created.\\n     * @param _disputeID ID of the dispute.\\n     * @param _arbitrable The contract which created the dispute.\\n     */\\n    event DisputeCreation(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n    /**\\n     * @dev Create a dispute. Must be called by the arbitrable contract.\\n     * Must pay at least arbitrationCost(_extraData).\\n     * @param _choices Amount of choices the arbitrator can make in this dispute.\\n     * @param _extraData Can be used to give additional info on the dispute to be created.\\n     * @return disputeID ID of the dispute created.\\n     */\\n    function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);\\n\\n    /**\\n     * @dev Compute the cost of arbitration. 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 Can be used to give additional info on the dispute to be created.\\n     * @return cost Required cost of arbitration.\\n     */\\n    function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n}\\n\",\"keccak256\":\"0xe63efdae904b4299c17efd4c6174869a49fbfe1b11ccfd05fcc22e735ced7b26\",\"license\":\"MIT\"},\"src/arbitration/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n *  @authors: [@unknownunknown1, @jaybuidl]\\n *  @reviewers: []\\n *  @auditors: []\\n *  @bounties: []\\n *  @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./IArbitrator.sol\\\";\\n\\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.\\n */\\ninterface IDisputeKit {\\n    // ************************************ //\\n    // *             Events               * //\\n    // ************************************ //\\n\\n    /**\\n     * @dev Emitted when casting a vote to provide the justification of juror's choice.\\n     * @param _coreDisputeID ID of the dispute in the core contract.\\n     * @param _juror Address of the juror.\\n     * @param _choice The choice juror voted for.\\n     * @param _justification Justification of the choice.\\n     */\\n    event Justification(\\n        uint256 indexed _coreDisputeID,\\n        address indexed _juror,\\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     */\\n    function createDispute(\\n        uint256 _coreDisputeID,\\n        uint256 _numberOfChoices,\\n        bytes calldata _extraData,\\n        uint256 _nbVotes\\n    ) external;\\n\\n    /** @dev Passes the phase.\\n     */\\n    function passPhase() 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     *  @return drawnAddress The drawn address.\\n     */\\n    function draw(uint256 _coreDisputeID) 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     */\\n    function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling);\\n\\n    /** @dev Returns the voting data from the most relevant round.\\n     *  @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n     *  @return winningChoice The winning choice of this round.\\n     *  @return tied Whether it's a tie or not.\\n     */\\n    function getLastRoundResult(uint256 _coreDisputeID) external view returns (uint256 winningChoice, bool tied);\\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     */\\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     */\\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     */\\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     */\\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     */\\n    function isVoteActive(\\n        uint256 _coreDisputeID,\\n        uint256 _coreRoundID,\\n        uint256 _voteID\\n    ) 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    )\\n        external\\n        view\\n        returns (\\n            address account,\\n            bytes32 commit,\\n            uint256 choice,\\n            bool voted\\n        );\\n\\n    /** @dev Returns the number of disputes without jurors in the dispute kit.\\n     *  @return The number of disputes without jurors in the dispute kit.\\n     */\\n    function disputesWithoutJurors() external view returns (uint256);\\n\\n    /** @dev Returns true if the dispute kit is ready to Resolve, regardless of the number of disputes without jurors.\\n     *  @return Whether the dispute kit is ready to resolve, regardless of the number of disputes without jurors.\\n     */\\n    function isResolving() external view returns (bool);\\n}\\n\",\"keccak256\":\"0x235f027aa27fa972c56d863cfbc33832c8100135cf32d6827294de138e97dd44\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n *  @authors: [@unknownunknown1, @jaybuidl]\\n *  @reviewers: []\\n *  @auditors: []\\n *  @bounties: []\\n *  @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrator.sol\\\";\\nimport \\\"./IDisputeKit.sol\\\";\\nimport {SortitionSumTreeFactory} from \\\"../data-structures/SortitionSumTreeFactory.sol\\\";\\n\\n/**\\n *  @title KlerosCore\\n *  Core arbitrator contract for Kleros v2.\\n *  Note that this contract trusts the token and the dispute kit contracts.\\n */\\ncontract KlerosCore is IArbitrator {\\n    using SortitionSumTreeFactory for SortitionSumTreeFactory.SortitionSumTrees; // Use library functions for sortition sum trees.\\n\\n    // ************************************* //\\n    // *         Enums / Structs           * //\\n    // ************************************* //\\n\\n    enum Phase {\\n        staking, // Stake can be updated during this phase.\\n        freezing // Phase during which the dispute kits can undergo the drawing process. Staking is not allowed during this phase.\\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 tokens needed to stake in the court.\\n        uint256 alpha; // Basis point of tokens 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.\\n    }\\n\\n    struct Dispute {\\n        uint96 subcourtID; // The ID of the subcourt the dispute is in.\\n        IArbitrable 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 tokensAtStakePerJuror; // The amount of tokens 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 penalties; // The amount of tokens collected from penalties in this round.\\n        address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n    }\\n\\n    struct Juror {\\n        uint96[] subcourtIDs; // The IDs of subcourts 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        mapping(uint96 => uint256) stakedTokens; // The number of tokens the juror has staked in the subcourt in the form `stakedTokens[subcourtID]`.\\n        mapping(uint96 => uint256) lockedTokens; // The number of tokens the juror has locked in the subcourt in the form `lockedTokens[subcourtID]`.\\n    }\\n\\n    struct DisputeKitNode {\\n        uint256 parent; // Index of the parent dispute kit. If it's 0 then this DK is a root.\\n        uint256[] children; // List of child dispute kits.\\n        IDisputeKit disputeKit; // The dispute kit implementation.\\n        bool needsFreezing; // The dispute kit needs freezing.\\n        uint256 depthLevel; // How far this DK is from the root. 0 for root DK.\\n    }\\n\\n    struct DelayedStake {\\n        address account; // The address of the juror.\\n        uint96 subcourtID; // The ID of the subcourt.\\n        uint256 stake; // The new stake.\\n        uint256 penalty; // Penalty value, in case the stake was set during execution.\\n    }\\n\\n    // ************************************* //\\n    // *             Storage               * //\\n    // ************************************* //\\n\\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    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    uint256 public constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\n    uint256 public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute.\\n    uint256 public constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n    uint256 public constant NON_PAYABLE_AMOUNT = (2**256 - 2) / 2; // An amount higher than the supply of ETH.\\n    uint256 public constant SEARCH_ITERATIONS = 10; // Number of iterations to search for suitable parent court before jumping to the top court.\\n\\n    address public governor; // The governor of the contract.\\n    IERC20 public pinakion; // The Pinakion token contract.\\n    // TODO: interactions with jurorProsecutionModule.\\n    address public jurorProsecutionModule; // The module for juror's prosecution.\\n    Phase public phase; // The current phase.\\n    uint256 public minStakingTime; // The time after which the phase can be switched to Freezing if there are open disputes.\\n    uint256 public maxFreezingTime; // 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 freezeBlock; // Number of the block when Core was frozen.\\n    Court[] public courts; // The subcourts.\\n    DisputeKitNode[] public disputeKitNodes; // The list of DisputeKitNode, indexed by DisputeKitID.\\n    uint256[] public disputesKitIDsThatNeedFreezing; // The disputeKitIDs that need switching to Freezing phase.\\n    Dispute[] public disputes; // The disputes.\\n    mapping(address => Juror) internal jurors; // The jurors.\\n    SortitionSumTreeFactory.SortitionSumTrees internal sortitionSumTrees; // The sortition sum trees.\\n    mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Freezing phase, to update them when the phase is switched to Staking.\\n\\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 = 1; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.\\n\\n    // ************************************* //\\n    // *              Events               * //\\n    // ************************************* //\\n\\n    event NewPhase(Phase _phase);\\n    event NewPeriod(uint256 indexed _disputeID, Period _period);\\n    event StakeSet(address indexed _address, uint256 _subcourtID, uint256 _amount, uint256 _newTotalStake);\\n    event AppealPossible(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n    event AppealDecision(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n    event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n    event SubcourtCreated(\\n        uint256 indexed _subcourtID,\\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 _sortitionSumTreeK,\\n        uint256[] _supportedDisputeKits\\n    );\\n    event SubcourtModified(uint96 indexed _subcourtID, string _param);\\n    event DisputeKitCreated(\\n        uint256 indexed _disputeKitID,\\n        IDisputeKit indexed _disputeKitAddress,\\n        uint256 indexed _parent\\n    );\\n    event DisputeKitEnabled(uint96 indexed _subcourtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n    event CourtJump(\\n        uint256 indexed _disputeID,\\n        uint256 indexed _roundID,\\n        uint96 indexed _fromSubcourtID,\\n        uint96 _toSubcourtID\\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        int256 _tokenAmount,\\n        int256 _ethAmount\\n    );\\n\\n    // ************************************* //\\n    // *        Function Modifiers         * //\\n    // ************************************* //\\n\\n    modifier onlyByGovernor() {\\n        require(governor == msg.sender, \\\"Governor only\\\");\\n        _;\\n    }\\n\\n    /** @dev Constructor.\\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 _phaseTimeouts minStakingTime and maxFreezingTime respectively\\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 _sortitionSumTreeK The number of children per node of the general court's sortition sum tree.\\n     */\\n    constructor(\\n        address _governor,\\n        IERC20 _pinakion,\\n        address _jurorProsecutionModule,\\n        IDisputeKit _disputeKit,\\n        uint256[2] memory _phaseTimeouts,\\n        bool _hiddenVotes,\\n        uint256[4] memory _courtParameters,\\n        uint256[4] memory _timesPerPeriod,\\n        uint256 _sortitionSumTreeK\\n    ) {\\n        governor = _governor;\\n        pinakion = _pinakion;\\n        jurorProsecutionModule = _jurorProsecutionModule;\\n        minStakingTime = _phaseTimeouts[0];\\n        maxFreezingTime = _phaseTimeouts[1];\\n        lastPhaseChange = block.timestamp;\\n\\n        // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a node has no parent.\\n        disputeKitNodes.push();\\n\\n        // DISPUTE_KIT_CLASSIC\\n        disputeKitNodes.push(\\n            DisputeKitNode({\\n                parent: NULL_DISPUTE_KIT,\\n                children: new uint256[](0),\\n                disputeKit: _disputeKit,\\n                needsFreezing: false,\\n                depthLevel: 0\\n            })\\n        );\\n        emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit, NULL_DISPUTE_KIT);\\n\\n        // FORKING_COURT\\n        // TODO: Fill the properties for the Forking court, emit SubcourtCreated.\\n        courts.push();\\n        sortitionSumTrees.createTree(bytes32(uint256(FORKING_COURT)), _sortitionSumTreeK);\\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        sortitionSumTrees.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionSumTreeK);\\n        emit SubcourtCreated(\\n            1,\\n            court.parent,\\n            _hiddenVotes,\\n            _courtParameters[0],\\n            _courtParameters[1],\\n            _courtParameters[2],\\n            _courtParameters[3],\\n            _timesPerPeriod,\\n            _sortitionSumTreeK,\\n            new uint256[](0)\\n        );\\n        enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\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     */\\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     */\\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     */\\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     */\\n    function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n        jurorProsecutionModule = _jurorProsecutionModule;\\n    }\\n\\n    /** @dev Changes the `minStakingTime` storage variable.\\n     *  @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n     */\\n    function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n        minStakingTime = _minStakingTime;\\n    }\\n\\n    /** @dev Changes the `maxFreezingTime` storage variable.\\n     *  @param _maxFreezingTime The new value for the `maxFreezingTime` storage variable.\\n     */\\n    function changeMaxFreezingTime(uint256 _maxFreezingTime) external onlyByGovernor {\\n        maxFreezingTime = _maxFreezingTime;\\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     *  @param _parent The ID of the parent dispute kit. It is left empty when root DK is created.\\n     *  Note that the root DK must be supported by the general court.\\n     */\\n    function addNewDisputeKit(IDisputeKit _disputeKitAddress, uint256 _parent) external onlyByGovernor {\\n        uint256 disputeKitID = disputeKitNodes.length;\\n        require(_parent < disputeKitID, \\\"!Parent\\\");\\n        uint256 depthLevel;\\n        if (_parent != NULL_DISPUTE_KIT) {\\n            depthLevel = disputeKitNodes[_parent].depthLevel + 1;\\n            // It should be always possible to reach the root from the leaf with the defined number of search iterations.\\n            require(depthLevel < SEARCH_ITERATIONS, \\\"Depth level max\\\");\\n        }\\n        disputeKitNodes.push(\\n            DisputeKitNode({\\n                parent: _parent,\\n                children: new uint256[](0),\\n                disputeKit: _disputeKitAddress,\\n                needsFreezing: false,\\n                depthLevel: depthLevel\\n            })\\n        );\\n        disputeKitNodes[_parent].children.push(disputeKitID);\\n        emit DisputeKitCreated(disputeKitID, _disputeKitAddress, _parent);\\n        if (_parent == NULL_DISPUTE_KIT) {\\n            // A new dispute kit tree root should always be supported by the General court.\\n            enableDisputeKit(GENERAL_COURT, disputeKitID, true);\\n        }\\n    }\\n\\n    /** @dev Creates a subcourt under a specified parent court.\\n     *  @param _parent The `parent` property value of the subcourt.\\n     *  @param _hiddenVotes The `hiddenVotes` property value of the subcourt.\\n     *  @param _minStake The `minStake` property value of the subcourt.\\n     *  @param _alpha The `alpha` property value of the subcourt.\\n     *  @param _feeForJuror The `feeForJuror` property value of the subcourt.\\n     *  @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the subcourt.\\n     *  @param _timesPerPeriod The `timesPerPeriod` property value of the subcourt.\\n     *  @param _sortitionSumTreeK The number of children per node of the subcourt's sortition sum tree.\\n     *  @param _supportedDisputeKits Indexes of dispute kits that this subcourt will support.\\n     */\\n    function createSubcourt(\\n        uint96 _parent,\\n        bool _hiddenVotes,\\n        uint256 _minStake,\\n        uint256 _alpha,\\n        uint256 _feeForJuror,\\n        uint256 _jurorsForCourtJump,\\n        uint256[4] memory _timesPerPeriod,\\n        uint256 _sortitionSumTreeK,\\n        uint256[] memory _supportedDisputeKits\\n    ) external onlyByGovernor {\\n        require(courts[_parent].minStake <= _minStake, \\\"MinStake lower than parent court\\\");\\n        require(_supportedDisputeKits.length > 0, \\\"!Supported DK\\\");\\n        require(_parent != FORKING_COURT, \\\"Invalid: Forking court as parent\\\");\\n\\n        uint256 subcourtID = courts.length;\\n        Court storage court = courts.push();\\n\\n        for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n            require(\\n                _supportedDisputeKits[i] > 0 && _supportedDisputeKits[i] < disputeKitNodes.length,\\n                \\\"Wrong DK index\\\"\\n            );\\n            court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n        }\\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        sortitionSumTrees.createTree(bytes32(subcourtID), _sortitionSumTreeK);\\n        // Update the parent.\\n        courts[_parent].children.push(subcourtID);\\n        emit SubcourtCreated(\\n            subcourtID,\\n            _parent,\\n            _hiddenVotes,\\n            _minStake,\\n            _alpha,\\n            _feeForJuror,\\n            _jurorsForCourtJump,\\n            _timesPerPeriod,\\n            _sortitionSumTreeK,\\n            _supportedDisputeKits\\n        );\\n    }\\n\\n    /** @dev Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _minStake The new value for the `minStake` property value.\\n     */\\n    function changeSubcourtMinStake(uint96 _subcourtID, uint256 _minStake) external onlyByGovernor {\\n        require(\\n            _subcourtID == GENERAL_COURT || courts[courts[_subcourtID].parent].minStake <= _minStake,\\n            \\\"MinStake lower than parent court\\\"\\n        );\\n        for (uint256 i = 0; i < courts[_subcourtID].children.length; i++) {\\n            require(courts[courts[_subcourtID].children[i]].minStake >= _minStake, \\\"MinStake lower than parent court\\\");\\n        }\\n\\n        courts[_subcourtID].minStake = _minStake;\\n        emit SubcourtModified(_subcourtID, \\\"minStake\\\");\\n    }\\n\\n    /** @dev Changes the `alpha` property value of a specified subcourt.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _alpha The new value for the `alpha` property value.\\n     */\\n    function changeSubcourtAlpha(uint96 _subcourtID, uint256 _alpha) external onlyByGovernor {\\n        courts[_subcourtID].alpha = _alpha;\\n        emit SubcourtModified(_subcourtID, \\\"alpha\\\");\\n    }\\n\\n    /** @dev Changes the `feeForJuror` property value of a specified subcourt.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _feeForJuror The new value for the `feeForJuror` property value.\\n     */\\n    function changeSubcourtJurorFee(uint96 _subcourtID, uint256 _feeForJuror) external onlyByGovernor {\\n        courts[_subcourtID].feeForJuror = _feeForJuror;\\n        emit SubcourtModified(_subcourtID, \\\"feeForJuror\\\");\\n    }\\n\\n    /** @dev Changes the `jurorsForCourtJump` property value of a specified subcourt.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _jurorsForCourtJump The new value for the `jurorsForCourtJump` property value.\\n     */\\n    function changeSubcourtJurorsForJump(uint96 _subcourtID, uint256 _jurorsForCourtJump) external onlyByGovernor {\\n        courts[_subcourtID].jurorsForCourtJump = _jurorsForCourtJump;\\n        emit SubcourtModified(_subcourtID, \\\"jurorsForCourtJump\\\");\\n    }\\n\\n    /** @dev Changes the `hiddenVotes` property value of a specified subcourt.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _hiddenVotes The new value for the `hiddenVotes` property value.\\n     */\\n    function changeHiddenVotes(uint96 _subcourtID, bool _hiddenVotes) external onlyByGovernor {\\n        courts[_subcourtID].hiddenVotes = _hiddenVotes;\\n        emit SubcourtModified(_subcourtID, \\\"hiddenVotes\\\");\\n    }\\n\\n    /** @dev Changes the `timesPerPeriod` property value of a specified subcourt.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _timesPerPeriod The new value for the `timesPerPeriod` property value.\\n     */\\n    function changeSubcourtTimesPerPeriod(uint96 _subcourtID, uint256[4] memory _timesPerPeriod)\\n        external\\n        onlyByGovernor\\n    {\\n        courts[_subcourtID].timesPerPeriod = _timesPerPeriod;\\n        emit SubcourtModified(_subcourtID, \\\"timesPerPeriod\\\");\\n    }\\n\\n    /** @dev Adds/removes court's support for specified dispute kits.\\n     *  @param _subcourtID The ID of the subcourt.\\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 subcourt.\\n     */\\n    function enableDisputeKits(\\n        uint96 _subcourtID,\\n        uint256[] memory _disputeKitIDs,\\n        bool _enable\\n    ) external onlyByGovernor {\\n        Court storage subcourt = courts[_subcourtID];\\n        for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n            if (_enable) {\\n                require(_disputeKitIDs[i] > 0 && _disputeKitIDs[i] < disputeKitNodes.length, \\\"Wrong DK index\\\");\\n                enableDisputeKit(_subcourtID, _disputeKitIDs[i], true);\\n            } else {\\n                require(\\n                    !(_subcourtID == GENERAL_COURT && disputeKitNodes[_disputeKitIDs[i]].parent == NULL_DISPUTE_KIT),\\n                    \\\"Can't disable Root DK in General\\\"\\n                );\\n                enableDisputeKit(_subcourtID, _disputeKitIDs[i], false);\\n            }\\n        }\\n    }\\n\\n    // ************************************* //\\n    // *         State Modifiers           * //\\n    // ************************************* //\\n\\n    /** @dev Sets the caller's stake in a subcourt.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _stake The new stake.\\n     */\\n    function setStake(uint96 _subcourtID, uint256 _stake) external {\\n        require(setStakeForAccount(msg.sender, _subcourtID, _stake, 0), \\\"Staking failed\\\");\\n    }\\n\\n    /** @dev Executes the next delayed stakes.\\n     *  @param _iterations The number of delayed stakes to execute.\\n     */\\n    function executeDelayedStakes(uint256 _iterations) external {\\n        require(phase == Phase.staking, \\\"!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            setStakeForAccount(delayedStake.account, delayedStake.subcourtID, delayedStake.stake, delayedStake.penalty);\\n            delete delayedStakes[i];\\n        }\\n        delayedStakeReadIndex = newDelayedStakeReadIndex;\\n    }\\n\\n    /** @dev Creates a dispute. Must be called by the arbitrable contract.\\n     *  @param _numberOfChoices Number of choices for the jurors to choose from.\\n     *  @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's subcourt (first 32 bytes),\\n     *  the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n     *  @return disputeID The ID of the created dispute.\\n     */\\n    function createDispute(uint256 _numberOfChoices, bytes memory _extraData)\\n        external\\n        payable\\n        override\\n        returns (uint256 disputeID)\\n    {\\n        require(msg.value >= arbitrationCost(_extraData), \\\"ETH too low for arbitration cost\\\");\\n\\n        (uint96 subcourtID, , uint256 disputeKitID) = extraDataToSubcourtIDMinJurorsDisputeKit(_extraData);\\n        require(courts[subcourtID].supportedDisputeKits[disputeKitID], \\\"DK unsupported by subcourt\\\");\\n\\n        disputeID = disputes.length;\\n        Dispute storage dispute = disputes.push();\\n        dispute.subcourtID = subcourtID;\\n        dispute.arbitrated = IArbitrable(msg.sender);\\n        dispute.lastPeriodChange = block.timestamp;\\n\\n        IDisputeKit disputeKit = disputeKitNodes[disputeKitID].disputeKit;\\n        Court storage court = courts[dispute.subcourtID];\\n        Round storage round = dispute.rounds.push();\\n        round.nbVotes = msg.value / court.feeForJuror;\\n        round.disputeKitID = disputeKitID;\\n        round.tokensAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n        round.totalFeesForJurors = msg.value;\\n\\n        if (!disputeKitNodes[disputeKitID].needsFreezing) {\\n            // Ensures uniqueness in the disputesKitIDsThatNeedFreezing array.\\n            disputeKitNodes[disputeKitID].needsFreezing = true;\\n            disputesKitIDsThatNeedFreezing.push(disputeKitID);\\n        }\\n\\n        disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n        emit DisputeCreation(disputeID, IArbitrable(msg.sender));\\n    }\\n\\n    /** @dev Switches the phases between Staking and Freezing, also signal the switch to the dispute kits.\\n     */\\n    function passPhase() external {\\n        if (phase == Phase.staking) {\\n            require(block.timestamp - lastPhaseChange >= minStakingTime, \\\"MinStakingTime not passed\\\");\\n            require(disputesKitIDsThatNeedFreezing.length > 0, \\\"No DK needs freezing\\\");\\n            phase = Phase.freezing;\\n            freezeBlock = block.number;\\n        } else {\\n            // phase == Phase.freezing\\n            bool timeout = this.freezingPhaseTimeout();\\n            for (int256 i = int256(disputesKitIDsThatNeedFreezing.length) - 1; i >= 0; --i) {\\n                uint256 disputeKitID = disputesKitIDsThatNeedFreezing[uint256(i)];\\n                IDisputeKit disputeKit = disputeKitNodes[disputesKitIDsThatNeedFreezing[uint256(i)]].disputeKit;\\n                if (timeout && !disputeKit.isResolving()) {\\n                    // Force the dispute kit to be ready for Staking phase.\\n                    disputeKit.passPhase(); // Should not be called if already in Resolving phase, because it reverts.\\n                    require(disputeKit.isResolving(), \\\"Some DK not in Resolving phase\\\");\\n                } else {\\n                    // Check if the dispute kit is ready for Staking phase.\\n                    require(disputeKit.isResolving(), \\\"Some DK not in Resolving phase\\\");\\n                    if (disputeKit.disputesWithoutJurors() == 0) {\\n                        // The dispute kit had time to finish drawing jurors for all its disputes.\\n                        disputeKitNodes[disputeKitID].needsFreezing = false;\\n                        if (i < int256(disputesKitIDsThatNeedFreezing.length) - 1) {\\n                            // This is not the last element so copy the last element to the current one, then pop.\\n                            disputesKitIDsThatNeedFreezing[uint256(i)] = disputesKitIDsThatNeedFreezing[\\n                                disputesKitIDsThatNeedFreezing.length - 1\\n                            ];\\n                        }\\n                        disputesKitIDsThatNeedFreezing.pop();\\n                    }\\n                }\\n            }\\n            phase = Phase.staking;\\n        }\\n        // Should not be reached if the phase is unchanged.\\n        lastPhaseChange = block.timestamp;\\n        emit NewPhase(phase);\\n    }\\n\\n    /** @dev Passes the period of a specified dispute.\\n     *  @param _disputeID The ID of the dispute.\\n     */\\n    function passPeriod(uint256 _disputeID) external {\\n        Dispute storage dispute = disputes[_disputeID];\\n        Court storage court = courts[dispute.subcourtID];\\n\\n        uint256 currentRound = dispute.rounds.length - 1;\\n        Round storage round = dispute.rounds[currentRound];\\n        if (dispute.period == Period.evidence) {\\n            require(\\n                currentRound > 0 ||\\n                    block.timestamp - dispute.lastPeriodChange >= court.timesPerPeriod[uint256(dispute.period)],\\n                \\\"Evidence not passed && !Appeal\\\"\\n            );\\n            require(round.drawnJurors.length == round.nbVotes, \\\"Dispute still drawing\\\");\\n            dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n        } else if (dispute.period == Period.commit) {\\n            require(\\n                block.timestamp - dispute.lastPeriodChange >= court.timesPerPeriod[uint256(dispute.period)] ||\\n                    disputeKitNodes[round.disputeKitID].disputeKit.areCommitsAllCast(_disputeID),\\n                \\\"Commit period not passed\\\"\\n            );\\n            dispute.period = Period.vote;\\n        } else if (dispute.period == Period.vote) {\\n            require(\\n                block.timestamp - dispute.lastPeriodChange >= court.timesPerPeriod[uint256(dispute.period)] ||\\n                    disputeKitNodes[round.disputeKitID].disputeKit.areVotesAllCast(_disputeID),\\n                \\\"Vote period not passed\\\"\\n            );\\n            dispute.period = Period.appeal;\\n            emit AppealPossible(_disputeID, dispute.arbitrated);\\n        } else if (dispute.period == Period.appeal) {\\n            require(\\n                block.timestamp - dispute.lastPeriodChange >= court.timesPerPeriod[uint256(dispute.period)],\\n                \\\"Appeal period not passed\\\"\\n            );\\n            dispute.period = Period.execution;\\n        } else if (dispute.period == Period.execution) {\\n            revert(\\\"Dispute period is final\\\");\\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     */\\n    function draw(uint256 _disputeID, uint256 _iterations) external {\\n        require(phase == Phase.freezing, \\\"Wrong phase\\\");\\n\\n        Dispute storage dispute = disputes[_disputeID];\\n        uint256 currentRound = dispute.rounds.length - 1;\\n        Round storage round = dispute.rounds[currentRound];\\n        require(dispute.period == Period.evidence, \\\"!Evidence period\\\");\\n\\n        IDisputeKit disputeKit = disputeKitNodes[round.disputeKitID].disputeKit;\\n        uint256 startIndex = round.drawnJurors.length;\\n        uint256 endIndex = startIndex + _iterations <= round.nbVotes ? startIndex + _iterations : round.nbVotes;\\n\\n        for (uint256 i = startIndex; i < endIndex; i++) {\\n            address drawnAddress = disputeKit.draw(_disputeID);\\n            if (drawnAddress != address(0)) {\\n                // In case no one has staked at the court yet.\\n                jurors[drawnAddress].lockedTokens[dispute.subcourtID] += round.tokensAtStakePerJuror;\\n                round.drawnJurors.push(drawnAddress);\\n                emit Draw(drawnAddress, _disputeID, currentRound, i);\\n            }\\n        }\\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     */\\n    function appeal(\\n        uint256 _disputeID,\\n        uint256 _numberOfChoices,\\n        bytes memory _extraData\\n    ) external payable {\\n        require(msg.value >= appealCost(_disputeID), \\\"ETH too low for appeal cost\\\");\\n\\n        Dispute storage dispute = disputes[_disputeID];\\n        require(dispute.period == Period.appeal, \\\"Dispute not appealable\\\");\\n\\n        Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n        require(msg.sender == address(disputeKitNodes[round.disputeKitID].disputeKit), \\\"Dispute Kit only\\\");\\n\\n        uint96 newSubcourtID = dispute.subcourtID;\\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[newDisputeKitID].jurorsForCourtJump) {\\n            // Jump to parent subcourt.\\n            newSubcourtID = courts[newSubcourtID].parent;\\n\\n            for (uint256 i = 0; i < SEARCH_ITERATIONS; i++) {\\n                if (courts[newSubcourtID].supportedDisputeKits[newDisputeKitID]) {\\n                    break;\\n                } else if (disputeKitNodes[newDisputeKitID].parent != NULL_DISPUTE_KIT) {\\n                    newDisputeKitID = disputeKitNodes[newDisputeKitID].parent;\\n                } else {\\n                    // DK's parent has 0 index, that means we reached the root DK (0 depth level).\\n                    // Jump to the next parent court if the current court doesn't support any DK from this tree.\\n                    // Note that we don't reset newDisputeKitID in this case as, a precaution.\\n                    newSubcourtID = courts[newSubcourtID].parent;\\n                }\\n            }\\n            // We didn't find a court that is compatible with DK from this tree, so we jump directly to the top court.\\n            // Note that this can only happen when disputeKitID is at its root, and each root DK is supported by the top court by default.\\n            if (!courts[newSubcourtID].supportedDisputeKits[newDisputeKitID]) {\\n                newSubcourtID = GENERAL_COURT;\\n            }\\n\\n            if (newSubcourtID != dispute.subcourtID) {\\n                emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.subcourtID, newSubcourtID);\\n            }\\n        }\\n\\n        dispute.subcourtID = newSubcourtID;\\n        dispute.period = Period.evidence;\\n        dispute.lastPeriodChange = block.timestamp;\\n\\n        Court storage court = courts[newSubcourtID];\\n        extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n        extraRound.tokensAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n        extraRound.totalFeesForJurors = msg.value;\\n        extraRound.disputeKitID = newDisputeKitID;\\n\\n        if (!disputeKitNodes[newDisputeKitID].needsFreezing) {\\n            // Ensures uniqueness in the disputesKitIDsThatNeedFreezing array.\\n            disputeKitNodes[newDisputeKitID].needsFreezing = true;\\n            disputesKitIDsThatNeedFreezing.push(newDisputeKitID);\\n        }\\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            disputeKitNodes[extraRound.disputeKitID].disputeKit.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 tokens and ETH 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     */\\n    function execute(\\n        uint256 _disputeID,\\n        uint256 _round,\\n        uint256 _iterations\\n    ) external {\\n        Dispute storage dispute = disputes[_disputeID];\\n        require(dispute.period == Period.execution, \\\"!Execution period\\\");\\n\\n        Round storage round = dispute.rounds[_round];\\n        IDisputeKit disputeKit = disputeKitNodes[round.disputeKitID].disputeKit;\\n\\n        uint256 end = round.repartitions + _iterations;\\n        uint256 penaltiesInRoundCache = round.penalties; // 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        address account; // Address of the juror.\\n        uint256 degreeOfCoherence; // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\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 penalties, and second to distribute them as rewards along with arbitration fees.\\n            if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n        }\\n\\n        for (uint256 i = round.repartitions; i < end; i++) {\\n            if (i < numberOfVotesInRound) {\\n                // Penalty.\\n                degreeOfCoherence = disputeKit.getDegreeOfCoherence(_disputeID, _round, i);\\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                // Fully coherent jurors won't be penalized.\\n                uint256 penalty = (round.tokensAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n                penaltiesInRoundCache += penalty;\\n\\n                account = round.drawnJurors[i];\\n                jurors[account].lockedTokens[dispute.subcourtID] -= penalty; // Release this part of locked tokens.\\n\\n                // Can only update the stake if it is able to cover the minStake and penalty, otherwise unstake from the court.\\n                if (jurors[account].stakedTokens[dispute.subcourtID] >= courts[dispute.subcourtID].minStake + penalty) {\\n                    uint256 newStake = jurors[account].stakedTokens[dispute.subcourtID] - penalty;\\n                    setStakeForAccount(account, dispute.subcourtID, newStake, penalty);\\n                } else if (jurors[account].stakedTokens[dispute.subcourtID] != 0) {\\n                    setStakeForAccount(account, dispute.subcourtID, 0, penalty);\\n                }\\n\\n                // Unstake the juror if he lost due to inactivity.\\n                if (!disputeKit.isVoteActive(_disputeID, _round, i)) {\\n                    for (uint256 j = 0; j < jurors[account].subcourtIDs.length; j++) {\\n                        setStakeForAccount(account, jurors[account].subcourtIDs[j], 0, 0);\\n                    }\\n                }\\n                emit TokenAndETHShift(account, _disputeID, -int256(penalty), 0);\\n\\n                if (i == numberOfVotesInRound - 1) {\\n                    if (coherentCount == 0) {\\n                        // No one was coherent. Send the rewards to governor.\\n                        payable(governor).send(round.totalFeesForJurors);\\n                        safeTransfer(governor, penaltiesInRoundCache);\\n                    }\\n                }\\n            } else {\\n                // Reward.\\n                degreeOfCoherence = disputeKit.getDegreeOfCoherence(_disputeID, _round, i % numberOfVotesInRound);\\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                account = round.drawnJurors[i % numberOfVotesInRound];\\n\\n                // Release the rest of the tokens of the juror for this round.\\n                jurors[account].lockedTokens[dispute.subcourtID] -=\\n                    (round.tokensAtStakePerJuror * degreeOfCoherence) /\\n                    ALPHA_DIVISOR;\\n\\n                // Give back the locked tokens in case the juror fully unstaked earlier.\\n                if (jurors[account].stakedTokens[dispute.subcourtID] == 0) {\\n                    uint256 tokenLocked = (round.tokensAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n                    safeTransfer(account, tokenLocked);\\n                }\\n\\n                uint256 tokenReward = ((penaltiesInRoundCache / coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n                uint256 ethReward = ((round.totalFeesForJurors / coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n                safeTransfer(account, tokenReward);\\n                payable(account).send(ethReward);\\n                emit TokenAndETHShift(account, _disputeID, int256(tokenReward), int256(ethReward));\\n            }\\n        }\\n\\n        if (round.penalties != penaltiesInRoundCache) {\\n            round.penalties = penaltiesInRoundCache;\\n        }\\n        round.repartitions = end;\\n    }\\n\\n    /** @dev Executes a specified dispute's ruling. UNTRUSTED.\\n     *  @param _disputeID The ID of the dispute.\\n     */\\n    function executeRuling(uint256 _disputeID) external {\\n        Dispute storage dispute = disputes[_disputeID];\\n        require(dispute.period == Period.execution, \\\"!Execution period\\\");\\n        require(!dispute.ruled, \\\"Ruling already executed\\\");\\n\\n        uint256 winningChoice = currentRuling(_disputeID);\\n        dispute.ruled = true;\\n        dispute.arbitrated.rule(_disputeID, winningChoice);\\n    }\\n\\n    // ************************************* //\\n    // *           Public Views            * //\\n    // ************************************* //\\n\\n    /** @dev Gets the cost of arbitration in a specified subcourt.\\n     *  @param _extraData Additional info about the dispute. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes)\\n     *  and the minimum number of jurors required (next 32 bytes).\\n     *  @return cost The arbitration cost.\\n     */\\n    function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n        (uint96 subcourtID, uint256 minJurors, ) = extraDataToSubcourtIDMinJurorsDisputeKit(_extraData);\\n        cost = courts[subcourtID].feeForJuror * minJurors;\\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     */\\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.subcourtID];\\n        if (round.nbVotes >= court.jurorsForCourtJump) {\\n            // Jump to parent subcourt.\\n            if (dispute.subcourtID == GENERAL_COURT) {\\n                // TODO: Handle the forking when appealed in General court.\\n                cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent subcourt.\\n            } else {\\n                cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n            }\\n        } else {\\n            // Stay in current subcourt.\\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     */\\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.subcourtID].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     */\\n    function currentRuling(uint256 _disputeID) public view returns (uint256 ruling) {\\n        Dispute storage dispute = disputes[_disputeID];\\n        Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n        IDisputeKit disputeKit = disputeKitNodes[round.disputeKitID].disputeKit;\\n        return disputeKit.currentRuling(_disputeID);\\n    }\\n\\n    function getRoundInfo(uint256 _disputeID, uint256 _round)\\n        external\\n        view\\n        returns (\\n            uint256 tokensAtStakePerJuror,\\n            uint256 totalFeesForJurors,\\n            uint256 repartitions,\\n            uint256 penalties,\\n            address[] memory drawnJurors,\\n            uint256 disputeKitID\\n        )\\n    {\\n        Round storage round = disputes[_disputeID].rounds[_round];\\n        return (\\n            round.tokensAtStakePerJuror,\\n            round.totalFeesForJurors,\\n            round.repartitions,\\n            round.penalties,\\n            round.drawnJurors,\\n            round.disputeKitID\\n        );\\n    }\\n\\n    function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n        return disputes[_disputeID].rounds.length;\\n    }\\n\\n    function getJurorBalance(address _juror, uint96 _subcourtID)\\n        external\\n        view\\n        returns (uint256 staked, uint256 locked)\\n    {\\n        staked = jurors[_juror].stakedTokens[_subcourtID];\\n        locked = jurors[_juror].lockedTokens[_subcourtID];\\n    }\\n\\n    function isSupported(uint96 _subcourtID, uint256 _disputeKitID) external view returns (bool) {\\n        return courts[_subcourtID].supportedDisputeKits[_disputeKitID];\\n    }\\n\\n    /** @dev Gets non-primitive properties of a specified dispute kit node.\\n     *  @param _disputeKitID The ID of the dispute kit.\\n     *  @return children Indexes of children of this DK.\\n     */\\n    function getDisputeKitChildren(uint256 _disputeKitID) external view returns (uint256[] memory) {\\n        return disputeKitNodes[_disputeKitID].children;\\n    }\\n\\n    /** @dev Gets the timesPerPeriod array for a given court.\\n     *  @param _subcourtID The ID of the court to get the times from.\\n     *  @return timesPerPeriod The timesPerPeriod array for the given court.\\n     */\\n    function getTimesPerPeriod(uint96 _subcourtID) external view returns (uint256[4] memory timesPerPeriod) {\\n        Court storage court = courts[_subcourtID];\\n        timesPerPeriod = court.timesPerPeriod;\\n    }\\n\\n    // ************************************* //\\n    // *   Public Views for Dispute Kits   * //\\n    // ************************************* //\\n\\n    function getSortitionSumTreeNode(bytes32 _key, uint256 _index) external view returns (uint256) {\\n        return sortitionSumTrees.sortitionSumTrees[_key].nodes[_index];\\n    }\\n\\n    function getSortitionSumTree(bytes32 _key, uint256 _nodeIndex)\\n        public\\n        view\\n        returns (\\n            uint256 K,\\n            uint256 length,\\n            bytes32 ID\\n        )\\n    {\\n        SortitionSumTreeFactory.SortitionSumTree storage tree = sortitionSumTrees.sortitionSumTrees[_key];\\n        K = tree.K;\\n        length = tree.nodes.length;\\n        ID = tree.nodeIndexesToIDs[_nodeIndex];\\n    }\\n\\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    function freezingPhaseTimeout() external view returns (bool) {\\n        return phase == Phase.freezing && block.timestamp - lastPhaseChange >= maxFreezingTime;\\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     */\\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.subcourtID];\\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 getLastRoundResult(uint256 _disputeID) external view returns (uint256 winningChoice, bool tied) {\\n        Dispute storage dispute = disputes[_disputeID];\\n        Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n        (winningChoice, tied) = disputeKitNodes[round.disputeKitID].disputeKit.getLastRoundResult(_disputeID);\\n    }\\n\\n    function getDisputesKitIDsThatNeedFreezing() external view returns (uint256[] memory) {\\n        return disputesKitIDsThatNeedFreezing;\\n    }\\n\\n    // ************************************* //\\n    // *            Internal               * //\\n    // ************************************* //\\n\\n    function enableDisputeKit(\\n        uint96 _subcourtID,\\n        uint256 _disputeKitID,\\n        bool _enable\\n    ) internal {\\n        courts[_subcourtID].supportedDisputeKits[_disputeKitID] = _enable;\\n        emit DisputeKitEnabled(_subcourtID, _disputeKitID, _enable);\\n    }\\n\\n    /** @dev Sets the specified juror's stake in a subcourt.\\n     *  `O(n + p * log_k(j))` where\\n     *  `n` is the number of subcourts the juror has staked in,\\n     *  `p` is the depth of the subcourt tree,\\n     *  `k` is the minimum number of children per node of one of these subcourts' sortition sum tree,\\n     *  and `j` is the maximum number of jurors that ever staked in one of these subcourts simultaneously.\\n     *  @param _account The address of the juror.\\n     *  @param _subcourtID The ID of the subcourt.\\n     *  @param _stake The new stake.\\n     *  @param _penalty Penalized amount won't be transferred back to juror when the stake is lowered.\\n     *  @return succeeded True if the call succeeded, false otherwise.\\n     */\\n    function setStakeForAccount(\\n        address _account,\\n        uint96 _subcourtID,\\n        uint256 _stake,\\n        uint256 _penalty\\n    ) internal returns (bool succeeded) {\\n        if (_subcourtID == FORKING_COURT || _subcourtID > courts.length) return false;\\n\\n        Juror storage juror = jurors[_account];\\n        bytes32 stakePathID = accountAndSubcourtIDToStakePathID(_account, _subcourtID);\\n        uint256 currentStake = sortitionSumTrees.stakeOf(bytes32(uint256(_subcourtID)), stakePathID);\\n\\n        if (_stake != 0) {\\n            // Check against locked tokens in case the min stake was lowered.\\n            if (_stake < courts[_subcourtID].minStake || _stake < juror.lockedTokens[_subcourtID]) return false;\\n            if (currentStake == 0 && juror.subcourtIDs.length >= MAX_STAKE_PATHS) return false;\\n        }\\n\\n        // Delayed action logic.\\n        if (phase != Phase.staking) {\\n            delayedStakes[++delayedStakeWriteIndex] = DelayedStake({\\n                account: _account,\\n                subcourtID: _subcourtID,\\n                stake: _stake,\\n                penalty: _penalty\\n            });\\n            return true;\\n        }\\n\\n        uint256 transferredAmount;\\n        if (_stake >= currentStake) {\\n            transferredAmount = _stake - currentStake;\\n            if (transferredAmount > 0) {\\n                if (safeTransferFrom(_account, address(this), transferredAmount)) {\\n                    if (currentStake == 0) {\\n                        juror.subcourtIDs.push(_subcourtID);\\n                    }\\n                } else {\\n                    return false;\\n                }\\n            }\\n        } else if (_stake == 0) {\\n            // Keep locked tokens in the contract and release them after dispute is executed.\\n            transferredAmount = currentStake - juror.lockedTokens[_subcourtID] - _penalty;\\n            if (transferredAmount > 0) {\\n                if (safeTransfer(_account, transferredAmount)) {\\n                    for (uint256 i = 0; i < juror.subcourtIDs.length; i++) {\\n                        if (juror.subcourtIDs[i] == _subcourtID) {\\n                            juror.subcourtIDs[i] = juror.subcourtIDs[juror.subcourtIDs.length - 1];\\n                            juror.subcourtIDs.pop();\\n                            break;\\n                        }\\n                    }\\n                } else {\\n                    return false;\\n                }\\n            }\\n        } else {\\n            transferredAmount = currentStake - _stake - _penalty;\\n            if (transferredAmount > 0) {\\n                if (!safeTransfer(_account, transferredAmount)) {\\n                    return false;\\n                }\\n            }\\n        }\\n\\n        // Update juror's records.\\n        uint256 newTotalStake = juror.stakedTokens[_subcourtID] - currentStake + _stake;\\n        juror.stakedTokens[_subcourtID] = newTotalStake;\\n\\n        // Update subcourt parents.\\n        bool finished = false;\\n        uint256 currentSubcourtID = _subcourtID;\\n        while (!finished) {\\n            sortitionSumTrees.set(bytes32(currentSubcourtID), _stake, stakePathID);\\n            if (currentSubcourtID == GENERAL_COURT) finished = true;\\n            else currentSubcourtID = courts[currentSubcourtID].parent;\\n        }\\n\\n        emit StakeSet(_account, _subcourtID, _stake, newTotalStake);\\n\\n        return true;\\n    }\\n\\n    /** @dev Gets a subcourt 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 subcourt ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n     *  @return subcourtID The subcourt ID.\\n     *  @return minJurors The minimum number of jurors required.\\n     *  @return disputeKitID The ID of the dispute kit.\\n     */\\n    function extraDataToSubcourtIDMinJurorsDisputeKit(bytes memory _extraData)\\n        internal\\n        view\\n        returns (\\n            uint96 subcourtID,\\n            uint256 minJurors,\\n            uint256 disputeKitID\\n        )\\n    {\\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                subcourtID := mload(add(_extraData, 0x20))\\n                minJurors := mload(add(_extraData, 0x40))\\n                disputeKitID := mload(add(_extraData, 0x60))\\n            }\\n            if (subcourtID == FORKING_COURT || subcourtID >= courts.length) {\\n                subcourtID = GENERAL_COURT;\\n            }\\n            if (minJurors == 0) {\\n                minJurors = MIN_JURORS;\\n            }\\n            if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKitNodes.length) {\\n                disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n            }\\n        } else {\\n            subcourtID = GENERAL_COURT;\\n            minJurors = MIN_JURORS;\\n            disputeKitID = DISPUTE_KIT_CLASSIC;\\n        }\\n    }\\n\\n    /** @dev Packs an account and a subcourt ID into a stake path ID.\\n     *  @param _account The address of the juror to pack.\\n     *  @param _subcourtID The subcourt ID to pack.\\n     *  @return stakePathID The stake path ID.\\n     */\\n    function accountAndSubcourtIDToStakePathID(address _account, uint96 _subcourtID)\\n        internal\\n        pure\\n        returns (bytes32 stakePathID)\\n    {\\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, _subcourtID))\\n            }\\n            stakePathID := mload(ptr)\\n        }\\n    }\\n\\n    /** @dev Calls transfer() without reverting.\\n     *  @param _to Recepient address.\\n     *  @param _value Amount transferred.\\n     *  @return Whether transfer succeeded or not.\\n     */\\n    function safeTransfer(address _to, uint256 _value) internal returns (bool) {\\n        (bool success, bytes memory data) = address(pinakion).call(\\n            abi.encodeWithSelector(IERC20.transfer.selector, _to, _value)\\n        );\\n        return (success && (data.length == 0 || abi.decode(data, (bool))));\\n    }\\n\\n    /** @dev Calls transferFrom() without reverting.\\n     *  @param _from Sender address.\\n     *  @param _to Recepient address.\\n     *  @param _value Amount transferred.\\n     *  @return Whether transfer succeeded or not.\\n     */\\n    function safeTransferFrom(\\n        address _from,\\n        address _to,\\n        uint256 _value\\n    ) internal returns (bool) {\\n        (bool success, bytes memory data) = address(pinakion).call(\\n            abi.encodeWithSelector(IERC20.transferFrom.selector, _from, _to, _value)\\n        );\\n        return (success && (data.length == 0 || abi.decode(data, (bool))));\\n    }\\n}\\n\",\"keccak256\":\"0xd8593fcedfc04eba288fded13f7ccdfe51224d65b75117bad4baee156037949f\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/BaseDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n *  @authors: [@unknownunknown1, @jaybuidl]\\n *  @reviewers: []\\n *  @auditors: []\\n *  @bounties: []\\n *  @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\nimport \\\"../IDisputeKit.sol\\\";\\nimport \\\"../KlerosCore.sol\\\";\\n\\n/**\\n *  @title BaseDisputeKit\\n *  Provides common basic behaviours to the Dispute Kit implementations.\\n */\\nabstract contract BaseDisputeKit is IDisputeKit {\\n    // ************************************* //\\n    // *             Storage               * //\\n    // ************************************* //\\n\\n    address public governor; // The governor of the contract.\\n    KlerosCore public core; // The Kleros Core arbitrator\\n\\n    // ************************************* //\\n    // *        Function 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    /** @dev Constructor.\\n     *  @param _governor The governor's address.\\n     *  @param _core The KlerosCore arbitrator.\\n     */\\n    constructor(address _governor, KlerosCore _core) {\\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     */\\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 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     */\\n    function postDrawCheck(uint256 _coreDisputeID, address _juror) internal virtual returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1b7fe7456537ffe8a7f84b45e9d5081703895233827ba4a9aa0c545a4ae4f8\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n *  @authors: [@unknownunknown1, @jaybuidl]\\n *  @reviewers: []\\n *  @auditors: []\\n *  @bounties: []\\n *  @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./BaseDisputeKit.sol\\\";\\nimport \\\"../../rng/RNG.sol\\\";\\nimport \\\"../../evidence/IEvidence.sol\\\";\\n\\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 aggreation system: plurality,\\n *  - an incentive system: equal split between coherent votes,\\n *  - an appeal system: fund 2 choices only, vote on any choice.\\n */\\ncontract DisputeKitClassic is BaseDisputeKit, IEvidence {\\n    // ************************************* //\\n    // *             Structs               * //\\n    // ************************************* //\\n\\n    enum Phase {\\n        resolving, // No disputes that need drawing.\\n        generating, // Waiting for a random number. Pass as soon as it is ready.\\n        drawing // Jurors can be drawn.\\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    RNG public rng; // The random number generator\\n    uint256 public RNBlock; // The block number when the random number was requested.\\n    uint256 public RN; // The current random number.\\n    Phase public phase; // Current phase of this dispute kit.\\n    uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\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    event Contribution(\\n        uint256 indexed _coreDisputeID,\\n        uint256 indexed _coreRoundID,\\n        uint256 _choice,\\n        address indexed _contributor,\\n        uint256 _amount\\n    );\\n\\n    event Withdrawal(\\n        uint256 indexed _coreDisputeID,\\n        uint256 indexed _coreRoundID,\\n        uint256 _choice,\\n        address indexed _contributor,\\n        uint256 _amount\\n    );\\n\\n    event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n    event NewPhaseDisputeKit(Phase _phase);\\n\\n    // ************************************* //\\n    // *              Modifiers            * //\\n    // ************************************* //\\n\\n    modifier notJumped(uint256 _coreDisputeID) {\\n        require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n        _;\\n    }\\n\\n    /** @dev Constructor.\\n     *  @param _governor The governor's address.\\n     *  @param _core The KlerosCore arbitrator.\\n     *  @param _rng The random number generator.\\n     */\\n    constructor(\\n        address _governor,\\n        KlerosCore _core,\\n        RNG _rng\\n    ) BaseDisputeKit(_governor, _core) {\\n        rng = _rng;\\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     */\\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     */\\n    function changeCore(address _core) external onlyByGovernor {\\n        core = KlerosCore(_core);\\n    }\\n\\n    /** @dev Changes the `_rng` storage variable.\\n     *  @param _rng The new value for the `RNGenerator` storage variable.\\n     */\\n    function changeRandomNumberGenerator(RNG _rng) external onlyByGovernor {\\n        rng = _rng;\\n        // TODO: if current phase is generating, call rng.requestRN() for the next block\\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     */\\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        disputesWithoutJurors++;\\n    }\\n\\n    /** @dev Passes the phase.\\n     */\\n    function passPhase() external override {\\n        if (core.phase() == KlerosCore.Phase.staking || core.freezingPhaseTimeout()) {\\n            require(phase != Phase.resolving, \\\"Already in Resolving phase\\\");\\n            phase = Phase.resolving; // Safety net.\\n        } else if (core.phase() == KlerosCore.Phase.freezing) {\\n            if (phase == Phase.resolving) {\\n                require(disputesWithoutJurors > 0, \\\"All the disputes have jurors\\\");\\n                require(block.number >= core.freezeBlock() + 20, \\\"Too soon: L1 finality required\\\");\\n                // TODO: RNG process is currently unfinished.\\n                RNBlock = block.number;\\n                rng.requestRN(block.number);\\n                phase = Phase.generating;\\n            } else if (phase == Phase.generating) {\\n                RN = rng.getRN(RNBlock);\\n                require(RN != 0, \\\"Random number is not ready yet\\\");\\n                phase = Phase.drawing;\\n            } else if (phase == Phase.drawing) {\\n                require(disputesWithoutJurors == 0, \\\"Not ready for Resolving phase\\\");\\n                phase = Phase.resolving;\\n            }\\n        }\\n        // Should not be reached if the phase is unchanged.\\n        emit NewPhaseDisputeKit(phase);\\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     *  @return drawnAddress The drawn address.\\n     */\\n    function draw(uint256 _coreDisputeID)\\n        external\\n        override\\n        onlyByCore\\n        notJumped(_coreDisputeID)\\n        returns (address drawnAddress)\\n    {\\n        require(phase == Phase.drawing, \\\"Should be in drawing phase\\\");\\n\\n        Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n        Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n        (uint96 subcourtID, , , , ) = core.disputes(_coreDisputeID);\\n        bytes32 key = bytes32(uint256(subcourtID)); // Get the ID of the tree.\\n        uint256 drawnNumber = getRandomNumber();\\n\\n        (uint256 K, uint256 nodesLength, ) = core.getSortitionSumTree(key, 0);\\n        uint256 treeIndex = 0;\\n        uint256 currentDrawnNumber = drawnNumber % core.getSortitionSumTreeNode(key, 0);\\n\\n        // TODO: Handle the situation when no one has staked yet.\\n\\n        // While it still has children\\n        while ((K * treeIndex) + 1 < nodesLength) {\\n            for (uint256 i = 1; i <= K; i++) {\\n                // Loop over children.\\n                uint256 nodeIndex = (K * treeIndex) + i;\\n                uint256 nodeValue = core.getSortitionSumTreeNode(key, 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\\n        (, , bytes32 ID) = core.getSortitionSumTree(key, treeIndex);\\n        drawnAddress = stakePathIDToAccount(ID);\\n\\n        if (postDrawCheck(_coreDisputeID, drawnAddress)) {\\n            round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n            if (round.votes.length == round.nbVotes) {\\n                disputesWithoutJurors--;\\n            }\\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     */\\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    }\\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     */\\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 subcourtID, , , , ) = core.disputes(_coreDisputeID);\\n        (, bool hiddenVotes, , , , ) = core.courts(subcourtID);\\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 ||\\n                    round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _justification, _salt)),\\n                \\\"The commit must match the choice in subcourts 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 Justification(_coreDisputeID, msg.sender, _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     */\\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        if (this.currentRuling(_coreDisputeID) == _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                disputesWithoutJurors++;\\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     */\\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    /** @dev Submits evidence.\\n     *  @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to. 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     */\\n    function submitEvidence(uint256 _evidenceGroupID, string calldata _evidence) external {\\n        emit Evidence(core, _evidenceGroupID, msg.sender, _evidence);\\n    }\\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.\\n     *  @return ruling The current ruling.\\n     */\\n    function currentRuling(uint256 _coreDisputeID) external view override returns (uint256 ruling) {\\n        Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n        Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n        ruling = round.tied ? 0 : round.winningChoice;\\n    }\\n\\n    function getLastRoundResult(uint256 _coreDisputeID)\\n        external\\n        view\\n        override\\n        returns (uint256 winningChoice, bool tied)\\n    {\\n        Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n        Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n        return (lastRound.winningChoice, lastRound.tied);\\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     */\\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.getLastRoundResult(_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     */\\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.getLastRoundResult(_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     */\\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     */\\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     */\\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    )\\n        external\\n        view\\n        override\\n        returns (\\n            address account,\\n            bytes32 commit,\\n            uint256 choice,\\n            bool voted\\n        )\\n    {\\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    function isResolving() external view override returns (bool) {\\n        return phase == Phase.resolving;\\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     */\\n    function postDrawCheck(uint256 _coreDisputeID, address _juror) internal view override returns (bool) {\\n        (uint96 subcourtID, , , , ) = core.disputes(_coreDisputeID);\\n        (uint256 lockedAmountPerJuror, , , , , ) = core.getRoundInfo(\\n            _coreDisputeID,\\n            core.getNumberOfRounds(_coreDisputeID) - 1\\n        );\\n        (uint256 stakedTokens, uint256 lockedTokens) = core.getJurorBalance(_juror, subcourtID);\\n        return stakedTokens >= lockedTokens + lockedAmountPerJuror;\\n    }\\n\\n    /** @dev RNG function\\n     *  @return rn A random number.\\n     */\\n    function getRandomNumber() internal returns (uint256) {\\n        return rng.getUncorrelatedRN(block.number);\\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     */\\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\",\"keccak256\":\"0x9142ba7ec4cde26b876011bd9c782c75b906d1d9ab8465938ceeb3b3c2bd705f\",\"license\":\"MIT\"},\"src/data-structures/SortitionSumTreeFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n *  @authors: [@epiqueras, @unknownunknown1]\\n *  @reviewers: []\\n *  @auditors: []\\n *  @bounties: []\\n *  @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\n/**\\n *  @title SortitionSumTreeFactory\\n *  @dev A factory of trees that keeps track of staked values for sortition. This is the updated version for 0.8 compiler.\\n */\\nlibrary SortitionSumTreeFactory {\\n    /* Structs */\\n\\n    struct SortitionSumTree {\\n        uint256 K; // The maximum number of childs 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    /* Storage */\\n\\n    struct SortitionSumTrees {\\n        mapping(bytes32 => SortitionSumTree) sortitionSumTrees;\\n    }\\n\\n    /* Public */\\n\\n    /**\\n     *  @dev Create a sortition sum tree at the specified key.\\n     *  @param _key The key of the new tree.\\n     *  @param _K The number of children each node in the tree should have.\\n     */\\n    function createTree(\\n        SortitionSumTrees storage self,\\n        bytes32 _key,\\n        uint256 _K\\n    ) external {\\n        SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\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    /**\\n     *  @dev Set a value of 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 childs per node in the tree,\\n     *   and `n` is the maximum number of nodes ever appended.\\n     */\\n    function set(\\n        SortitionSumTrees storage self,\\n        bytes32 _key,\\n        uint256 _value,\\n        bytes32 _ID\\n    ) external {\\n        SortitionSumTree storage tree = self.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(self, _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(self, _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(self, _key, treeIndex, plusOrMinus, plusOrMinusValue);\\n            }\\n        }\\n    }\\n\\n    /* Public Views */\\n\\n    /**\\n     *  @dev Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned.\\n     *  @param _key The key of the tree to get the leaves from.\\n     *  @param _cursor The pagination cursor.\\n     *  @param _count The number of items to return.\\n     *  @return startIndex The index at which leaves start.\\n     *  @return values The values of the returned leaves.\\n     *  @return hasMore Whether there are more for pagination.\\n     *  `O(n)` where\\n     *  `n` is the maximum number of nodes ever appended.\\n     */\\n    function queryLeafs(\\n        SortitionSumTrees storage self,\\n        bytes32 _key,\\n        uint256 _cursor,\\n        uint256 _count\\n    )\\n        external\\n        view\\n        returns (\\n            uint256 startIndex,\\n            uint256[] memory values,\\n            bool hasMore\\n        )\\n    {\\n        SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n\\n        // Find the start index.\\n        for (uint256 i = 0; i < tree.nodes.length; i++) {\\n            if ((tree.K * i) + 1 >= tree.nodes.length) {\\n                startIndex = i;\\n                break;\\n            }\\n        }\\n\\n        // Get the values.\\n        uint256 loopStartIndex = startIndex + _cursor;\\n        values = new uint256[](\\n            loopStartIndex + _count > tree.nodes.length ? tree.nodes.length - loopStartIndex : _count\\n        );\\n        uint256 valuesIndex = 0;\\n        for (uint256 j = loopStartIndex; j < tree.nodes.length; j++) {\\n            if (valuesIndex < _count) {\\n                values[valuesIndex] = tree.nodes[j];\\n                valuesIndex++;\\n            } else {\\n                hasMore = true;\\n                break;\\n            }\\n        }\\n    }\\n\\n    /** @dev Gets a specified ID's associated value.\\n     *  @param _key The key of the tree.\\n     *  @param _ID The ID of the value.\\n     *  @return value The associated value.\\n     */\\n    function stakeOf(\\n        SortitionSumTrees storage self,\\n        bytes32 _key,\\n        bytes32 _ID\\n    ) external view returns (uint256 value) {\\n        SortitionSumTree storage tree = self.sortitionSumTrees[_key];\\n        uint256 treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n        if (treeIndex == 0) value = 0;\\n        else value = tree.nodes[treeIndex];\\n    }\\n\\n    /* Private */\\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 childs per node in the tree,\\n     *   and `n` is the maximum number of nodes ever appended.\\n     */\\n    function updateParents(\\n        SortitionSumTrees storage self,\\n        bytes32 _key,\\n        uint256 _treeIndex,\\n        bool _plusOrMinus,\\n        uint256 _value\\n    ) private {\\n        SortitionSumTree storage tree = self.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\",\"keccak256\":\"0x158abfe345fecd93d3d6de008c01f4f72ffb03af5c6fbdf0208c7228fc978114\",\"license\":\"MIT\"},\"src/evidence/IEvidence.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../arbitration/IArbitrator.sol\\\";\\n\\n/** @title IEvidence\\n *  ERC-1497: Evidence Standard\\n */\\ninterface IEvidence {\\n    /**\\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 _arbitrator The arbitrator of the contract.\\n     * @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.\\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     */\\n    event Evidence(\\n        IArbitrator indexed _arbitrator,\\n        uint256 indexed _evidenceGroupID,\\n        address indexed _party,\\n        string _evidence\\n    );\\n}\\n\",\"keccak256\":\"0x9656bf34a7ec73bb3b42b6a880047736f395074ac1841096fec7f65337c197d4\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@clesaege]\\n * @reviewers: [@remedcu]\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8;\\n\\n/**\\n * @title Random Number Generator Standard\\n * @author Cl\\u00e9ment Lesaege - <clement@lesaege.com>\\n * @dev This is an abstract contract\\n */\\nabstract contract RNG {\\n    /**\\n     * @dev Contribute to the reward of a random number.\\n     * @param _block Block the random number is linked to.\\n     */\\n    function contribute(uint256 _block) public payable virtual;\\n\\n    /**\\n     * @dev Request a random number.\\n     * @param _block Block linked to the request.\\n     */\\n    function requestRN(uint256 _block) public payable {\\n        contribute(_block);\\n    }\\n\\n    /**\\n     * @dev Get the random number.\\n     * @param _block Block the random number is linked to.\\n     * @return RN Random Number. If the number is not ready or has not been required 0 instead.\\n     */\\n    function getRN(uint256 _block) public virtual returns (uint256 RN);\\n\\n    /**\\n     * @dev Get a uncorrelated random number. Act like getRN but give a different number for each sender.\\n     *      This is to prevent users from getting correlated numbers.\\n     * @param _block Block the random number is linked to.\\n     * @return RN Random Number. If the number is not ready or has not been required 0 instead.\\n     */\\n    function getUncorrelatedRN(uint256 _block) public returns (uint256 RN) {\\n        uint256 baseRN = getRN(_block);\\n        if (baseRN == 0) return 0;\\n        else return uint256(keccak256(abi.encode(msg.sender, baseRN)));\\n    }\\n}\\n\",\"keccak256\":\"0x854bcb147fe44383cba7a5fdbcb69b3c0a9a71435c80eb73c172222da472a855\",\"license\":\"MIT\"}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b50604051620043c0380380620043c0833981016040819052620000349162000090565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560028054919093169116179055620000e4565b6001600160a01b03811681146200008d57600080fd5b50565b600080600060608486031215620000a657600080fd5b8351620000b38162000077565b6020850151909350620000c68162000077565b6040850151909250620000d98162000077565b809150509250925092565b6142cc80620000f46000396000f3fe6080604052600436106102045760003560e01c8063796490f911610118578063ba66fde7116100a0578063d605787b1161006f578063d605787b14610638578063da3beb8c14610658578063e349ad3014610479578063e4c0aaf414610678578063f2f4eb261461069857600080fd5b8063ba66fde7146105cd578063be467604146105ed578063c41bda6114610603578063c86ed8921461062357600080fd5b8063a6a7f0eb116100e7578063a6a7f0eb14610504578063a7cc08fe14610524578063b1c9fe6e14610570578063b34bfaa814610597578063b6ede540146105ad57600080fd5b8063796490f9146104795780637c04034e1461048f5780638e426460146104af5780639b05c261146104cf57600080fd5b80633b3041471161019b5780635c92e2f61161016a5780635c92e2f6146103b65780635e4a627d146103d657806369f3f041146103ec5780636d4cd8ea14610439578063751accd01461045957600080fd5b80633b304147146103345780634b2f0ea0146103545780634fe264fb14610367578063564a565d1461038757600080fd5b80630c340a24116101d75780630c340a241461028f5780631200aabc146102c75780631c3db16d146102f4578063362c34791461031457600080fd5b8063023d44df1461020957806303432744146102325780630b274f2e146102485780630baa64d11461025f575b600080fd5b34801561021557600080fd5b5061021f60035481565b6040519081526020015b60405180910390f35b34801561023e57600080fd5b5061021f60065481565b34801561025457600080fd5b5061025d6106b8565b005b34801561026b57600080fd5b5061027f61027a36600461380a565b610c8a565b6040519015158152602001610229565b34801561029b57600080fd5b506000546102af906001600160a01b031681565b6040516001600160a01b039091168152602001610229565b3480156102d357600080fd5b5061021f6102e236600461380a565b60086020526000908152604090205481565b34801561030057600080fd5b5061021f61030f36600461380a565b610d01565b34801561032057600080fd5b5061021f61032f36600461383b565b610d8b565b34801561034057600080fd5b506102af61034f36600461380a565b611179565b61025d610362366004613878565b611731565b34801561037357600080fd5b5061021f61038236600461389a565b611fcb565b34801561039357600080fd5b506103a76103a236600461380a565b61211b565b6040516102299392919061391e565b3480156103c257600080fd5b5061025d6103d1366004613994565b6121e1565b3480156103e257600080fd5b5061021f60045481565b3480156103f857600080fd5b5061040c61040736600461389a565b6124ed565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610229565b34801561044557600080fd5b5061027f61045436600461380a565b6125a5565b34801561046557600080fd5b5061025d610474366004613a86565b61261c565b34801561048557600080fd5b5061021f61271081565b34801561049b57600080fd5b5061025d6104aa366004613af3565b6126ee565b3480156104bb57600080fd5b5061025d6104ca366004613b8c565b612e26565b3480156104db57600080fd5b506104ef6104ea36600461380a565b612e72565b60408051928352901515602083015201610229565b34801561051057600080fd5b5061025d61051f366004613beb565b612ef5565b34801561053057600080fd5b5061054461053f36600461389a565b612f47565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610229565b34801561057c57600080fd5b5060055461058a9060ff1681565b6040516102299190613c4d565b3480156105a357600080fd5b5061021f614e2081565b3480156105b957600080fd5b5061025d6105c8366004613c75565b61300d565b3480156105d957600080fd5b5061027f6105e836600461389a565b6131c6565b3480156105f957600080fd5b5061021f61138881565b34801561060f57600080fd5b5061025d61061e366004613b8c565b613261565b34801561062f57600080fd5b5061027f6132ad565b34801561064457600080fd5b506002546102af906001600160a01b031681565b34801561066457600080fd5b5061021f610673366004613878565b6132cd565b34801561068457600080fd5b5061025d610693366004613b8c565b61342d565b3480156106a457600080fd5b506001546102af906001600160a01b031681565b600154604080516358e4ff3760e11b815290516000926001600160a01b03169163b1c9fe6e916004808301926020929190829003018186803b1580156106fd57600080fd5b505afa158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190613cd0565b600181111561074657610746613c37565b14806107d35750600160009054906101000a90046001600160a01b03166001600160a01b031663b70c4e946040518163ffffffff1660e01b815260040160206040518083038186803b15801561079b57600080fd5b505afa1580156107af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d39190613d06565b1561085e57600060055460ff1660028111156107f1576107f1613c37565b14156108445760405162461bcd60e51b815260206004820152601a60248201527f416c726561647920696e205265736f6c76696e6720706861736500000000000060448201526064015b60405180910390fd5b600580546000919060ff19166001835b0217905550610c49565b60018060009054906101000a90046001600160a01b03166001600160a01b031663b1c9fe6e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108ad57600080fd5b505afa1580156108c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e59190613cd0565b60018111156108f6576108f6613c37565b1415610c4957600060055460ff16600281111561091557610915613c37565b1415610ac45760006006541161096d5760405162461bcd60e51b815260206004820152601c60248201527f416c6c207468652064697370757465732068617665206a75726f727300000000604482015260640161083b565b600160009054906101000a90046001600160a01b03166001600160a01b0316633a1578606040518163ffffffff1660e01b815260040160206040518083038186803b1580156109bb57600080fd5b505afa1580156109cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f39190613d21565b6109fe906014613d50565b431015610a4d5760405162461bcd60e51b815260206004820152601e60248201527f546f6f20736f6f6e3a204c312066696e616c6974792072657175697265640000604482015260640161083b565b4360038190556002546040516303dce1a760e51b815260048101929092526001600160a01b031690637b9c34e090602401600060405180830381600087803b158015610a9857600080fd5b505af1158015610aac573d6000803e3d6000fd5b5050600580546001935090915060ff19168280610854565b600160055460ff166002811115610add57610add613c37565b1415610bcf5760025460035460405163ca4742f160e01b81526001600160a01b039092169163ca4742f191610b189160040190815260200190565b602060405180830381600087803b158015610b3257600080fd5b505af1158015610b46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6a9190613d21565b6004819055610bbb5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f74207265616479207965740000604482015260640161083b565b600580546002919060ff1916600183610854565b600260055460ff166002811115610be857610be8613c37565b1415610c495760065415610c3e5760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420726561647920666f72205265736f6c76696e67207068617365000000604482015260640161083b565b6005805460ff191690555b6005546040517fdeeacb313775e12b099f27fe481aa82204a1806233e7125cc8a9f719e5ddfdc591610c809160ff90911690613c4d565b60405180910390a1565b600081815260086020526040812054600780548392908110610cae57610cae613d68565b60009182526020822060059091020180549092508290610cd090600190613d7e565b81548110610ce057610ce0613d68565b60009182526020909120600c90910201805460059091015414949350505050565b600081815260086020526040812054600780548392908110610d2557610d25613d68565b60009182526020822060059091020180549092508290610d4790600190613d7e565b81548110610d5757610d57613d68565b60009182526020909120600c90910201600381015490915060ff16610d80578060010154610d83565b60005b949350505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a06040518083038186803b158015610dd457600080fd5b505afa158015610de8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0c9190613dac565b50935050505080610e5f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e0000000000604482015260640161083b565b600086815260086020526040812054600780549091908110610e8357610e83613d68565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610eb757610eb7613d68565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d9060240160206040518083038186803b158015610f0d57600080fd5b505afa158015610f21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f459190613d21565b600087815260078401602052604090205490915060ff16610f8d576001600160a01b0388166000908152600883016020908152604080832089845290915290205494506110d3565b80861415611003576000868152600683016020526040902054610fb1576000610ffc565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610ff29190613e13565b610ffc9190613e48565b94506110d3565b600081815260078301602052604090205460ff166110d35781600601600083600a0160018154811061103757611037613d68565b906000526020600020015481526020019081526020016000205482600601600084600a0160008154811061106d5761106d613d68565b90600052602060002001548152602001908152602001600020546110919190613d50565b60098301546001600160a01b038a16600090815260088501602090815260408083208b84529091529020546110c69190613e13565b6110d09190613e48565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561116d576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b6001546000906001600160a01b031633146111a65760405162461bcd60e51b815260040161083b90613e5c565b6000828152600860205260409020546007805484929081106111ca576111ca613d68565b600091825260209091206002600590920201015460ff16156111fe5760405162461bcd60e51b815260040161083b90613ea0565b600260055460ff16600281111561121757611217613c37565b146112645760405162461bcd60e51b815260206004820152601a60248201527f53686f756c6420626520696e2064726177696e67207068617365000000000000604482015260640161083b565b60008381526008602052604081205460078054909190811061128857611288613d68565b600091825260208220600590910201805490925082906112aa90600190613d7e565b815481106112ba576112ba613d68565b60009182526020822060015460405163564a565d60e01b8152600481018a9052600c9390930290910193506001600160a01b03169063564a565d9060240160a06040518083038186803b15801561131057600080fd5b505afa158015611324573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113489190613dac565b50929350506001600160601b038316915060009050611365613479565b60015460405163bfabfe8f60e01b81526004810185905260006024820181905292935082916001600160a01b03169063bfabfe8f9060440160606040518083038186803b1580156113b557600080fd5b505afa1580156113c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ed9190613ed7565b50600154604051630a48b58160e21b81526004810188905260006024820181905293955091935082916001600160a01b0390911690632922d6049060440160206040518083038186803b15801561144357600080fd5b505afa158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b9190613d21565b6114859086613f05565b90505b826114938386613e13565b61149e906001613d50565b101561158b5760015b848111611585576000816114bb8588613e13565b6114c59190613d50565b600154604051630a48b58160e21b8152600481018b9052602481018390529192506000916001600160a01b0390911690632922d6049060440160206040518083038186803b15801561151657600080fd5b505afa15801561152a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154e9190613d21565b9050808410611568576115618185613d7e565b9350611570565b509250611585565b5050808061157d90613f19565b9150506114a7565b50611488565b60015460405163bfabfe8f60e01b815260048101889052602481018490526000916001600160a01b03169063bfabfe8f9060440160606040518083038186803b1580156115d757600080fd5b505afa1580156115eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160f9190613ed7565b9250505061161c816134fc565b9b506116288d8d613527565b1561171c578860000160405180608001604052808e6001600160a01b031681526020016000801b81526020016000815260200160001515815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548160ff021916908315150217905550505088600b015489600001805490501415611717576006805490600061171183613f34565b91905055505b611721565b60009b505b5050505050505050505050919050565b60008281526008602052604090205460078054849290811061175557611755613d68565b600091825260209091206002600590920201015460ff16156117895760405162461bcd60e51b815260040161083b90613ea0565b6000838152600860205260408120546007805490919081106117ad576117ad613d68565b9060005260206000209060050201905080600101548311156118115760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e604482015260640161083b565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb90602401604080518083038186803b15801561185957600080fd5b505afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190613f4b565b915091508142101580156118a457508042105b6118e95760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b604482015260640161083b565b604051631c3db16d60e01b81526004810187905260009086903090631c3db16d9060240160206040518083038186803b15801561192557600080fd5b505afa158015611939573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195d9190613d21565b141561196c57506127106119ec565b61271061138861197c8585613d7e565b6119869190613e13565b6119909190613e48565b61199a8442613d7e565b106119e75760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f73657200604482015260640161083b565b50614e205b835460009085906119ff90600190613d7e565b81548110611a0f57611a0f613d68565b60009182526020822060018054604051637e37c78b60e11b8152600481018e9052600c949094029092019450916001600160a01b039091169063fc6f8f169060240160206040518083038186803b158015611a6957600080fd5b505afa158015611a7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa19190613d21565b611aab9190613d7e565b600089815260078401602052604090205490915060ff1615611b0f5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e0000000000604482015260640161083b565b600154604051632cf6413f60e11b8152600481018b90526000916001600160a01b0316906359ec827e9060240160206040518083038186803b158015611b5457600080fd5b505afa158015611b68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8c9190613d21565b90506000612710611b9d8684613e13565b611ba79190613e48565b611bb19083613d50565b60008b815260068601602052604081205491925090821115611c545760008b81526006860160205260409020543490611bea9084613d7e565b11611c0f5760008b8152600686016020526040902054611c0a9083613d7e565b611c11565b345b604080518d815260208101839052919250339186918f917fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c0910160405180910390a45b33600090815260088601602090815260408083208e845290915281208054839290611c80908490613d50565b909155505060008b815260068601602052604081208054839290611ca5908490613d50565b909155505060008b81526006860160205260409020548211611d4f5760008b815260068601602052604081205460098701805491929091611ce7908490613d50565b9091555050600a8501805460018181018355600092835260208084209092018e90558d8352600788019091526040808320805460ff1916909217909155518c9186918f917fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00991a45b600a85015460011015611f8f57828560090154611d6c9190613d7e565b60098601556001546040516319b8152960e01b8152600481018e90526001600160a01b03909116906319b815299060240160206040518083038186803b158015611db557600080fd5b505afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190613d06565b15611e065760028901805460ff19166001179055611f0f565b885460038a016000611e19876001613d50565b8152602001908152602001600020819055506000896000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538e6040518263ffffffff1660e01b8152600401611e9491815260200190565b60206040518083038186803b158015611eac57600080fd5b505afa158015611ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee49190613d21565b600b82015560038101805460ff1916600117905560068054906000611f0883613f19565b9190505550505b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848e8c600101548d6004016040518563ffffffff1660e01b8152600401611f5c93929190613faa565b6000604051808303818588803b158015611f7557600080fd5b505af1158015611f89573d6000803e3d6000fd5b50505050505b80341115611fbd57336108fc611fa58334613d7e565b6040518115909202916000818181858888f150505050505b505050505050505050505050565b600083815260086020526040812054600780548392908110611fef57611fef613d68565b6000918252602080832087845260036005909302019182019052604082205481549193508391811061202357612023613d68565b90600052602060002090600c0201600001848154811061204557612045613d68565b600091825260208220600154604051639b05c26160e01b815260048082018c905293909302909101935082916001600160a01b0390911690639b05c26190602401604080518083038186803b15801561209d57600080fd5b505afa1580156120b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d59190614062565b6003850154919350915060ff1680156120f8575081836002015414806120f85750805b1561210b57612710945050505050612114565b60009450505050505b9392505050565b6007818154811061212b57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161215e90613f6f565b80601f016020809104026020016040519081016040528092919081815260200182805461218a90613f6f565b80156121d75780601f106121ac576101008083540402835291602001916121d7565b820191906000526020600020905b8154815290600101906020018083116121ba57829003601f168201915b5050505050905083565b60008481526008602052604090205460078054869290811061220557612205613d68565b600091825260209091206002600590920201015460ff16156122395760405162461bcd60e51b815260040161083b90613ea0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a06040518083038186803b15801561227e57600080fd5b505afa158015612292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b69190613dac565b50909350600192506122c6915050565b8160048111156122d8576122d8613c37565b146123355760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b606482015260840161083b565b826123725760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b604482015260640161083b565b60008681526008602052604081205460078054909190811061239657612396613d68565b600091825260208220600590910201805490925082906123b890600190613d7e565b815481106123c8576123c8613d68565b90600052602060002090600c0201905060005b868110156124c65733828989848181106123f7576123f7613d68565b905060200201358154811061240e5761240e613d68565b60009182526020909120600490910201546001600160a01b0316146124755760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015260640161083b565b858289898481811061248957612489613d68565b90506020020135815481106124a0576124a0613d68565b6000918252602090912060016004909202010155806124be81613f19565b9150506123db565b50868690508160050160008282546124de9190613d50565b90915550505050505050505050565b60008060008060008060006007600860008c8152602001908152602001600020548154811061251e5761251e613d68565b600091825260208083208c845260036005909302019182019052604082205481549193508391811061255257612552613d68565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b6000818152600860205260408120546007805483929081106125c9576125c9613d68565b600091825260208220600590910201805490925082906125eb90600190613d7e565b815481106125fb576125fb613d68565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b031633146126465760405162461bcd60e51b815260040161083b9061408e565b6000836001600160a01b0316838360405161266191906140d0565b60006040518083038185875af1925050503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b50509050806126e85760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b604482015260640161083b565b50505050565b60008681526008602052604090205460078054889290811061271257612712613d68565b600091825260209091206002600590920201015460ff16156127465760405162461bcd60e51b815260040161083b90613ea0565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a06040518083038186803b15801561278b57600080fd5b505afa15801561279f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c39190613dac565b50909350600292506127d3915050565b8160048111156127e5576127e5613c37565b146128405760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b606482015260840161083b565b856128825760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b604482015260640161083b565b6000888152600860205260408120546007805490919081106128a6576128a6613d68565b9060005260206000209060050201905080600101548611156129015760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b604482015260640161083b565b8054600090829061291490600190613d7e565b8154811061292457612924613d68565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a06040518083038186803b15801561297a57600080fd5b505afa15801561298e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129b29190613dac565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160c06040518083038186803b158015612a0857600080fd5b505afa158015612a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4091906140ec565b5050505091505060005b8a811015612cee5733848d8d84818110612a6657612a66613d68565b9050602002013581548110612a7d57612a7d613d68565b60009182526020909120600490910201546001600160a01b031614612ae45760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015260640161083b565b811580612b58575089888a604051602001612b0193929190614144565b60405160208183030381529060405280519060200120846000018d8d84818110612b2d57612b2d613d68565b9050602002013581548110612b4457612b44613d68565b906000526020600020906004020160010154145b612bcc576040805162461bcd60e51b81526020600482015260248101919091527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20737562636f7572747320776974682068696464656e20766f7465732e606482015260840161083b565b838c8c83818110612bdf57612bdf613d68565b9050602002013581548110612bf657612bf6613d68565b600091825260209091206003600490920201015460ff1615612c4f5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b604482015260640161083b565b89848d8d84818110612c6357612c63613d68565b9050602002013581548110612c7a57612c7a613d68565b60009182526020909120600260049092020101556001848d8d84818110612ca357612ca3613d68565b9050602002013581548110612cba57612cba613d68565b60009182526020909120600490910201600301805460ff191691151591909117905580612ce681613f19565b915050612a4a565b508a8a9050836004016000828254612d069190613d50565b90915550506000898152600284016020526040812080548c9290612d2b908490613d50565b90915550506001830154891415612d5b57600383015460ff1615612d565760038301805460ff191690555b612dd5565b60018301546000908152600284016020526040808220548b83529120541415612d9e57600383015460ff16612d565760038301805460ff19166001179055612dd5565b60018301546000908152600284016020526040808220548b83529120541115612dd5576001830189905560038301805460ff191690555b88336001600160a01b03168d7fbf654140f91f2e524d875f097947702b44380492730dd1653f5482c0b33e49cd8a604051612e109190614171565b60405180910390a4505050505050505050505050565b6000546001600160a01b03163314612e505760405162461bcd60e51b815260040161083b9061408e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600860205260408120546007805483928392918110612e9857612e98613d68565b60009182526020822060059091020180549092508290612eba90600190613d7e565b81548110612eca57612eca613d68565b60009182526020909120600c909102016001810154600390910154909660ff90911695509350505050565b600154604051339185916001600160a01b03909116907fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c90612f3a9087908790614184565b60405180910390a4505050565b60008060008060006007600860008a81526020019081526020016000205481548110612f7557612f75613d68565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612fa957612fa9613d68565b90600052602060002090600c02016000018781548110612fcb57612fcb613d68565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146130375760405162461bcd60e51b815260040161083b90613e5c565b60078054600181018255600091909152600581027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68981018690557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101906130c2907fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68c018686613771565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f169060240160206040518083038186803b15801561311457600080fd5b505afa158015613128573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061314c9190613d21565b6131569190613d7e565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c9093020191820188905560038201805460ff191690911790558a8452600890925282208490556006805491926131b783613f19565b91905055505050505050505050565b6000838152600860205260408120546007805483929081106131ea576131ea613d68565b6000918252602080832087845260036005909302019182019052604082205481549193508391811061321e5761321e613d68565b90600052602060002090600c0201600001848154811061324057613240613d68565b600091825260209091206004909102016003015460ff169695505050505050565b6000546001600160a01b0316331461328b5760405162461bcd60e51b815260040161083b9061408e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008060055460ff1660028111156132c7576132c7613c37565b14905090565b6000828152600860205260408120546007805483929081106132f1576132f1613d68565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061332557613325613d68565b600091825260208220600154604051639b05c26160e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690639b05c26190602401604080518083038186803b15801561337e57600080fd5b505afa158015613392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133b69190614062565b915091508260040154600014806133e45750801580156133e457506000828152600284016020526040902054155b156133f6576000945050505050613427565b801561340b5750506004015491506134279050565b5060009081526002909101602052604090205491506134279050565b92915050565b6000546001600160a01b031633146134575760405162461bcd60e51b815260040161083b9061408e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051630e39b00f60e11b81524360048201526000916001600160a01b031690631c73601e90602401602060405180830381600087803b1580156134bf57600080fd5b505af11580156134d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f79190613d21565b905090565b600060405160005b601481101561351f5783811a81600c84010153600101613504565b505192915050565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a06040518083038186803b15801561357057600080fd5b505afa158015613584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a89190613dac565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f169060240160206040518083038186803b15801561360257600080fd5b505afa158015613616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061363a9190613d21565b6136449190613d7e565b6040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b15801561368057600080fd5b505afa158015613694573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526136bc91908101906141b3565b5050600154604051631a383be960e31b81526001600160a01b038a811660048301526001600160601b0389166024830152959650600095869550909116925063d1c1df489150604401604080518083038186803b15801561371c57600080fd5b505afa158015613730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137549190613f4b565b90925090506137638382613d50565b909110159695505050505050565b82805461377d90613f6f565b90600052602060002090601f01602090048101928261379f57600085556137e5565b82601f106137b85782800160ff198235161785556137e5565b828001600101855582156137e5579182015b828111156137e55782358255916020019190600101906137ca565b506137f19291506137f5565b5090565b5b808211156137f157600081556001016137f6565b60006020828403121561381c57600080fd5b5035919050565b6001600160a01b038116811461383857600080fd5b50565b6000806000806080858703121561385157600080fd5b84359350602085013561386381613823565b93969395505050506040820135916060013590565b6000806040838503121561388b57600080fd5b50508035926020909101359150565b6000806000606084860312156138af57600080fd5b505081359360208301359350604090920135919050565b60005b838110156138e15781810151838201526020016138c9565b838111156126e85750506000910152565b6000815180845261390a8160208601602086016138c6565b601f01601f19169290920160200192915050565b838152821515602082015260606040820152600061393f60608301846138f2565b95945050505050565b60008083601f84011261395a57600080fd5b50813567ffffffffffffffff81111561397257600080fd5b6020830191508360208260051b850101111561398d57600080fd5b9250929050565b600080600080606085870312156139aa57600080fd5b84359350602085013567ffffffffffffffff8111156139c857600080fd5b6139d487828801613948565b9598909750949560400135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613a2657613a266139e7565b604052919050565b600067ffffffffffffffff831115613a4857613a486139e7565b613a5b601f8401601f19166020016139fd565b9050828152838383011115613a6f57600080fd5b828260208301376000602084830101529392505050565b600080600060608486031215613a9b57600080fd5b8335613aa681613823565b925060208401359150604084013567ffffffffffffffff811115613ac957600080fd5b8401601f81018613613ada57600080fd5b613ae986823560208401613a2e565b9150509250925092565b60008060008060008060a08789031215613b0c57600080fd5b86359550602087013567ffffffffffffffff80821115613b2b57600080fd5b613b378a838b01613948565b909750955060408901359450606089013593506080890135915080821115613b5e57600080fd5b508701601f81018913613b7057600080fd5b613b7f89823560208401613a2e565b9150509295509295509295565b600060208284031215613b9e57600080fd5b813561211481613823565b60008083601f840112613bbb57600080fd5b50813567ffffffffffffffff811115613bd357600080fd5b60208301915083602082850101111561398d57600080fd5b600080600060408486031215613c0057600080fd5b83359250602084013567ffffffffffffffff811115613c1e57600080fd5b613c2a86828701613ba9565b9497909650939450505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613c6f57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600060808688031215613c8d57600080fd5b8535945060208601359350604086013567ffffffffffffffff811115613cb257600080fd5b613cbe88828901613ba9565b96999598509660600135949350505050565b600060208284031215613ce257600080fd5b81516002811061211457600080fd5b80518015158114613d0157600080fd5b919050565b600060208284031215613d1857600080fd5b61211482613cf1565b600060208284031215613d3357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613d6357613d63613d3a565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015613d9057613d90613d3a565b500390565b80516001600160601b0381168114613d0157600080fd5b600080600080600060a08688031215613dc457600080fd5b613dcd86613d95565b94506020860151613ddd81613823565b604087015190945060058110613df257600080fd5b9250613e0060608701613cf1565b9150608086015190509295509295909350565b6000816000190483118215151615613e2d57613e2d613d3a565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613e5757613e57613e32565b500490565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600080600060608486031215613eec57600080fd5b8351925060208401519150604084015190509250925092565b600082613f1457613f14613e32565b500690565b6000600019821415613f2d57613f2d613d3a565b5060010190565b600081613f4357613f43613d3a565b506000190190565b60008060408385031215613f5e57600080fd5b505080516020909101519092909150565b600181811c90821680613f8357607f821691505b60208210811415613fa457634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845481600182811c915080831680613fd857607f831692505b858310811415613ff657634e487b7160e01b85526022600452602485fd5b6060880183905260808801818015614015576001811461402657614051565b60ff19861682528782019650614051565b60008b81526020902060005b8681101561404b57815484820152908501908901614032565b83019750505b50949b9a5050505050505050505050565b6000806040838503121561407557600080fd5b8251915061408560208401613cf1565b90509250929050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600082516140e28184602087016138c6565b9190910192915050565b60008060008060008060c0878903121561410557600080fd5b61410e87613d95565b955061411c60208801613cf1565b945060408701519350606087015192506080870151915060a087015190509295509295509295565b8381526000835161415c8160208501602088016138c6565b60209201918201929092526040019392505050565b60208152600061211460208301846138f2565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60008060008060008060c087890312156141cc57600080fd5b8651955060208088015195506040880151945060608801519350608088015167ffffffffffffffff8082111561420157600080fd5b818a0191508a601f83011261421557600080fd5b815181811115614227576142276139e7565b8060051b91506142388483016139fd565b818152918301840191848101908d84111561425257600080fd5b938501935b8385101561427c578451925061426c83613823565b8282529385019390850190614257565b80975050505050505060a08701519050929550929550929556fea264697066735822122093e1025e8596baad92b8acbc1dfd801832f0c4845d9b926d2b306bac5cf1c9ee64736f6c63430008090033",
  "deployedBytecode": "0x6080604052600436106102045760003560e01c8063796490f911610118578063ba66fde7116100a0578063d605787b1161006f578063d605787b14610638578063da3beb8c14610658578063e349ad3014610479578063e4c0aaf414610678578063f2f4eb261461069857600080fd5b8063ba66fde7146105cd578063be467604146105ed578063c41bda6114610603578063c86ed8921461062357600080fd5b8063a6a7f0eb116100e7578063a6a7f0eb14610504578063a7cc08fe14610524578063b1c9fe6e14610570578063b34bfaa814610597578063b6ede540146105ad57600080fd5b8063796490f9146104795780637c04034e1461048f5780638e426460146104af5780639b05c261146104cf57600080fd5b80633b3041471161019b5780635c92e2f61161016a5780635c92e2f6146103b65780635e4a627d146103d657806369f3f041146103ec5780636d4cd8ea14610439578063751accd01461045957600080fd5b80633b304147146103345780634b2f0ea0146103545780634fe264fb14610367578063564a565d1461038757600080fd5b80630c340a24116101d75780630c340a241461028f5780631200aabc146102c75780631c3db16d146102f4578063362c34791461031457600080fd5b8063023d44df1461020957806303432744146102325780630b274f2e146102485780630baa64d11461025f575b600080fd5b34801561021557600080fd5b5061021f60035481565b6040519081526020015b60405180910390f35b34801561023e57600080fd5b5061021f60065481565b34801561025457600080fd5b5061025d6106b8565b005b34801561026b57600080fd5b5061027f61027a36600461380a565b610c8a565b6040519015158152602001610229565b34801561029b57600080fd5b506000546102af906001600160a01b031681565b6040516001600160a01b039091168152602001610229565b3480156102d357600080fd5b5061021f6102e236600461380a565b60086020526000908152604090205481565b34801561030057600080fd5b5061021f61030f36600461380a565b610d01565b34801561032057600080fd5b5061021f61032f36600461383b565b610d8b565b34801561034057600080fd5b506102af61034f36600461380a565b611179565b61025d610362366004613878565b611731565b34801561037357600080fd5b5061021f61038236600461389a565b611fcb565b34801561039357600080fd5b506103a76103a236600461380a565b61211b565b6040516102299392919061391e565b3480156103c257600080fd5b5061025d6103d1366004613994565b6121e1565b3480156103e257600080fd5b5061021f60045481565b3480156103f857600080fd5b5061040c61040736600461389a565b6124ed565b604080519687529415156020870152938501929092526060840152608083015260a082015260c001610229565b34801561044557600080fd5b5061027f61045436600461380a565b6125a5565b34801561046557600080fd5b5061025d610474366004613a86565b61261c565b34801561048557600080fd5b5061021f61271081565b34801561049b57600080fd5b5061025d6104aa366004613af3565b6126ee565b3480156104bb57600080fd5b5061025d6104ca366004613b8c565b612e26565b3480156104db57600080fd5b506104ef6104ea36600461380a565b612e72565b60408051928352901515602083015201610229565b34801561051057600080fd5b5061025d61051f366004613beb565b612ef5565b34801561053057600080fd5b5061054461053f36600461389a565b612f47565b604080516001600160a01b03909516855260208501939093529183015215156060820152608001610229565b34801561057c57600080fd5b5060055461058a9060ff1681565b6040516102299190613c4d565b3480156105a357600080fd5b5061021f614e2081565b3480156105b957600080fd5b5061025d6105c8366004613c75565b61300d565b3480156105d957600080fd5b5061027f6105e836600461389a565b6131c6565b3480156105f957600080fd5b5061021f61138881565b34801561060f57600080fd5b5061025d61061e366004613b8c565b613261565b34801561062f57600080fd5b5061027f6132ad565b34801561064457600080fd5b506002546102af906001600160a01b031681565b34801561066457600080fd5b5061021f610673366004613878565b6132cd565b34801561068457600080fd5b5061025d610693366004613b8c565b61342d565b3480156106a457600080fd5b506001546102af906001600160a01b031681565b600154604080516358e4ff3760e11b815290516000926001600160a01b03169163b1c9fe6e916004808301926020929190829003018186803b1580156106fd57600080fd5b505afa158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190613cd0565b600181111561074657610746613c37565b14806107d35750600160009054906101000a90046001600160a01b03166001600160a01b031663b70c4e946040518163ffffffff1660e01b815260040160206040518083038186803b15801561079b57600080fd5b505afa1580156107af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d39190613d06565b1561085e57600060055460ff1660028111156107f1576107f1613c37565b14156108445760405162461bcd60e51b815260206004820152601a60248201527f416c726561647920696e205265736f6c76696e6720706861736500000000000060448201526064015b60405180910390fd5b600580546000919060ff19166001835b0217905550610c49565b60018060009054906101000a90046001600160a01b03166001600160a01b031663b1c9fe6e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108ad57600080fd5b505afa1580156108c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e59190613cd0565b60018111156108f6576108f6613c37565b1415610c4957600060055460ff16600281111561091557610915613c37565b1415610ac45760006006541161096d5760405162461bcd60e51b815260206004820152601c60248201527f416c6c207468652064697370757465732068617665206a75726f727300000000604482015260640161083b565b600160009054906101000a90046001600160a01b03166001600160a01b0316633a1578606040518163ffffffff1660e01b815260040160206040518083038186803b1580156109bb57600080fd5b505afa1580156109cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f39190613d21565b6109fe906014613d50565b431015610a4d5760405162461bcd60e51b815260206004820152601e60248201527f546f6f20736f6f6e3a204c312066696e616c6974792072657175697265640000604482015260640161083b565b4360038190556002546040516303dce1a760e51b815260048101929092526001600160a01b031690637b9c34e090602401600060405180830381600087803b158015610a9857600080fd5b505af1158015610aac573d6000803e3d6000fd5b5050600580546001935090915060ff19168280610854565b600160055460ff166002811115610add57610add613c37565b1415610bcf5760025460035460405163ca4742f160e01b81526001600160a01b039092169163ca4742f191610b189160040190815260200190565b602060405180830381600087803b158015610b3257600080fd5b505af1158015610b46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6a9190613d21565b6004819055610bbb5760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f74207265616479207965740000604482015260640161083b565b600580546002919060ff1916600183610854565b600260055460ff166002811115610be857610be8613c37565b1415610c495760065415610c3e5760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420726561647920666f72205265736f6c76696e67207068617365000000604482015260640161083b565b6005805460ff191690555b6005546040517fdeeacb313775e12b099f27fe481aa82204a1806233e7125cc8a9f719e5ddfdc591610c809160ff90911690613c4d565b60405180910390a1565b600081815260086020526040812054600780548392908110610cae57610cae613d68565b60009182526020822060059091020180549092508290610cd090600190613d7e565b81548110610ce057610ce0613d68565b60009182526020909120600c90910201805460059091015414949350505050565b600081815260086020526040812054600780548392908110610d2557610d25613d68565b60009182526020822060059091020180549092508290610d4790600190613d7e565b81548110610d5757610d57613d68565b60009182526020909120600c90910201600381015490915060ff16610d80578060010154610d83565b60005b949350505050565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a06040518083038186803b158015610dd457600080fd5b505afa158015610de8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0c9190613dac565b50935050505080610e5f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e0000000000604482015260640161083b565b600086815260086020526040812054600780549091908110610e8357610e83613d68565b60009182526020808320888452600360059093020191820190526040822054815491935083918110610eb757610eb7613d68565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d9060240160206040518083038186803b158015610f0d57600080fd5b505afa158015610f21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f459190613d21565b600087815260078401602052604090205490915060ff16610f8d576001600160a01b0388166000908152600883016020908152604080832089845290915290205494506110d3565b80861415611003576000868152600683016020526040902054610fb1576000610ffc565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610ff29190613e13565b610ffc9190613e48565b94506110d3565b600081815260078301602052604090205460ff166110d35781600601600083600a0160018154811061103757611037613d68565b906000526020600020015481526020019081526020016000205482600601600084600a0160008154811061106d5761106d613d68565b90600052602060002001548152602001908152602001600020546110919190613d50565b60098301546001600160a01b038a16600090815260088501602090815260408083208b84529091529020546110c69190613e13565b6110d09190613e48565b94505b6001600160a01b03881660009081526008830160209081526040808320898452909152812055841561116d576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b6001546000906001600160a01b031633146111a65760405162461bcd60e51b815260040161083b90613e5c565b6000828152600860205260409020546007805484929081106111ca576111ca613d68565b600091825260209091206002600590920201015460ff16156111fe5760405162461bcd60e51b815260040161083b90613ea0565b600260055460ff16600281111561121757611217613c37565b146112645760405162461bcd60e51b815260206004820152601a60248201527f53686f756c6420626520696e2064726177696e67207068617365000000000000604482015260640161083b565b60008381526008602052604081205460078054909190811061128857611288613d68565b600091825260208220600590910201805490925082906112aa90600190613d7e565b815481106112ba576112ba613d68565b60009182526020822060015460405163564a565d60e01b8152600481018a9052600c9390930290910193506001600160a01b03169063564a565d9060240160a06040518083038186803b15801561131057600080fd5b505afa158015611324573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113489190613dac565b50929350506001600160601b038316915060009050611365613479565b60015460405163bfabfe8f60e01b81526004810185905260006024820181905292935082916001600160a01b03169063bfabfe8f9060440160606040518083038186803b1580156113b557600080fd5b505afa1580156113c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ed9190613ed7565b50600154604051630a48b58160e21b81526004810188905260006024820181905293955091935082916001600160a01b0390911690632922d6049060440160206040518083038186803b15801561144357600080fd5b505afa158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b9190613d21565b6114859086613f05565b90505b826114938386613e13565b61149e906001613d50565b101561158b5760015b848111611585576000816114bb8588613e13565b6114c59190613d50565b600154604051630a48b58160e21b8152600481018b9052602481018390529192506000916001600160a01b0390911690632922d6049060440160206040518083038186803b15801561151657600080fd5b505afa15801561152a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154e9190613d21565b9050808410611568576115618185613d7e565b9350611570565b509250611585565b5050808061157d90613f19565b9150506114a7565b50611488565b60015460405163bfabfe8f60e01b815260048101889052602481018490526000916001600160a01b03169063bfabfe8f9060440160606040518083038186803b1580156115d757600080fd5b505afa1580156115eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160f9190613ed7565b9250505061161c816134fc565b9b506116288d8d613527565b1561171c578860000160405180608001604052808e6001600160a01b031681526020016000801b81526020016000815260200160001515815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548160ff021916908315150217905550505088600b015489600001805490501415611717576006805490600061171183613f34565b91905055505b611721565b60009b505b5050505050505050505050919050565b60008281526008602052604090205460078054849290811061175557611755613d68565b600091825260209091206002600590920201015460ff16156117895760405162461bcd60e51b815260040161083b90613ea0565b6000838152600860205260408120546007805490919081106117ad576117ad613d68565b9060005260206000209060050201905080600101548311156118115760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e604482015260640161083b565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb90602401604080518083038186803b15801561185957600080fd5b505afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190613f4b565b915091508142101580156118a457508042105b6118e95760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b604482015260640161083b565b604051631c3db16d60e01b81526004810187905260009086903090631c3db16d9060240160206040518083038186803b15801561192557600080fd5b505afa158015611939573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195d9190613d21565b141561196c57506127106119ec565b61271061138861197c8585613d7e565b6119869190613e13565b6119909190613e48565b61199a8442613d7e565b106119e75760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f73657200604482015260640161083b565b50614e205b835460009085906119ff90600190613d7e565b81548110611a0f57611a0f613d68565b60009182526020822060018054604051637e37c78b60e11b8152600481018e9052600c949094029092019450916001600160a01b039091169063fc6f8f169060240160206040518083038186803b158015611a6957600080fd5b505afa158015611a7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa19190613d21565b611aab9190613d7e565b600089815260078401602052604090205490915060ff1615611b0f5760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e0000000000604482015260640161083b565b600154604051632cf6413f60e11b8152600481018b90526000916001600160a01b0316906359ec827e9060240160206040518083038186803b158015611b5457600080fd5b505afa158015611b68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8c9190613d21565b90506000612710611b9d8684613e13565b611ba79190613e48565b611bb19083613d50565b60008b815260068601602052604081205491925090821115611c545760008b81526006860160205260409020543490611bea9084613d7e565b11611c0f5760008b8152600686016020526040902054611c0a9083613d7e565b611c11565b345b604080518d815260208101839052919250339186918f917fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c0910160405180910390a45b33600090815260088601602090815260408083208e845290915281208054839290611c80908490613d50565b909155505060008b815260068601602052604081208054839290611ca5908490613d50565b909155505060008b81526006860160205260409020548211611d4f5760008b815260068601602052604081205460098701805491929091611ce7908490613d50565b9091555050600a8501805460018181018355600092835260208084209092018e90558d8352600788019091526040808320805460ff1916909217909155518c9186918f917fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00991a45b600a85015460011015611f8f57828560090154611d6c9190613d7e565b60098601556001546040516319b8152960e01b8152600481018e90526001600160a01b03909116906319b815299060240160206040518083038186803b158015611db557600080fd5b505afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190613d06565b15611e065760028901805460ff19166001179055611f0f565b885460038a016000611e19876001613d50565b8152602001908152602001600020819055506000896000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538e6040518263ffffffff1660e01b8152600401611e9491815260200190565b60206040518083038186803b158015611eac57600080fd5b505afa158015611ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee49190613d21565b600b82015560038101805460ff1916600117905560068054906000611f0883613f19565b9190505550505b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848e8c600101548d6004016040518563ffffffff1660e01b8152600401611f5c93929190613faa565b6000604051808303818588803b158015611f7557600080fd5b505af1158015611f89573d6000803e3d6000fd5b50505050505b80341115611fbd57336108fc611fa58334613d7e565b6040518115909202916000818181858888f150505050505b505050505050505050505050565b600083815260086020526040812054600780548392908110611fef57611fef613d68565b6000918252602080832087845260036005909302019182019052604082205481549193508391811061202357612023613d68565b90600052602060002090600c0201600001848154811061204557612045613d68565b600091825260208220600154604051639b05c26160e01b815260048082018c905293909302909101935082916001600160a01b0390911690639b05c26190602401604080518083038186803b15801561209d57600080fd5b505afa1580156120b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d59190614062565b6003850154919350915060ff1680156120f8575081836002015414806120f85750805b1561210b57612710945050505050612114565b60009450505050505b9392505050565b6007818154811061212b57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161215e90613f6f565b80601f016020809104026020016040519081016040528092919081815260200182805461218a90613f6f565b80156121d75780601f106121ac576101008083540402835291602001916121d7565b820191906000526020600020905b8154815290600101906020018083116121ba57829003601f168201915b5050505050905083565b60008481526008602052604090205460078054869290811061220557612205613d68565b600091825260209091206002600590920201015460ff16156122395760405162461bcd60e51b815260040161083b90613ea0565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a06040518083038186803b15801561227e57600080fd5b505afa158015612292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b69190613dac565b50909350600192506122c6915050565b8160048111156122d8576122d8613c37565b146123355760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b606482015260840161083b565b826123725760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b604482015260640161083b565b60008681526008602052604081205460078054909190811061239657612396613d68565b600091825260208220600590910201805490925082906123b890600190613d7e565b815481106123c8576123c8613d68565b90600052602060002090600c0201905060005b868110156124c65733828989848181106123f7576123f7613d68565b905060200201358154811061240e5761240e613d68565b60009182526020909120600490910201546001600160a01b0316146124755760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015260640161083b565b858289898481811061248957612489613d68565b90506020020135815481106124a0576124a0613d68565b6000918252602090912060016004909202010155806124be81613f19565b9150506123db565b50868690508160050160008282546124de9190613d50565b90915550505050505050505050565b60008060008060008060006007600860008c8152602001908152602001600020548154811061251e5761251e613d68565b600091825260208083208c845260036005909302019182019052604082205481549193508391811061255257612552613d68565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b6000818152600860205260408120546007805483929081106125c9576125c9613d68565b600091825260208220600590910201805490925082906125eb90600190613d7e565b815481106125fb576125fb613d68565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b031633146126465760405162461bcd60e51b815260040161083b9061408e565b6000836001600160a01b0316838360405161266191906140d0565b60006040518083038185875af1925050503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b50509050806126e85760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b604482015260640161083b565b50505050565b60008681526008602052604090205460078054889290811061271257612712613d68565b600091825260209091206002600590920201015460ff16156127465760405162461bcd60e51b815260040161083b90613ea0565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a06040518083038186803b15801561278b57600080fd5b505afa15801561279f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c39190613dac565b50909350600292506127d3915050565b8160048111156127e5576127e5613c37565b146128405760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b606482015260840161083b565b856128825760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b604482015260640161083b565b6000888152600860205260408120546007805490919081106128a6576128a6613d68565b9060005260206000209060050201905080600101548611156129015760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b604482015260640161083b565b8054600090829061291490600190613d7e565b8154811061292457612924613d68565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a06040518083038186803b15801561297a57600080fd5b505afa15801561298e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129b29190613dac565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160c06040518083038186803b158015612a0857600080fd5b505afa158015612a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4091906140ec565b5050505091505060005b8a811015612cee5733848d8d84818110612a6657612a66613d68565b9050602002013581548110612a7d57612a7d613d68565b60009182526020909120600490910201546001600160a01b031614612ae45760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015260640161083b565b811580612b58575089888a604051602001612b0193929190614144565b60405160208183030381529060405280519060200120846000018d8d84818110612b2d57612b2d613d68565b9050602002013581548110612b4457612b44613d68565b906000526020600020906004020160010154145b612bcc576040805162461bcd60e51b81526020600482015260248101919091527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20737562636f7572747320776974682068696464656e20766f7465732e606482015260840161083b565b838c8c83818110612bdf57612bdf613d68565b9050602002013581548110612bf657612bf6613d68565b600091825260209091206003600490920201015460ff1615612c4f5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b604482015260640161083b565b89848d8d84818110612c6357612c63613d68565b9050602002013581548110612c7a57612c7a613d68565b60009182526020909120600260049092020101556001848d8d84818110612ca357612ca3613d68565b9050602002013581548110612cba57612cba613d68565b60009182526020909120600490910201600301805460ff191691151591909117905580612ce681613f19565b915050612a4a565b508a8a9050836004016000828254612d069190613d50565b90915550506000898152600284016020526040812080548c9290612d2b908490613d50565b90915550506001830154891415612d5b57600383015460ff1615612d565760038301805460ff191690555b612dd5565b60018301546000908152600284016020526040808220548b83529120541415612d9e57600383015460ff16612d565760038301805460ff19166001179055612dd5565b60018301546000908152600284016020526040808220548b83529120541115612dd5576001830189905560038301805460ff191690555b88336001600160a01b03168d7fbf654140f91f2e524d875f097947702b44380492730dd1653f5482c0b33e49cd8a604051612e109190614171565b60405180910390a4505050505050505050505050565b6000546001600160a01b03163314612e505760405162461bcd60e51b815260040161083b9061408e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600860205260408120546007805483928392918110612e9857612e98613d68565b60009182526020822060059091020180549092508290612eba90600190613d7e565b81548110612eca57612eca613d68565b60009182526020909120600c909102016001810154600390910154909660ff90911695509350505050565b600154604051339185916001600160a01b03909116907fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c90612f3a9087908790614184565b60405180910390a4505050565b60008060008060006007600860008a81526020019081526020016000205481548110612f7557612f75613d68565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612fa957612fa9613d68565b90600052602060002090600c02016000018781548110612fcb57612fcb613d68565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146130375760405162461bcd60e51b815260040161083b90613e5c565b60078054600181018255600091909152600581027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68981018690557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101906130c2907fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68c018686613771565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f169060240160206040518083038186803b15801561311457600080fd5b505afa158015613128573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061314c9190613d21565b6131569190613d7e565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c9093020191820188905560038201805460ff191690911790558a8452600890925282208490556006805491926131b783613f19565b91905055505050505050505050565b6000838152600860205260408120546007805483929081106131ea576131ea613d68565b6000918252602080832087845260036005909302019182019052604082205481549193508391811061321e5761321e613d68565b90600052602060002090600c0201600001848154811061324057613240613d68565b600091825260209091206004909102016003015460ff169695505050505050565b6000546001600160a01b0316331461328b5760405162461bcd60e51b815260040161083b9061408e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008060055460ff1660028111156132c7576132c7613c37565b14905090565b6000828152600860205260408120546007805483929081106132f1576132f1613d68565b6000918252602080832086845260036005909302019182019052604082205481549193508391811061332557613325613d68565b600091825260208220600154604051639b05c26160e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690639b05c26190602401604080518083038186803b15801561337e57600080fd5b505afa158015613392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133b69190614062565b915091508260040154600014806133e45750801580156133e457506000828152600284016020526040902054155b156133f6576000945050505050613427565b801561340b5750506004015491506134279050565b5060009081526002909101602052604090205491506134279050565b92915050565b6000546001600160a01b031633146134575760405162461bcd60e51b815260040161083b9061408e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051630e39b00f60e11b81524360048201526000916001600160a01b031690631c73601e90602401602060405180830381600087803b1580156134bf57600080fd5b505af11580156134d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f79190613d21565b905090565b600060405160005b601481101561351f5783811a81600c84010153600101613504565b505192915050565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a06040518083038186803b15801561357057600080fd5b505afa158015613584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a89190613dac565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f169060240160206040518083038186803b15801561360257600080fd5b505afa158015613616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061363a9190613d21565b6136449190613d7e565b6040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b15801561368057600080fd5b505afa158015613694573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526136bc91908101906141b3565b5050600154604051631a383be960e31b81526001600160a01b038a811660048301526001600160601b0389166024830152959650600095869550909116925063d1c1df489150604401604080518083038186803b15801561371c57600080fd5b505afa158015613730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137549190613f4b565b90925090506137638382613d50565b909110159695505050505050565b82805461377d90613f6f565b90600052602060002090601f01602090048101928261379f57600085556137e5565b82601f106137b85782800160ff198235161785556137e5565b828001600101855582156137e5579182015b828111156137e55782358255916020019190600101906137ca565b506137f19291506137f5565b5090565b5b808211156137f157600081556001016137f6565b60006020828403121561381c57600080fd5b5035919050565b6001600160a01b038116811461383857600080fd5b50565b6000806000806080858703121561385157600080fd5b84359350602085013561386381613823565b93969395505050506040820135916060013590565b6000806040838503121561388b57600080fd5b50508035926020909101359150565b6000806000606084860312156138af57600080fd5b505081359360208301359350604090920135919050565b60005b838110156138e15781810151838201526020016138c9565b838111156126e85750506000910152565b6000815180845261390a8160208601602086016138c6565b601f01601f19169290920160200192915050565b838152821515602082015260606040820152600061393f60608301846138f2565b95945050505050565b60008083601f84011261395a57600080fd5b50813567ffffffffffffffff81111561397257600080fd5b6020830191508360208260051b850101111561398d57600080fd5b9250929050565b600080600080606085870312156139aa57600080fd5b84359350602085013567ffffffffffffffff8111156139c857600080fd5b6139d487828801613948565b9598909750949560400135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613a2657613a266139e7565b604052919050565b600067ffffffffffffffff831115613a4857613a486139e7565b613a5b601f8401601f19166020016139fd565b9050828152838383011115613a6f57600080fd5b828260208301376000602084830101529392505050565b600080600060608486031215613a9b57600080fd5b8335613aa681613823565b925060208401359150604084013567ffffffffffffffff811115613ac957600080fd5b8401601f81018613613ada57600080fd5b613ae986823560208401613a2e565b9150509250925092565b60008060008060008060a08789031215613b0c57600080fd5b86359550602087013567ffffffffffffffff80821115613b2b57600080fd5b613b378a838b01613948565b909750955060408901359450606089013593506080890135915080821115613b5e57600080fd5b508701601f81018913613b7057600080fd5b613b7f89823560208401613a2e565b9150509295509295509295565b600060208284031215613b9e57600080fd5b813561211481613823565b60008083601f840112613bbb57600080fd5b50813567ffffffffffffffff811115613bd357600080fd5b60208301915083602082850101111561398d57600080fd5b600080600060408486031215613c0057600080fd5b83359250602084013567ffffffffffffffff811115613c1e57600080fd5b613c2a86828701613ba9565b9497909650939450505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613c6f57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600060808688031215613c8d57600080fd5b8535945060208601359350604086013567ffffffffffffffff811115613cb257600080fd5b613cbe88828901613ba9565b96999598509660600135949350505050565b600060208284031215613ce257600080fd5b81516002811061211457600080fd5b80518015158114613d0157600080fd5b919050565b600060208284031215613d1857600080fd5b61211482613cf1565b600060208284031215613d3357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613d6357613d63613d3a565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015613d9057613d90613d3a565b500390565b80516001600160601b0381168114613d0157600080fd5b600080600080600060a08688031215613dc457600080fd5b613dcd86613d95565b94506020860151613ddd81613823565b604087015190945060058110613df257600080fd5b9250613e0060608701613cf1565b9150608086015190509295509295909350565b6000816000190483118215151615613e2d57613e2d613d3a565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613e5757613e57613e32565b500490565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600080600060608486031215613eec57600080fd5b8351925060208401519150604084015190509250925092565b600082613f1457613f14613e32565b500690565b6000600019821415613f2d57613f2d613d3a565b5060010190565b600081613f4357613f43613d3a565b506000190190565b60008060408385031215613f5e57600080fd5b505080516020909101519092909150565b600181811c90821680613f8357607f821691505b60208210811415613fa457634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845481600182811c915080831680613fd857607f831692505b858310811415613ff657634e487b7160e01b85526022600452602485fd5b6060880183905260808801818015614015576001811461402657614051565b60ff19861682528782019650614051565b60008b81526020902060005b8681101561404b57815484820152908501908901614032565b83019750505b50949b9a5050505050505050505050565b6000806040838503121561407557600080fd5b8251915061408560208401613cf1565b90509250929050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600082516140e28184602087016138c6565b9190910192915050565b60008060008060008060c0878903121561410557600080fd5b61410e87613d95565b955061411c60208801613cf1565b945060408701519350606087015192506080870151915060a087015190509295509295509295565b8381526000835161415c8160208501602088016138c6565b60209201918201929092526040019392505050565b60208152600061211460208301846138f2565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60008060008060008060c087890312156141cc57600080fd5b8651955060208088015195506040880151945060608801519350608088015167ffffffffffffffff8082111561420157600080fd5b818a0191508a601f83011261421557600080fd5b815181811115614227576142276139e7565b8060051b91506142388483016139fd565b818152918301840191848101908d84111561425257600080fd5b938501935b8385101561427c578451925061426c83613823565b8282529385019390850190614257565b80975050505050505060a08701519050929550929550929556fea264697066735822122093e1025e8596baad92b8acbc1dfd801832f0c4845d9b926d2b306bac5cf1c9ee64736f6c63430008090033",
  "devdoc": {
    "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."
        }
      },
      "changeRandomNumberGenerator(address)": {
        "details": "Changes the `_rng` storage variable.",
        "params": {
          "_rng": "The new value for the `RNGenerator` storage variable."
        }
      },
      "constructor": {
        "details": "Constructor.",
        "params": {
          "_core": "The KlerosCore arbitrator.",
          "_governor": "The governor's address.",
          "_rng": "The random number generator."
        }
      },
      "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": {
          "ruling": "The current ruling."
        }
      },
      "draw(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."
        },
        "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."
        }
      },
      "getLastRoundResult(uint256)": {
        "details": "Returns the voting data from the most relevant round.",
        "params": {
          "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit."
        },
        "returns": {
          "tied": "Whether it's a tie or not.",
          "winningChoice": "The winning choice of this round."
        }
      },
      "isResolving()": {
        "details": "Returns true if the dispute kit is ready to Resolve, regardless of the number of disputes without jurors.",
        "returns": {
          "_0": "Whether the dispute kit is ready to resolve, regardless of the number of disputes without jurors."
        }
      },
      "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."
        }
      },
      "passPhase()": {
        "details": "Passes the phase."
      },
      "submitEvidence(uint256,string)": {
        "details": "Submits evidence.",
        "params": {
          "_evidence": "IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.",
          "_evidenceGroupID": "Unique identifier of the evidence group the evidence belongs to. It's the submitter responsability to submit the right evidence group ID."
        }
      },
      "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."
        }
      }
    },
    "stateVariables": {
      "disputesWithoutJurors": {
        "details": "Returns the number of disputes without jurors in the dispute kit.",
        "return": "The number of disputes without jurors in the dispute kit.",
        "returns": {
          "_0": "The number of disputes without jurors in the dispute kit."
        }
      }
    },
    "title": "DisputeKitClassic  Dispute kit implementation of the Kleros v1 features including:  - a drawing system: proportional to staked PNK,  - a vote aggreation system: plurality,  - an incentive system: equal split between coherent votes,  - an appeal system: fund 2 choices only, vote on any choice.",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 6201,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "governor",
        "offset": 0,
        "slot": "0",
        "type": "t_address"
      },
      {
        "astId": 6204,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "core",
        "offset": 0,
        "slot": "1",
        "type": "t_contract(KlerosCore)5813"
      },
      {
        "astId": 6378,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "rng",
        "offset": 0,
        "slot": "2",
        "type": "t_contract(RNG)24354"
      },
      {
        "astId": 6380,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "RNBlock",
        "offset": 0,
        "slot": "3",
        "type": "t_uint256"
      },
      {
        "astId": 6382,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "RN",
        "offset": 0,
        "slot": "4",
        "type": "t_uint256"
      },
      {
        "astId": 6385,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "phase",
        "offset": 0,
        "slot": "5",
        "type": "t_enum(Phase)6301"
      },
      {
        "astId": 6387,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "disputesWithoutJurors",
        "offset": 0,
        "slot": "6",
        "type": "t_uint256"
      },
      {
        "astId": 6391,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "disputes",
        "offset": 0,
        "slot": "7",
        "type": "t_array(t_struct(Dispute)6316_storage)dyn_storage"
      },
      {
        "astId": 6395,
        "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
        "label": "coreDisputeIDToLocal",
        "offset": 0,
        "slot": "8",
        "type": "t_mapping(t_uint256,t_uint256)"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_struct(Dispute)6316_storage)dyn_storage": {
        "base": "t_struct(Dispute)6316_storage",
        "encoding": "dynamic_array",
        "label": "struct DisputeKitClassic.Dispute[]",
        "numberOfBytes": "32"
      },
      "t_array(t_struct(Round)6354_storage)dyn_storage": {
        "base": "t_struct(Round)6354_storage",
        "encoding": "dynamic_array",
        "label": "struct DisputeKitClassic.Round[]",
        "numberOfBytes": "32"
      },
      "t_array(t_struct(Vote)6363_storage)dyn_storage": {
        "base": "t_struct(Vote)6363_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)5813": {
        "encoding": "inplace",
        "label": "contract KlerosCore",
        "numberOfBytes": "20"
      },
      "t_contract(RNG)24354": {
        "encoding": "inplace",
        "label": "contract RNG",
        "numberOfBytes": "20"
      },
      "t_enum(Phase)6301": {
        "encoding": "inplace",
        "label": "enum DisputeKitClassic.Phase",
        "numberOfBytes": "1"
      },
      "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)6316_storage": {
        "encoding": "inplace",
        "label": "struct DisputeKitClassic.Dispute",
        "members": [
          {
            "astId": 6305,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "rounds",
            "offset": 0,
            "slot": "0",
            "type": "t_array(t_struct(Round)6354_storage)dyn_storage"
          },
          {
            "astId": 6307,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "numberOfChoices",
            "offset": 0,
            "slot": "1",
            "type": "t_uint256"
          },
          {
            "astId": 6309,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "jumped",
            "offset": 0,
            "slot": "2",
            "type": "t_bool"
          },
          {
            "astId": 6313,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "coreRoundIDToLocal",
            "offset": 0,
            "slot": "3",
            "type": "t_mapping(t_uint256,t_uint256)"
          },
          {
            "astId": 6315,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "extraData",
            "offset": 0,
            "slot": "4",
            "type": "t_bytes_storage"
          }
        ],
        "numberOfBytes": "160"
      },
      "t_struct(Round)6354_storage": {
        "encoding": "inplace",
        "label": "struct DisputeKitClassic.Round",
        "members": [
          {
            "astId": 6320,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "votes",
            "offset": 0,
            "slot": "0",
            "type": "t_array(t_struct(Vote)6363_storage)dyn_storage"
          },
          {
            "astId": 6322,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "winningChoice",
            "offset": 0,
            "slot": "1",
            "type": "t_uint256"
          },
          {
            "astId": 6326,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "counts",
            "offset": 0,
            "slot": "2",
            "type": "t_mapping(t_uint256,t_uint256)"
          },
          {
            "astId": 6328,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "tied",
            "offset": 0,
            "slot": "3",
            "type": "t_bool"
          },
          {
            "astId": 6330,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "totalVoted",
            "offset": 0,
            "slot": "4",
            "type": "t_uint256"
          },
          {
            "astId": 6332,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "totalCommitted",
            "offset": 0,
            "slot": "5",
            "type": "t_uint256"
          },
          {
            "astId": 6336,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "paidFees",
            "offset": 0,
            "slot": "6",
            "type": "t_mapping(t_uint256,t_uint256)"
          },
          {
            "astId": 6340,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "hasPaid",
            "offset": 0,
            "slot": "7",
            "type": "t_mapping(t_uint256,t_bool)"
          },
          {
            "astId": 6346,
            "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": 6348,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "feeRewards",
            "offset": 0,
            "slot": "9",
            "type": "t_uint256"
          },
          {
            "astId": 6351,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "fundedChoices",
            "offset": 0,
            "slot": "10",
            "type": "t_array(t_uint256)dyn_storage"
          },
          {
            "astId": 6353,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "nbVotes",
            "offset": 0,
            "slot": "11",
            "type": "t_uint256"
          }
        ],
        "numberOfBytes": "384"
      },
      "t_struct(Vote)6363_storage": {
        "encoding": "inplace",
        "label": "struct DisputeKitClassic.Vote",
        "members": [
          {
            "astId": 6356,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "account",
            "offset": 0,
            "slot": "0",
            "type": "t_address"
          },
          {
            "astId": 6358,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "commit",
            "offset": 0,
            "slot": "1",
            "type": "t_bytes32"
          },
          {
            "astId": 6360,
            "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic",
            "label": "choice",
            "offset": 0,
            "slot": "2",
            "type": "t_uint256"
          },
          {
            "astId": 6362,
            "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"
      }
    }
  }
}