diff --git a/contracts/README.md b/contracts/README.md index 9ce2ab2cf..2b09dc629 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -14,9 +14,11 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [ChainlinkRNG](https://arbiscan.io/address/0x897d83a7d5F23555eFA15e1BE297d5503522cbA3) - [DisputeKitClassicNeo: proxy](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421), [implementation](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) - [DisputeResolverNeo](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) +- [DisputeResolverRulerNeo](https://arbiscan.io/address/0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140) - [DisputeTemplateRegistry: proxy](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2), [implementation](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) - [EvidenceModule: proxy](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3), [implementation](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) - [KlerosCoreNeo: proxy](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea), [implementation](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) +- [KlerosCoreRulerNeo: proxy](https://arbiscan.io/address/0xc0169e0B19aE02ac4fADD689260CF038726DFE13), [implementation](https://arbiscan.io/address/0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324) - [KlerosV2NeoEarlyUser](https://arbiscan.io/address/0xfE34a72c55e512601E7d491A9c5b36373cE34d63) - [Pinakion](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) - [PolicyRegistry: proxy](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c), [implementation](https://arbiscan.io/address/0x15E5964C7751dF8563eA4bC000301582C79BC454) diff --git a/contracts/deployments/arbitrum/DisputeResolverRulerNeo.json b/contracts/deployments/arbitrum/DisputeResolverRulerNeo.json new file mode 100644 index 000000000..b5d45949a --- /dev/null +++ b/contracts/deployments/arbitrum/DisputeResolverRulerNeo.json @@ -0,0 +1,522 @@ +{ + "address": "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IArbitratorV2", + "name": "_arbitrator", + "type": "address" + }, + { + "internalType": "contract IDisputeTemplateRegistry", + "name": "_templateRegistry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitratorV2", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_arbitratorDisputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_externalDisputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_templateId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "_templateUri", + "type": "string" + } + ], + "name": "DisputeRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitratorV2", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "inputs": [], + "name": "arbitrator", + "outputs": [ + { + "internalType": "contract IArbitratorV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "arbitratorDisputeIDToLocalID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitratorV2", + "name": "_arbitrator", + "type": "address" + } + ], + "name": "changeArbitrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDisputeTemplateRegistry", + "name": "_templateRegistry", + "type": "address" + } + ], + "name": "changeTemplateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_arbitratorExtraData", + "type": "bytes" + }, + { + "internalType": "string", + "name": "_disputeTemplate", + "type": "string" + }, + { + "internalType": "string", + "name": "_disputeTemplateDataMappings", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_numberOfRulingOptions", + "type": "uint256" + } + ], + "name": "createDisputeForTemplate", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_arbitratorExtraData", + "type": "bytes" + }, + { + "internalType": "string", + "name": "_disputeTemplateUri", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_numberOfRulingOptions", + "type": "uint256" + } + ], + "name": "createDisputeForTemplateUri", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "bytes", + "name": "arbitratorExtraData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isRuled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numberOfRulingOptions", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitratorDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "rule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "templateRegistry", + "outputs": [ + { + "internalType": "contract IDisputeTemplateRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x1112abdc3f57ddc211ca722c574b81b13aa01739793e0cf023c8a7fcf6d373fe", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xb3a5FdEAF461c42caCe148e978e6FBCa97bE6140", + "transactionIndex": 2, + "gasUsed": "915878", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1094f4f08b0e0a3bec164918a7059f883e0cd6a0a501a3490e65cc12df718df3", + "transactionHash": "0x1112abdc3f57ddc211ca722c574b81b13aa01739793e0cf023c8a7fcf6d373fe", + "logs": [], + "blockNumber": 286701355, + "cumulativeGasUsed": "979461", + "status": 1, + "byzantium": true + }, + "args": [ + "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2" + ], + "numDeployments": 1, + "solcInputHash": "6c34f81616194abf0f5b1c9c283b9294", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/DisputeResolverRuler.sol\":\"DisputeResolverRuler\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xee61f409399f0e66be187def6fcbe2e23717475b2b752d913dfac0a32c7dca1a\",\"license\":\"MIT\"},\"src/arbitration/devtools/DisputeResolverRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {DisputeResolver, IArbitratorV2, IDisputeTemplateRegistry} from \\\"../arbitrables/DisputeResolver.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\ninterface IKlerosCoreRulerFragment {\\n function getNextDisputeID() external view returns (uint256);\\n}\\n\\n/// @title DisputeResolverRuler\\n/// It extends DisputeResolver for testing purposes of the automatic ruling modes.\\n/// The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().\\ncontract DisputeResolverRuler is DisputeResolver {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n IDisputeTemplateRegistry _templateRegistry\\n ) DisputeResolver(_arbitrator, _templateRegistry) {\\n governor = msg.sender;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal override returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n uint256 localDisputeID = disputes.length;\\n DisputeStruct storage dispute = disputes.push();\\n dispute.arbitratorExtraData = _arbitratorExtraData;\\n dispute.numberOfRulingOptions = _numberOfRulingOptions;\\n\\n // Keep track of the upcoming dispute ID before dispute creation, so rule() can be called immediately after.\\n arbitratorDisputeID = IKlerosCoreRulerFragment(address(arbitrator)).getNextDisputeID();\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n\\n arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n }\\n}\\n\",\"keccak256\":\"0x310d715738bcb1210bb6094787f6c6cc8032664f9484e2137106474b749ff273\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051610eee380380610eee83398101604081905261002f9161008b565b60008054600180546001600160a01b03199081166001600160a01b0396871617909155600280548216949095169390931790935591811633918216171790556100c5565b6001600160a01b038116811461008857600080fd5b50565b6000806040838503121561009e57600080fd5b82516100a981610073565b60208401519092506100ba81610073565b809150509250929050565b610e1a806100d46000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108c9565b610231565b005b34801561010c57600080fd5b506100fe61011b366004610903565b6103d1565b34801561012c57600080fd5b5061014061013b366004610927565b61041d565b6040516100d59493929190610986565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109fe565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a88565b61055a565b3480156101d057600080fd5b506101836101df366004610927565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c366004610903565b6105b9565b34801561021d57600080fd5b506100fe61022c366004610903565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b96565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bac565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610bee565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610bee565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bac565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bac565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60038054600181018255600091909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106f1898b83610c79565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190610d3a565b600081815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a994174916107af918c918c9101610d53565b6020604051808303816000875af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190610d3a565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061083a90879086908c90610d8f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906108789089908f908f90600401610dae565b60206040518083038185885af1158015610896573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108bb9190610d3a565b505050509695505050505050565b600080604083850312156108dc57600080fd5b50508035926020909101359150565b6001600160a01b038116811461090057600080fd5b50565b60006020828403121561091557600080fd5b8135610920816108eb565b9392505050565b60006020828403121561093957600080fd5b5035919050565b6000815180845260005b818110156109665760208185018101518683018201520161094a565b506000602082860101526020601f19601f83011685010191505092915050565b6080815260006109996080830187610940565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109c757600080fd5b50813567ffffffffffffffff8111156109df57600080fd5b6020830191508360208285010111156109f757600080fd5b9250929050565b600080600080600060608688031215610a1657600080fd5b853567ffffffffffffffff80821115610a2e57600080fd5b610a3a89838a016109b5565b90975095506020880135915080821115610a5357600080fd5b50610a60888289016109b5565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610aa157600080fd5b863567ffffffffffffffff80821115610ab957600080fd5b610ac58a838b016109b5565b90985096506020890135915080821115610ade57600080fd5b610aea8a838b016109b5565b90965094506040890135915080821115610b0357600080fd5b818901915089601f830112610b1757600080fd5b813581811115610b2957610b29610a72565b604051601f8201601f19908116603f01168101908382118183101715610b5157610b51610a72565b816040528281528c6020848701011115610b6a57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c0257607f821691505b602082108103610c2257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c74576000816000526020600020601f850160051c81016020861015610c515750805b601f850160051c820191505b81811015610c7057828155600101610c5d565b5050505b505050565b67ffffffffffffffff831115610c9157610c91610a72565b610ca583610c9f8354610bee565b83610c28565b6000601f841160018114610cd95760008515610cc15750838201355b600019600387901b1c1916600186901b178355610d33565b600083815260209020601f19861690835b82811015610d0a5786850135825560209485019460019092019101610cea565b5086821015610d275760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600060208284031215610d4c57600080fd5b5051919050565b6060815260006060820152608060208201526000610d746080830185610940565b8281036040840152610d868185610940565b95945050505050565b838152826020820152606060408201526000610d866060830184610940565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea26469706673582212205a8e65d1dfc327ea0f1f71dae2dae97c38359baa8ee8493fab431b5809c2307a64736f6c63430008180033", + "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108c9565b610231565b005b34801561010c57600080fd5b506100fe61011b366004610903565b6103d1565b34801561012c57600080fd5b5061014061013b366004610927565b61041d565b6040516100d59493929190610986565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109fe565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a88565b61055a565b3480156101d057600080fd5b506101836101df366004610927565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c366004610903565b6105b9565b34801561021d57600080fd5b506100fe61022c366004610903565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b96565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610bac565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610bee565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610bee565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610bac565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610bac565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60038054600181018255600091909152600481027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01806106f1898b83610c79565b50600381018490556001546040805163db8a173b60e01b815290516001600160a01b039092169163db8a173b916004808201926020929091908290030181865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190610d3a565b600081815260046020819052604080832086905560025490516312a6505d60e21b815293965091926001600160a01b0390921691634a994174916107af918c918c9101610d53565b6020604051808303816000875af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190610d3a565b60015460405191925085916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061083a90879086908c90610d8f565b60405180910390a360015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906108789089908f908f90600401610dae565b60206040518083038185885af1158015610896573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108bb9190610d3a565b505050509695505050505050565b600080604083850312156108dc57600080fd5b50508035926020909101359150565b6001600160a01b038116811461090057600080fd5b50565b60006020828403121561091557600080fd5b8135610920816108eb565b9392505050565b60006020828403121561093957600080fd5b5035919050565b6000815180845260005b818110156109665760208185018101518683018201520161094a565b506000602082860101526020601f19601f83011685010191505092915050565b6080815260006109996080830187610940565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109c757600080fd5b50813567ffffffffffffffff8111156109df57600080fd5b6020830191508360208285010111156109f757600080fd5b9250929050565b600080600080600060608688031215610a1657600080fd5b853567ffffffffffffffff80821115610a2e57600080fd5b610a3a89838a016109b5565b90975095506020880135915080821115610a5357600080fd5b50610a60888289016109b5565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610aa157600080fd5b863567ffffffffffffffff80821115610ab957600080fd5b610ac58a838b016109b5565b90985096506020890135915080821115610ade57600080fd5b610aea8a838b016109b5565b90965094506040890135915080821115610b0357600080fd5b818901915089601f830112610b1757600080fd5b813581811115610b2957610b29610a72565b604051601f8201601f19908116603f01168101908382118183101715610b5157610b51610a72565b816040528281528c6020848701011115610b6a57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610c0257607f821691505b602082108103610c2257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c74576000816000526020600020601f850160051c81016020861015610c515750805b601f850160051c820191505b81811015610c7057828155600101610c5d565b5050505b505050565b67ffffffffffffffff831115610c9157610c91610a72565b610ca583610c9f8354610bee565b83610c28565b6000601f841160018114610cd95760008515610cc15750838201355b600019600387901b1c1916600186901b178355610d33565b600083815260209020601f19861690835b82811015610d0a5786850135825560209485019460019092019101610cea565b5086821015610d275760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600060208284031215610d4c57600080fd5b5051919050565b6060815260006060820152608060208201526000610d746080830185610940565b8281036040840152610d868185610940565b95945050505050565b838152826020820152606060408201526000610d866060830184610940565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea26469706673582212205a8e65d1dfc327ea0f1f71dae2dae97c38359baa8ee8493fab431b5809c2307a64736f6c63430008180033", + "devdoc": { + "events": { + "DisputeRequest(address,uint256,uint256,uint256,string)": { + "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", + "params": { + "_arbitrator": "The arbitrator of the contract.", + "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", + "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", + "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", + "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." + } + }, + "Ruling(address,uint256,uint256)": { + "details": "To be raised when a ruling is given.", + "params": { + "_arbitrator": "The arbitrator giving the ruling.", + "_disputeID": "The identifier of the dispute in the Arbitrator contract.", + "_ruling": "The ruling which was given." + } + } + }, + "kind": "dev", + "methods": { + "changeGovernor(address)": { + "details": "Changes the governor.", + "params": { + "_governor": "The address of the new governor." + } + }, + "constructor": { + "details": "Constructor", + "params": { + "_arbitrator": "Target global arbitrator for any disputes." + } + }, + "createDisputeForTemplate(bytes,string,string,uint256)": { + "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", + "params": { + "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", + "_disputeTemplate": "Dispute template.", + "_disputeTemplateDataMappings": "The data mappings.", + "_numberOfRulingOptions": "Number of ruling options." + }, + "returns": { + "disputeID": "Dispute id (on arbitrator side) of the created dispute." + } + }, + "createDisputeForTemplateUri(bytes,string,uint256)": { + "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", + "params": { + "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", + "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", + "_numberOfRulingOptions": "Number of ruling options." + }, + "returns": { + "disputeID": "Dispute id (on arbitrator side) of the created dispute." + } + }, + "rule(uint256,uint256)": { + "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", + "params": { + "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", + "_ruling": "The ruling choice of the arbitration." + } + } + }, + "title": "DisputeResolverRuler It extends DisputeResolver for testing purposes of the automatic ruling modes. The arbitrator disputeID must be known before dispute creation, otherwise the dispute cannot be retrieved during the immediate call to rule().", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 15541, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "governor", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 15544, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "arbitrator", + "offset": 0, + "slot": "1", + "type": "t_contract(IArbitratorV2)21857" + }, + { + "astId": 15547, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "templateRegistry", + "offset": 0, + "slot": "2", + "type": "t_contract(IDisputeTemplateRegistry)22028" + }, + { + "astId": 15551, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "disputes", + "offset": 0, + "slot": "3", + "type": "t_array(t_struct(DisputeStruct)15539_storage)dyn_storage" + }, + { + "astId": 15555, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "arbitratorDisputeIDToLocalID", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(DisputeStruct)15539_storage)dyn_storage": { + "base": "t_struct(DisputeStruct)15539_storage", + "encoding": "dynamic_array", + "label": "struct DisputeResolver.DisputeStruct[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IArbitratorV2)21857": { + "encoding": "inplace", + "label": "contract IArbitratorV2", + "numberOfBytes": "20" + }, + "t_contract(IDisputeTemplateRegistry)22028": { + "encoding": "inplace", + "label": "contract IDisputeTemplateRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(DisputeStruct)15539_storage": { + "encoding": "inplace", + "label": "struct DisputeResolver.DisputeStruct", + "members": [ + { + "astId": 15532, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "arbitratorExtraData", + "offset": 0, + "slot": "0", + "type": "t_bytes_storage" + }, + { + "astId": 15534, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "isRuled", + "offset": 0, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 15536, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "ruling", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 15538, + "contract": "src/arbitration/devtools/DisputeResolverRuler.sol:DisputeResolverRuler", + "label": "numberOfRulingOptions", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/arbitrum/KlerosCoreRulerNeo.json b/contracts/deployments/arbitrum/KlerosCoreRulerNeo.json new file mode 100644 index 000000000..9fd6d468f --- /dev/null +++ b/contracts/deployments/arbitrum/KlerosCoreRulerNeo.json @@ -0,0 +1,1602 @@ +{ + "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AppealFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "ArbitrationFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotAppealable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOrInstructorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidForkingCourtAsParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NoRulerSet", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "RulerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "RulingAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "RulingModeNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotAccepted", + "type": "error" + }, + { + "inputs": [], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "inputs": [], + "name": "UnsuccessfulCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "AcceptedFeeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealDecision", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealPossible", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "mode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "AutoRuled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_fromCourtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "_toCourtID", + "type": "uint96" + } + ], + "name": "CourtJump", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "CourtModified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "DisputeCreation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_pnkAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "LeftoverRewardSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "NewCurrencyRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum KlerosCoreRuler.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_oldRuler", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "RulerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "indexed": false, + "internalType": "struct KlerosCoreRuler.RulerSettings", + "name": "_settings", + "type": "tuple" + } + ], + "name": "RulerSettingsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_degreeOfCoherency", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_pnkAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_feeAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "changeAcceptedFeeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeCourtParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "changeCurrencyRates", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "changeRuler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_presetOverridden", + "type": "bool" + } + ], + "name": "changeRulingModeToAutomaticPreset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToAutomaticRandom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToManual", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amountInEth", + "type": "uint256" + } + ], + "name": "convertEthToTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "courts", + "outputs": [ + { + "internalType": "uint96", + "name": "parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "disabled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "createCourt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "currencyRates", + "outputs": [ + { + "internalType": "bool", + "name": "feePaymentAccepted", + "type": "bool" + }, + { + "internalType": "uint64", + "name": "rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "rateDecimals", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "currentRuling", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrableV2", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "enum KlerosCoreRuler.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeGovernorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getNextDisputeID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getRoundInfo", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumFeeRewardPaid", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "feeToken", + "type": "address" + } + ], + "internalType": "struct KlerosCoreRuler.Round", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "uint256[4]", + "name": "_courtParameters", + "type": "uint256[4]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "rulers", + "outputs": [ + { + "internalType": "address", + "name": "ruler", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "name": "rulingResults", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "settings", + "outputs": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "transactionIndex": 2, + "gasUsed": "314451", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100004000000000000000000000000000060008000000000000000000000000220000000000000000000800000080000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d", + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 286701284, + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "topics": [ + "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 0, + "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" + }, + { + "transactionIndex": 2, + "blockNumber": 286701284, + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 1, + "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" + } + ], + "blockNumber": 286701284, + "cumulativeGasUsed": "348983", + "status": 1, + "byzantium": true + }, + "args": [ + "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" + ], + "numDeployments": 1, + "solcInputHash": "072c3d36aa3704de09a27a044cf00231", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreRulerProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", + "execute": { + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "0x330bD769382cFc6d50175903434CCC8D206DCAE5", + [ + 0, + 10000, + "100000000000000000", + 16 + ] + ] + }, + "implementation": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/contracts/deployments/arbitrum/KlerosCoreRulerNeo_Implementation.json b/contracts/deployments/arbitrum/KlerosCoreRulerNeo_Implementation.json new file mode 100644 index 000000000..5461d6c22 --- /dev/null +++ b/contracts/deployments/arbitrum/KlerosCoreRulerNeo_Implementation.json @@ -0,0 +1,2221 @@ +{ + "address": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AppealFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "ArbitrationFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotAppealable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOrInstructorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidForkingCourtAsParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NoRulerSet", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "RulerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "RulingAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "RulingModeNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotAccepted", + "type": "error" + }, + { + "inputs": [], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "inputs": [], + "name": "UnsuccessfulCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "AcceptedFeeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealDecision", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealPossible", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "mode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "AutoRuled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_fromCourtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "_toCourtID", + "type": "uint96" + } + ], + "name": "CourtJump", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "CourtModified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "DisputeCreation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_pnkAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "LeftoverRewardSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "NewCurrencyRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum KlerosCoreRuler.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_oldRuler", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "RulerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "indexed": false, + "internalType": "struct KlerosCoreRuler.RulerSettings", + "name": "_settings", + "type": "tuple" + } + ], + "name": "RulerSettingsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_degreeOfCoherency", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_pnkAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_feeAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_jump", + "type": "bool" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "changeAcceptedFeeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeCourtParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "changeCurrencyRates", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRuler", + "type": "address" + } + ], + "name": "changeRuler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_presetOverridden", + "type": "bool" + } + ], + "name": "changeRulingModeToAutomaticPreset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToAutomaticRandom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "changeRulingModeToManual", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amountInEth", + "type": "uint256" + } + ], + "name": "convertEthToTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "courts", + "outputs": [ + { + "internalType": "uint96", + "name": "parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "disabled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "createCourt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "currencyRates", + "outputs": [ + { + "internalType": "bool", + "name": "feePaymentAccepted", + "type": "bool" + }, + { + "internalType": "uint64", + "name": "rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "rateDecimals", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "currentRuling", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrableV2", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "enum KlerosCoreRuler.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeGovernorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getNextDisputeID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getRoundInfo", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumFeeRewardPaid", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "feeToken", + "type": "address" + } + ], + "internalType": "struct KlerosCoreRuler.Round", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "uint256[4]", + "name": "_courtParameters", + "type": "uint256[4]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "rulers", + "outputs": [ + { + "internalType": "address", + "name": "ruler", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "name": "rulingResults", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IArbitrableV2", + "name": "arbitrable", + "type": "address" + } + ], + "name": "settings", + "outputs": [ + { + "internalType": "enum KlerosCoreRuler.RulingMode", + "name": "rulingMode", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "presetRuling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "presetTied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "presetOverridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xf4d87406caaf352d4a0c65a9f9963300a2e4fd4f762ca428155ac8c93e11ce48", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + "transactionIndex": 5, + "gasUsed": "2957987", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x86b9c352bef894ed240b7fca2b89945fd86b54ea9672c8843a8061568921982b", + "transactionHash": "0xf4d87406caaf352d4a0c65a9f9963300a2e4fd4f762ca428155ac8c93e11ce48", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 286701267, + "transactionHash": "0xf4d87406caaf352d4a0c65a9f9963300a2e4fd4f762ca428155ac8c93e11ce48", + "address": "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "logIndex": 50, + "blockHash": "0x86b9c352bef894ed240b7fca2b89945fd86b54ea9672c8843a8061568921982b" + } + ], + "blockNumber": 286701267, + "cumulativeGasUsed": "4476604", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "6c34f81616194abf0f5b1c9c283b9294", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotAppealable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoRulerSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingModeNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"AutoRuled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldRuler\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"RulerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct KlerosCoreRuler.RulerSettings\",\"name\":\"_settings\",\"type\":\"tuple\"}],\"name\":\"RulerSettingsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_jump\",\"type\":\"bool\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"arbitrationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"changeAcceptedFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRuler\",\"type\":\"address\"}],\"name\":\"changeRuler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_presetOverridden\",\"type\":\"bool\"}],\"name\":\"changeRulingModeToAutomaticPreset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToAutomaticRandom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"changeRulingModeToManual\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreRuler.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextDisputeID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"}],\"internalType\":\"struct KlerosCoreRuler.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"rulers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ruler\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"name\":\"rulingResults\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrable\",\"type\":\"address\"}],\"name\":\"settings\",\"outputs\":[{\"internalType\":\"enum KlerosCoreRuler.RulingMode\",\"name\":\"rulingMode\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"presetRuling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"presetTied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"presetOverridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"appeal(uint256,uint256,bytes,bool)\":{\"details\":\"Appeals the ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"}},\"appealCost(uint256,bool)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_jump\":\"Whether to jump to the parent court or not.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"execute(uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256,uint256,bool,bool)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"initialize(address,address,uint256[4])\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_governor\":\"The governor's address.\",\"_pinakion\":\"The address of the token contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"KlerosCoreRuler Core arbitrator contract for development and testing purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/devtools/KlerosCoreRuler.sol\":\"KlerosCoreRuler\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/devtools/KlerosCoreRuler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreRuler\\n/// Core arbitrator contract for development and testing purposes.\\ncontract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum RulingMode {\\n uninitialized,\\n manual, // executeRuling() is called manually.\\n automaticRandom, // The ruling is given randomly automatically.\\n automaticPreset // The ruling is given automatically with a preset value.\\n }\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct RulerSettings {\\n RulingMode rulingMode; // The ruling mode of the arbitrator.\\n uint256 presetRuling; // The ruling to give in case of automatic ruling mode.\\n bool presetTied; // Whether the ruling is tied or not.\\n bool presetOverridden; // Whether the ruling is overridden or not.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n struct RulingResult {\\n uint256 ruling;\\n bool tied;\\n bool overridden;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n IERC20 public pinakion; // The Pinakion token contract.\\n Court[] public courts; // The courts.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n mapping(IArbitrableV2 arbitrable => address ruler) public rulers; // The ruler of each arbitrable contract.\\n mapping(IArbitrableV2 arbitrable => RulerSettings) public settings; // The settings of each arbitrable contract.\\n mapping(uint256 disputeID => RulingResult) public rulingResults; // The ruling results of each dispute.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event AutoRuled(\\n IArbitrableV2 indexed _arbitrable,\\n RulingMode indexed mode,\\n uint256 indexed _disputeID,\\n uint256 _ruling,\\n bool tied,\\n bool overridden\\n );\\n event RulerSettingsChanged(IArbitrableV2 indexed _arbitrable, RulerSettings _settings);\\n event RulerChanged(IArbitrableV2 indexed _arbitrable, address indexed _oldRuler, address indexed _newRuler);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n function initialize(\\n address _governor,\\n IERC20 _pinakion,\\n uint256[4] memory _courtParameters\\n ) external reinitializer(1) {\\n governor = _governor;\\n pinakion = _pinakion;\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = false;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = [0, 0, 0, 0];\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n court.hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n court.timesPerPeriod\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function changeRulingModeToManual(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.manual;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticRandom(IArbitrableV2 _arbitrable) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticRandom;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRulingModeToAutomaticPreset(\\n IArbitrableV2 _arbitrable,\\n uint256 _presetRuling,\\n bool _presetTied,\\n bool _presetOverridden\\n ) external {\\n if (rulers[_arbitrable] == address(0)) rulers[_arbitrable] = msg.sender;\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n\\n delete settings[_arbitrable];\\n RulerSettings storage arbitratedSettings = settings[_arbitrable];\\n arbitratedSettings.rulingMode = RulingMode.automaticPreset;\\n arbitratedSettings.presetRuling = _presetRuling;\\n arbitratedSettings.presetTied = _presetTied;\\n arbitratedSettings.presetOverridden = _presetOverridden;\\n emit RulerSettingsChanged(_arbitrable, arbitratedSettings);\\n }\\n\\n function changeRuler(IArbitrableV2 _arbitrable, address _newRuler) external {\\n if (rulers[_arbitrable] != msg.sender) revert RulerOnly();\\n rulers[_arbitrable] = _newRuler;\\n emit RulerChanged(_arbitrable, msg.sender, _newRuler);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , ) = _unpackExtraData(_extraData);\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n\\n Round storage round = dispute.rounds.push();\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n _autoRule(disputeID, _numberOfChoices);\\n\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n function _autoRule(uint256 _disputeID, uint256 _numberOfChoices) internal {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 roundID = dispute.rounds.length - 1;\\n RulerSettings storage arbitratedSettings = settings[dispute.arbitrated];\\n if (arbitratedSettings.rulingMode == RulingMode.uninitialized) revert RulingModeNotSet();\\n if (arbitratedSettings.rulingMode == RulingMode.manual) {\\n // NOP\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticPreset) {\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticPreset,\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.executeRuling(\\n _disputeID,\\n arbitratedSettings.presetRuling,\\n arbitratedSettings.presetTied,\\n arbitratedSettings.presetOverridden\\n );\\n this.execute(_disputeID, roundID);\\n } else if (arbitratedSettings.rulingMode == RulingMode.automaticRandom) {\\n uint256 pseudoRandomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1)))) %\\n _numberOfChoices; // Not secure but it's just a dev tool for testing, sue me\\n bool tied = pseudoRandomNumber & 4 == 0;\\n bool overridden = pseudoRandomNumber & 2 == 0;\\n emit AutoRuled(\\n dispute.arbitrated,\\n RulingMode.automaticRandom,\\n _disputeID,\\n pseudoRandomNumber,\\n tied,\\n overridden\\n );\\n this.executeRuling(_disputeID, pseudoRandomNumber, tied, overridden);\\n this.execute(_disputeID, roundID);\\n }\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n function appeal(\\n uint256 _disputeID,\\n uint256 _numberOfChoices,\\n bytes memory /*_extraData*/,\\n bool _jump\\n ) external payable {\\n if (msg.value < appealCost(_disputeID, _jump)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (rulers[dispute.arbitrated] != msg.sender) revert RulerOnly();\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n uint96 newCourtID = dispute.courtID;\\n\\n if (_jump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n\\n Round storage extraRound = dispute.rounds.push();\\n extraRound.totalFeesForJurors = msg.value;\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n\\n _autoRule(_disputeID, _numberOfChoices);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n function execute(uint256 _disputeID, uint256 _round) external {\\n Dispute storage dispute = disputes[_disputeID];\\n address account = rulers[dispute.arbitrated];\\n if (account == address(0)) revert NoRulerSet();\\n\\n // Transfer the fees back to the ruler\\n Round storage round = dispute.rounds[_round];\\n uint256 feeReward = round.totalFeesForJurors;\\n round.sumFeeRewardPaid += feeReward;\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(account, _disputeID, _round, 1, int256(0), int256(feeReward), round.feeToken);\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID, uint256 _ruling, bool tied, bool overridden) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n if (msg.sender != rulers[dispute.arbitrated] && msg.sender != address(this)) revert RulerOnly();\\n\\n rulingResults[_disputeID] = RulingResult(_ruling, tied, overridden);\\n dispute.ruled = true;\\n dispute.arbitrated.rule(_disputeID, _ruling);\\n\\n emit Ruling(dispute.arbitrated, _disputeID, _ruling);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _unpackExtraData(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _jump Whether to jump to the parent court or not.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID, bool _jump) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror;\\n if (_jump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n RulingResult storage rulingResult = rulingResults[_disputeID];\\n return (rulingResult.ruling, rulingResult.tied, rulingResult.overridden);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n function getNextDisputeID() external view returns (uint256) {\\n return disputes.length;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n return dispute.rounds[dispute.rounds.length - 1].totalFeesForJurors / court.feeForJuror;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _unpackExtraData(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GovernorOrInstructorOnly();\\n error RulerOnly();\\n error NoRulerSet();\\n error RulingModeNotSet();\\n error UnsuccessfulCall();\\n error InvalidForkingCourtAsParent();\\n error ArbitrationFeesNotEnough();\\n error TokenNotAccepted();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error RulingAlreadyExecuted();\\n error TransferFailed();\\n}\\n\",\"keccak256\":\"0xb8a370ce083224d6aa6e3eefe1f2c5ef8bbc10f3d957277e09fa5d9b10607afe\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent. DEPRECATED, as its main purpose was to accommodate forest structure which is not used now.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0x5bbda7c304b3681b90feae33be694d04dc129edd60e1d07cb593b895fdc9cd4e\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161336562000103600039600081816113350152818161135e015261155b01526133656000f3fe6080604052600436106101e95760003560e01c8063564a565d11610113578063d98493f6116100ab578063e6d49cdf1161006f578063e6d49cdf14610727578063f6506db414610767578063f7434ea914610787578063fbf405b0146107a7578063fc6f8f16146107c757600080fd5b8063d98493f614610665578063d9ee095f14610685578063db8a173b14610698578063e2373ab3146106ad578063e4c0aaf41461070757600080fd5b8063564a565d146105175780636736b70c14610547578063751accd0146105675780637934c0be1461058757806382d02237146105a757806386541b24146105c75780638a9bb02a146105e7578063c13517e114610632578063c71f42531461064557600080fd5b80632177470c116101865780632177470c146103ec578063379f0a171461040c5780633cfd118414610442578063405d51ae1461046f57806343818d661461048f57806347cdcc1d146104af5780634f1ef286146104cf57806352d1902d146104e25780635601eaea146104f757600080fd5b8062f5822c146101ee57806301fcf74d146102105780630219da791461024357806305d3177d146102b65780630c340a24146102d65780630e3993a41461030e5780631860592b1461032e5780631c3db16d1461034e5780631f5a0dd21461038b575b600080fd5b3480156101fa57600080fd5b5061020e610209366004612900565b6107e7565b005b34801561021c57600080fd5b5061023061022b366004612932565b610834565b6040519081526020015b60405180910390f35b34801561024f57600080fd5b5061028e61025e366004612900565b60046020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff169082015260600161023a565b3480156102c257600080fd5b5061020e6102d13660046129e5565b610990565b3480156102e257600080fd5b506000546102f6906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b34801561031a57600080fd5b5061020e610329366004612900565b610be9565b34801561033a57600080fd5b50610230610349366004612a2d565b610cf4565b34801561035a57600080fd5b5061036e610369366004612a59565b610d4e565b60408051938452911515602084015215159082015260600161023a565b34801561039757600080fd5b506103ab6103a6366004612a59565b610d78565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161023a565b3480156103f857600080fd5b5061020e610407366004612a72565b610dd7565b34801561041857600080fd5b506102f6610427366004612900565b6005602052600090815260409020546001600160a01b031681565b34801561044e57600080fd5b5061046261045d366004612ad8565b610f9f565b60405161023a9190612b16565b34801561047b57600080fd5b5061020e61048a366004612b24565b611009565b34801561049b57600080fd5b5061020e6104aa366004612900565b6111c9565b3480156104bb57600080fd5b5061020e6104ca366004612b92565b61128e565b61020e6104dd366004612c4c565b611321565b3480156104ee57600080fd5b5061023061154e565b34801561050357600080fd5b5061020e610512366004612c9b565b6115ac565b34801561052357600080fd5b50610537610532366004612a59565b61171e565b60405161023a9493929190612ce7565b34801561055357600080fd5b5061020e610562366004612d24565b611773565b34801561057357600080fd5b5061020e610582366004612d5c565b611884565b34801561059357600080fd5b5061020e6105a2366004612db4565b61192e565b3480156105b357600080fd5b5061020e6105c2366004612de2565b6119ad565b3480156105d357600080fd5b5061020e6105e2366004612b24565b611a6a565b3480156105f357600080fd5b50610607610602366004612c9b565b611b5e565b604080518251815260208084015190820152918101516001600160a01b03169082015260600161023a565b610230610640366004612e3f565b611c0b565b34801561065157600080fd5b50610230610660366004612a59565b611c43565b34801561067157600080fd5b50610230610680366004612eb7565b611ced565b61020e610693366004612f02565b611d32565b3480156106a457600080fd5b50600354610230565b3480156106b957600080fd5b506106f76106c8366004612900565b60066020526000908152604090208054600182015460029092015460ff91821692918181169161010090041684565b60405161023a9493929190612f69565b34801561071357600080fd5b5061020e610722366004612900565b611f7f565b34801561073357600080fd5b5061036e610742366004612a59565b6007602052600090815260409020805460019091015460ff8082169161010090041683565b34801561077357600080fd5b50610230610782366004612f94565b611fcc565b34801561079357600080fd5b506102306107a2366004612ffa565b6120b0565b3480156107b357600080fd5b506001546102f6906001600160a01b031681565b3480156107d357600080fd5b506102306107e2366004612a59565b6120fc565b6000546001600160a01b031633146108125760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000806003848154811061084a5761084a61302e565b60009182526020822060026003909202019081018054919350906108709060019061305a565b815481106108805761088061302e565b6000918252602082208454600280546003909402909201945090916001600160601b039091169081106108b5576108b561302e565b90600052602060002090600b020190506000816004015483600001546108db9190613083565b9050851561095e5783546001600160601b031660001901610905576001600160ff1b039450610986565b610910816002613097565b61091b9060016130ae565b82546002805490916001600160601b031690811061093b5761093b61302e565b90600052602060002090600b0201600401546109579190613097565b9450610986565b610969816002613097565b6109749060016130ae565b82600401546109839190613097565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109d9575080546001600160401b03808416911610155b156109f65760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610aaf578160200160208202803683370190505b508051610ac691600184019160209091019061280d565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184526000808252948101859052928301849052820192909252610b2c91600684019190612858565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b9295600160601b90930460ff1694919390929060068b01906130c1565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b0381811660009081526005602052604090205416610c31576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03818116600090815260056020526040902054163314610c6b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610ce8919061311d565b60405180910390a25050565b6001600160a01b03821660009081526004602052604081205461010081046001600160401b031690610d3190600160481b900460ff16600a613246565b610d3b9084613097565b610d459190613083565b90505b92915050565b6000818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d8857600080fd5b60009182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600060038581548110610dec57610dec61302e565b906000526020600020906003020190508060010160019054906101000a900460ff1615610e2c5760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b03908116600090815260056020526040902054163314801590610e5f5750333014155b15610e7d576040516301627e2760e61b815260040160405180910390fd5b60408051606081018252858152841515602080830191825285151583850190815260008a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610f3757600080fd5b505af1158015610f4b573d6000803e3d6000fd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610fa761288b565b6002826001600160601b031681548110610fc357610fc361302e565b6000918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610fea5750505050509050919050565b6000546001600160a01b031633146110345760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661105b57604051631ef4f64960e01b815260040160405180910390fd5b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b1617815590916040519080825280602002602001820160405280156110d4578160200160208202803683370190505b5080516110eb91600184019160209091019061280d565b50805460ff60601b1916600160601b89151502178155600281018790556003810186905560048082018690556005820185905561112e90600683019085906128a9565b506002896001600160601b03168154811061114b5761114b61302e565b600091825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761906111b6908c908c908c908c908c908c90613255565b60405180910390a3505050505050505050565b6001600160a01b0381811660009081526005602052604090205416611211576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b0381811660009081526005602052604090205416331461124b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610caa565b6001600160a01b038281166000908152600560205260409020541633146112c8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0382811660008181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b61132a8261212b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113a857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661139c6000805160206133108339815191525490565b6001600160a01b031614155b156113c65760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611420575060408051601f3d908101601f1916820190925261141d91810190613288565b60015b61144d57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020613310833981519152811461147e57604051632a87526960e21b815260048101829052602401611444565b6000805160206133108339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611549576000836001600160a01b0316836040516114e591906132a1565b600060405180830381855af49150503d8060008114611520576040519150601f19603f3d011682016040523d82523d6000602084013e611525565b606091505b5050905080611547576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115995760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061331083398151915290565b6000600383815481106115c1576115c161302e565b60009182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806116165760405163f4612fe560e01b815260040160405180910390fd5b600082600201848154811061162d5761162d61302e565b906000526020600020906003020190506000816000015490508082600101600082825461165a91906130ae565b909155505060028201546001600160a01b031661169c576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050506116b7565b60028201546116b5906001600160a01b03168483612159565b505b60028201546040805160018152600060208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b6003818154811061172e57600080fd5b6000918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b03848116600090815260056020526040902054166117bb576001600160a01b038416600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481166000908152600560205260409020541633146117f5576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b03841660008181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f49061187590849061311d565b60405180910390a25050505050565b6000546001600160a01b031633146118af5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b031683836040516118ca91906132a1565b60006040518083038185875af1925050503d8060008114611907576040519150601f19603f3d011682016040523d82523d6000602084013e61190c565b606091505b5050905080611547576040516322092f2f60e11b815260040160405180910390fd5b6000546001600160a01b031633146119595760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b031633146119d85760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611a955760405163c383977560e01b815260040160405180910390fd5b60006002886001600160601b031681548110611ab357611ab361302e565b60009182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611b0890600683019084906128a9565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611b4c96959493929190613255565b60405180910390a25050505050505050565b611b8b6040518060600160405280600081526020016000815260200160006001600160a01b031681525090565b60038381548110611b9e57611b9e61302e565b90600052602060002090600302016002018281548110611bc057611bc061302e565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b6000611c16826120b0565b341015611c3657604051630e3360f160e21b815260040160405180910390fd5b610d458383600034612222565b60008060038381548110611c5957611c5961302e565b600091825260208220600390910201805460028054929450916001600160601b03909116908110611c8c57611c8c61302e565b90600052602060002090600b0201905080600401548260020160018460020180549050611cb9919061305a565b81548110611cc957611cc961302e565b906000526020600020906003020160000154611ce59190613083565b949350505050565b6000611ce58261034986868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120b092505050565b611d3c8482610834565b341015611d5c57604051633191f8f160e01b815260040160405180910390fd5b600060038581548110611d7157611d7161302e565b6000918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611dc7576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611de257611de2612cbd565b14611e00576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611eb2576002816001600160601b031681548110611e2d57611e2d61302e565b60009182526020909120600b909102015482546001600160601b039182169250168114611eb257815460028301546001600160601b0390911690611e739060019061305a565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff191690556002830180549182018155600090815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051611f6491906132d0565b60405180910390a2611f768787612317565b50505050505050565b6000546001600160a01b03163314611faa5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526004602052604081205460ff166120055760405163e51cf7bf60e01b815260040160405180910390fd5b612010858585611ced565b82101561203057604051630e3360f160e21b815260040160405180910390fd5b6120456001600160a01b0384163330856126bc565b612062576040516312171d8360e31b815260040160405180910390fd5b6120a68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506122229050565b9695505050505050565b60008060006120be84612798565b5091509150806002836001600160601b0316815481106120e0576120e061302e565b90600052602060002090600b020160040154611ce59190613097565b6000600382815481106121115761211161302e565b600091825260209091206002600390920201015492915050565b6000546001600160a01b031633146121565760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121b691906132a1565b6000604051808303816000865af19150503d80600081146121f3576040519150601f19603f3d011682016040523d82523d6000602084013e6121f8565b606091505b50915091508180156120a65750805115806120a65750808060200190518101906120a691906132de565b60008061222e85612798565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d018054928301815560009081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a16179055909450919250906122df8489612317565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050949350505050565b60006003838154811061232c5761232c61302e565b90600052602060002090600302019050600060018260020180549050612352919061305a565b8254600160601b90046001600160a01b03166000908152600660205260408120919250815460ff16600381111561238b5761238b612cbd565b036123a95760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff1660038111156123c1576123c1612cbd565b146126b5576003815460ff1660038111156123de576123de612cbd565b0361252d578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c90608401600060405180830381600087803b1580156124b857600080fd5b505af11580156124cc573d6000803e3d6000fd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea9150604401600060405180830381600087803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b505050506126b5565b6002815460ff16600381111561254557612545612cbd565b036126b55760008461255860014361305a565b6040805191406020830152016040516020818303038152906040528051906020012060001c61258791906132fb565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c90608401600060405180830381600087803b15801561264157600080fd5b505af1158015612655573d6000803e3d6000fd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea9150604401600060405180830381600087803b15801561269957600080fd5b505af11580156126ad573d6000803e3d6000fd5b505050505050505b5050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161272191906132a1565b6000604051808303816000865af19150503d806000811461275e576040519150601f19603f3d011682016040523d82523d6000602084013e612763565b606091505b509150915081801561278d57508051158061278d57508080602001905181019061278d91906132de565b979650505050505050565b600080600060408451106127fe575050506020810151604082015160608301516001600160601b03831615806127d957506002546001600160601b03841610155b156127e357600192505b816000036127f057600391505b806127f9575060015b610d71565b50600193600393508492509050565b828054828255906000526020600020908101928215612848579160200282015b8281111561284857825182559160200191906001019061282d565b506128549291506128d6565b5090565b8260048101928215612848579160200282015b82811115612848578251829060ff1690559160200191906001019061286b565b60405180608001604052806004906020820280368337509192915050565b8260048101928215612848579160200282018281111561284857825182559160200191906001019061282d565b5b8082111561285457600081556001016128d7565b6001600160a01b038116811461215657600080fd5b60006020828403121561291257600080fd5b813561291d816128eb565b9392505050565b801515811461215657600080fd5b6000806040838503121561294557600080fd5b82359150602083013561295781612924565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298957600080fd5b604051608081018181106001600160401b03821117156129ab576129ab612962565b6040528060808401858111156129c057600080fd5b845b818110156129da5780358352602092830192016129c2565b509195945050505050565b600080600060c084860312156129fa57600080fd5b8335612a05816128eb565b92506020840135612a15816128eb565b9150612a248560408601612978565b90509250925092565b60008060408385031215612a4057600080fd5b8235612a4b816128eb565b946020939093013593505050565b600060208284031215612a6b57600080fd5b5035919050565b60008060008060808587031215612a8857600080fd5b84359350602085013592506040850135612aa181612924565b91506060850135612ab181612924565b939692955090935050565b80356001600160601b0381168114612ad357600080fd5b919050565b600060208284031215612aea57600080fd5b610d4582612abc565b8060005b6004811015611547578151845260209384019390910190600101612af7565b60808101610d488284612af3565b6000806000806000806000610140888a031215612b4057600080fd5b612b4988612abc565b96506020880135612b5981612924565b955060408801359450606088013593506080880135925060a08801359150612b848960c08a01612978565b905092959891949750929550565b60008060408385031215612ba557600080fd5b8235612bb0816128eb565b91506020830135612957816128eb565b600082601f830112612bd157600080fd5b81356001600160401b0380821115612beb57612beb612962565b604051601f8301601f19908116603f01168101908282118183101715612c1357612c13612962565b81604052838152866020858801011115612c2c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c5f57600080fd5b8235612c6a816128eb565b915060208301356001600160401b03811115612c8557600080fd5b612c9185828601612bc0565b9150509250929050565b60008060408385031215612cae57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612ce357612ce3612cbd565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612d136040830185612cd3565b821515606083015295945050505050565b60008060008060808587031215612d3a57600080fd5b8435612d45816128eb565b9350602085013592506040850135612aa181612924565b600080600060608486031215612d7157600080fd5b8335612d7c816128eb565b92506020840135915060408401356001600160401b03811115612d9e57600080fd5b612daa86828701612bc0565b9150509250925092565b60008060408385031215612dc757600080fd5b8235612dd2816128eb565b9150602083013561295781612924565b600080600060608486031215612df757600080fd5b8335612e02816128eb565b925060208401356001600160401b0381168114612e1e57600080fd5b9150604084013560ff81168114612e3457600080fd5b809150509250925092565b60008060408385031215612e5257600080fd5b8235915060208301356001600160401b03811115612c8557600080fd5b60008083601f840112612e8157600080fd5b5081356001600160401b03811115612e9857600080fd5b602083019150836020828501011115612eb057600080fd5b9250929050565b600080600060408486031215612ecc57600080fd5b83356001600160401b03811115612ee257600080fd5b612eee86828701612e6f565b9094509250506020840135612e34816128eb565b60008060008060808587031215612f1857600080fd5b843593506020850135925060408501356001600160401b03811115612f3c57600080fd5b612f4887828801612bc0565b9250506060850135612ab181612924565b60048110612ce357612ce3612cbd565b60808101612f778287612f59565b602082019490945291151560408301521515606090910152919050565b600080600080600060808688031215612fac57600080fd5b8535945060208601356001600160401b03811115612fc957600080fd5b612fd588828901612e6f565b9095509350506040860135612fe9816128eb565b949793965091946060013592915050565b60006020828403121561300c57600080fd5b81356001600160401b0381111561302257600080fd5b611ce584828501612bc0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610d4857610d48613044565b634e487b7160e01b600052601260045260246000fd5b6000826130925761309261306d565b500490565b8082028115828204841417610d4857610d48613044565b80820180821115610d4857610d48613044565b6000610120820190508715158252602087602084015286604084015285606084015284608084015260a083018460005b600481101561310e578154835291830191600191820191016130f1565b50505050979650505050505050565b60006080820190506131338260ff855416612f59565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561319d57816000190482111561318357613183613044565b8085161561319057918102915b93841c9390800290613167565b509250929050565b6000826131b457506001610d48565b816131c157506000610d48565b81600181146131d757600281146131e1576131fd565b6001915050610d48565b60ff8411156131f2576131f2613044565b50506001821b610d48565b5060208310610133831016604e8410600b8410161715613220575081810a610d48565b61322a8383613162565b806000190482111561323e5761323e613044565b029392505050565b6000610d4560ff8416836131a5565b600061012082019050871515825286602083015285604083015284606083015283608083015261278d60a0830184612af3565b60006020828403121561329a57600080fd5b5051919050565b6000825160005b818110156132c257602081860181015185830152016132a8565b506000920191825250919050565b60208101610d488284612cd3565b6000602082840312156132f057600080fd5b815161291d81612924565b60008261330a5761330a61306d565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204bcdc26480adc94ceb9c089d1af202275da9840934fdb8dead13e3defee11c1164736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106101e95760003560e01c8063564a565d11610113578063d98493f6116100ab578063e6d49cdf1161006f578063e6d49cdf14610727578063f6506db414610767578063f7434ea914610787578063fbf405b0146107a7578063fc6f8f16146107c757600080fd5b8063d98493f614610665578063d9ee095f14610685578063db8a173b14610698578063e2373ab3146106ad578063e4c0aaf41461070757600080fd5b8063564a565d146105175780636736b70c14610547578063751accd0146105675780637934c0be1461058757806382d02237146105a757806386541b24146105c75780638a9bb02a146105e7578063c13517e114610632578063c71f42531461064557600080fd5b80632177470c116101865780632177470c146103ec578063379f0a171461040c5780633cfd118414610442578063405d51ae1461046f57806343818d661461048f57806347cdcc1d146104af5780634f1ef286146104cf57806352d1902d146104e25780635601eaea146104f757600080fd5b8062f5822c146101ee57806301fcf74d146102105780630219da791461024357806305d3177d146102b65780630c340a24146102d65780630e3993a41461030e5780631860592b1461032e5780631c3db16d1461034e5780631f5a0dd21461038b575b600080fd5b3480156101fa57600080fd5b5061020e610209366004612900565b6107e7565b005b34801561021c57600080fd5b5061023061022b366004612932565b610834565b6040519081526020015b60405180910390f35b34801561024f57600080fd5b5061028e61025e366004612900565b60046020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff169082015260600161023a565b3480156102c257600080fd5b5061020e6102d13660046129e5565b610990565b3480156102e257600080fd5b506000546102f6906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b34801561031a57600080fd5b5061020e610329366004612900565b610be9565b34801561033a57600080fd5b50610230610349366004612a2d565b610cf4565b34801561035a57600080fd5b5061036e610369366004612a59565b610d4e565b60408051938452911515602084015215159082015260600161023a565b34801561039757600080fd5b506103ab6103a6366004612a59565b610d78565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161023a565b3480156103f857600080fd5b5061020e610407366004612a72565b610dd7565b34801561041857600080fd5b506102f6610427366004612900565b6005602052600090815260409020546001600160a01b031681565b34801561044e57600080fd5b5061046261045d366004612ad8565b610f9f565b60405161023a9190612b16565b34801561047b57600080fd5b5061020e61048a366004612b24565b611009565b34801561049b57600080fd5b5061020e6104aa366004612900565b6111c9565b3480156104bb57600080fd5b5061020e6104ca366004612b92565b61128e565b61020e6104dd366004612c4c565b611321565b3480156104ee57600080fd5b5061023061154e565b34801561050357600080fd5b5061020e610512366004612c9b565b6115ac565b34801561052357600080fd5b50610537610532366004612a59565b61171e565b60405161023a9493929190612ce7565b34801561055357600080fd5b5061020e610562366004612d24565b611773565b34801561057357600080fd5b5061020e610582366004612d5c565b611884565b34801561059357600080fd5b5061020e6105a2366004612db4565b61192e565b3480156105b357600080fd5b5061020e6105c2366004612de2565b6119ad565b3480156105d357600080fd5b5061020e6105e2366004612b24565b611a6a565b3480156105f357600080fd5b50610607610602366004612c9b565b611b5e565b604080518251815260208084015190820152918101516001600160a01b03169082015260600161023a565b610230610640366004612e3f565b611c0b565b34801561065157600080fd5b50610230610660366004612a59565b611c43565b34801561067157600080fd5b50610230610680366004612eb7565b611ced565b61020e610693366004612f02565b611d32565b3480156106a457600080fd5b50600354610230565b3480156106b957600080fd5b506106f76106c8366004612900565b60066020526000908152604090208054600182015460029092015460ff91821692918181169161010090041684565b60405161023a9493929190612f69565b34801561071357600080fd5b5061020e610722366004612900565b611f7f565b34801561073357600080fd5b5061036e610742366004612a59565b6007602052600090815260409020805460019091015460ff8082169161010090041683565b34801561077357600080fd5b50610230610782366004612f94565b611fcc565b34801561079357600080fd5b506102306107a2366004612ffa565b6120b0565b3480156107b357600080fd5b506001546102f6906001600160a01b031681565b3480156107d357600080fd5b506102306107e2366004612a59565b6120fc565b6000546001600160a01b031633146108125760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000806003848154811061084a5761084a61302e565b60009182526020822060026003909202019081018054919350906108709060019061305a565b815481106108805761088061302e565b6000918252602082208454600280546003909402909201945090916001600160601b039091169081106108b5576108b561302e565b90600052602060002090600b020190506000816004015483600001546108db9190613083565b9050851561095e5783546001600160601b031660001901610905576001600160ff1b039450610986565b610910816002613097565b61091b9060016130ae565b82546002805490916001600160601b031690811061093b5761093b61302e565b90600052602060002090600b0201600401546109579190613097565b9450610986565b610969816002613097565b6109749060016130ae565b82600401546109839190613097565b94505b5050505092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806109d9575080546001600160401b03808416911610155b156109f65760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b038088166001600160a01b0319928316178355600180549188169190921617815560028054818452808201909155600b9101027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160601b031916815590604051908082528060200260200182016040528015610aaf578160200160208202803683370190505b508051610ac691600184019160209091019061280d565b50805460ff60601b19168155835160028201556020808501516003830155604080860151600480850191909155606080880151600586015582516080810184526000808252948101859052928301849052820192909252610b2c91600684019190612858565b50805484516020860151604080880151606089015191516001600160601b038616956001957f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a76195610b9295600160601b90930460ff1694919390929060068b01906130c1565b60405180910390a350805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b0381811660009081526005602052604090205416610c31576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b03818116600090815260056020526040902054163314610c6b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff191680825560018083019390935560028201805461ffff19169055909190829082805b0217905550816001600160a01b03167ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f482604051610ce8919061311d565b60405180910390a25050565b6001600160a01b03821660009081526004602052604081205461010081046001600160401b031690610d3190600160481b900460ff16600a613246565b610d3b9084613097565b610d459190613083565b90505b92915050565b6000818152600760205260409020805460019091015460ff808216916101009004165b9193909250565b60028181548110610d8857600080fd5b60009182526020909120600b9091020180546002820154600383015460048401546005850154600a909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b600060038581548110610dec57610dec61302e565b906000526020600020906003020190508060010160019054906101000a900460ff1615610e2c5760405163c977f8d360e01b815260040160405180910390fd5b8054600160601b90046001600160a01b03908116600090815260056020526040902054163314801590610e5f5750333014155b15610e7d576040516301627e2760e61b815260040160405180910390fd5b60408051606081018252858152841515602080830191825285151583850190815260008a815260079092529084902092518355905160019283018054925161ffff1990931691151561ff001990811692909217610100931515840217905591840180549092161790558154905163188d362b60e11b81526004810187905260248101869052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b158015610f3757600080fd5b505af1158015610f4b573d6000803e3d6000fd5b50508254604051878152889350600160601b9091046001600160a01b031691507f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a35050505050565b610fa761288b565b6002826001600160601b031681548110610fc357610fc361302e565b6000918252602090912060408051608081019182905292600b029091016006019060049082845b815481526020019060010190808311610fea5750505050509050919050565b6000546001600160a01b031633146110345760405163c383977560e01b815260040160405180910390fd5b6001600160601b03871661105b57604051631ef4f64960e01b815260040160405180910390fd5b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600b82020180546001600160601b0319166001600160601b038b1617815590916040519080825280602002602001820160405280156110d4578160200160208202803683370190505b5080516110eb91600184019160209091019061280d565b50805460ff60601b1916600160601b89151502178155600281018790556003810186905560048082018690556005820185905561112e90600683019085906128a9565b506002896001600160601b03168154811061114b5761114b61302e565b600091825260208083206001600b909302018201805492830181558352909120018290556040516001600160601b038a169083907f0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761906111b6908c908c908c908c908c908c90613255565b60405180910390a3505050505050505050565b6001600160a01b0381811660009081526005602052604090205416611211576001600160a01b038116600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b0381811660009081526005602052604090205416331461124b576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0381166000908152600660205260408120805460ff19168082556001808301939093556002808301805461ffff19169055919283919083610caa565b6001600160a01b038281166000908152600560205260409020541633146112c8576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b0382811660008181526005602052604080822080546001600160a01b0319169486169485179055513392917ff512a4524e61d860055823df1f2a5f33de24eb2a03dc3de501015ad501d4e36f91a45050565b61132a8261212b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806113a857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661139c6000805160206133108339815191525490565b6001600160a01b031614155b156113c65760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611420575060408051601f3d908101601f1916820190925261141d91810190613288565b60015b61144d57604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020613310833981519152811461147e57604051632a87526960e21b815260048101829052602401611444565b6000805160206133108339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611549576000836001600160a01b0316836040516114e591906132a1565b600060405180830381855af49150503d8060008114611520576040519150601f19603f3d011682016040523d82523d6000602084013e611525565b606091505b5050905080611547576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115995760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061331083398151915290565b6000600383815481106115c1576115c161302e565b60009182526020808320600390920290910180546001600160a01b03600160601b90910481168452600590925260409092205491925016806116165760405163f4612fe560e01b815260040160405180910390fd5b600082600201848154811061162d5761162d61302e565b906000526020600020906003020190506000816000015490508082600101600082825461165a91906130ae565b909155505060028201546001600160a01b031661169c576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050506116b7565b60028201546116b5906001600160a01b03168483612159565b505b60028201546040805160018152600060208201529081018390526001600160a01b03918216606082015286918891908616907f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e79060800160405180910390a4505050505050565b6003818154811061172e57600080fd5b6000918252602090912060039091020180546001909101546001600160601b0382169250600160601b9091046001600160a01b03169060ff8082169161010090041684565b6001600160a01b03848116600090815260056020526040902054166117bb576001600160a01b038416600090815260056020526040902080546001600160a01b031916331790555b6001600160a01b038481166000908152600560205260409020541633146117f5576040516301627e2760e61b815260040160405180910390fd5b6001600160a01b03841660008181526006602052604090819020805460028201805460ff1990921660031783556001830188905561ffff1990911686151561ff001916176101008615150217905590519091907ffe3754ab712090753cf700ac7b99f8a5e0f9c69b698312c2cfd0236b852f83f49061187590849061311d565b60405180910390a25050505050565b6000546001600160a01b031633146118af5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b031683836040516118ca91906132a1565b60006040518083038185875af1925050503d8060008114611907576040519150601f19603f3d011682016040523d82523d6000602084013e61190c565b606091505b5050905080611547576040516322092f2f60e11b815260040160405180910390fd5b6000546001600160a01b031633146119595760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b031633146119d85760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611a955760405163c383977560e01b815260040160405180910390fd5b60006002886001600160601b031681548110611ab357611ab361302e565b60009182526020909120600b9091020160028101879055805460ff60601b1916600160601b8915150217815560038101869055600480820186905560058201859055909150611b0890600683019084906128a9565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611b4c96959493929190613255565b60405180910390a25050505050505050565b611b8b6040518060600160405280600081526020016000815260200160006001600160a01b031681525090565b60038381548110611b9e57611b9e61302e565b90600052602060002090600302016002018281548110611bc057611bc061302e565b6000918252602091829020604080516060810182526003909302909101805483526001810154938301939093526002909201546001600160a01b031691810191909152905092915050565b6000611c16826120b0565b341015611c3657604051630e3360f160e21b815260040160405180910390fd5b610d458383600034612222565b60008060038381548110611c5957611c5961302e565b600091825260208220600390910201805460028054929450916001600160601b03909116908110611c8c57611c8c61302e565b90600052602060002090600b0201905080600401548260020160018460020180549050611cb9919061305a565b81548110611cc957611cc961302e565b906000526020600020906003020160000154611ce59190613083565b949350505050565b6000611ce58261034986868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120b092505050565b611d3c8482610834565b341015611d5c57604051633191f8f160e01b815260040160405180910390fd5b600060038581548110611d7157611d7161302e565b6000918252602080832060039092029091018054600160601b90046001600160a01b0390811684526005909252604090922054919250163314611dc7576040516301627e2760e61b815260040160405180910390fd5b6003600182015460ff166004811115611de257611de2612cbd565b14611e00576040516337cdefcb60e21b815260040160405180910390fd5b80546001600160601b03168215611eb2576002816001600160601b031681548110611e2d57611e2d61302e565b60009182526020909120600b909102015482546001600160601b039182169250168114611eb257815460028301546001600160601b0390911690611e739060019061305a565b6040516001600160601b038416815288907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b81546001600160601b0319166001600160601b0382161782556001808301805460ff191690556002830180549182018155600090815260208120346003909302019182558354604051600160601b9091046001600160a01b03169189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a3867f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051611f6491906132d0565b60405180910390a2611f768787612317565b50505050505050565b6000546001600160a01b03163314611faa5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526004602052604081205460ff166120055760405163e51cf7bf60e01b815260040160405180910390fd5b612010858585611ced565b82101561203057604051630e3360f160e21b815260040160405180910390fd5b6120456001600160a01b0384163330856126bc565b612062576040516312171d8360e31b815260040160405180910390fd5b6120a68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506122229050565b9695505050505050565b60008060006120be84612798565b5091509150806002836001600160601b0316815481106120e0576120e061302e565b90600052602060002090600b020160040154611ce59190613097565b6000600382815481106121115761211161302e565b600091825260209091206002600390920201015492915050565b6000546001600160a01b031633146121565760405163c383977560e01b815260040160405180910390fd5b50565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516121b691906132a1565b6000604051808303816000865af19150503d80600081146121f3576040519150601f19603f3d011682016040523d82523d6000602084013e6121f8565b606091505b50915091508180156120a65750805115806120a65750808060200190518101906120a691906132de565b60008061222e85612798565b505060038054600180820183556001600160601b03841633600160601b02177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8385029081019182557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d018054928301815560009081526020902091909302018681556002810180546001600160a01b0319166001600160a01b038a16179055909450919250906122df8489612317565b604051339085907f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a3505050949350505050565b60006003838154811061232c5761232c61302e565b90600052602060002090600302019050600060018260020180549050612352919061305a565b8254600160601b90046001600160a01b03166000908152600660205260408120919250815460ff16600381111561238b5761238b612cbd565b036123a95760405163d8f2465160e01b815260040160405180910390fd5b6001815460ff1660038111156123c1576123c1612cbd565b146126b5576003815460ff1660038111156123de576123de612cbd565b0361252d578460038454600184015460028501546040805192835260ff80831615156020850152610100909204909116151590820152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a46001810154600282015460405163085dd1c360e21b815260048101889052602481019290925260ff8082161515604484015261010090910416151560648201523090632177470c90608401600060405180830381600087803b1580156124b857600080fd5b505af11580156124cc573d6000803e3d6000fd5b5050604051632b00f57560e11b81526004810188905260248101859052309250635601eaea9150604401600060405180830381600087803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b505050506126b5565b6002815460ff16600381111561254557612545612cbd565b036126b55760008461255860014361305a565b6040805191406020830152016040516020818303038152906040528051906020012060001c61258791906132fb565b90506004811615600280831615908890875460408051878152861515602082015285151591810191909152600160601b9091046001600160a01b0316907f45c27c7ea7135714f09b069efa7497d57c38017d4e919c5535ba31dbd5b597e69060600160405180910390a460405163085dd1c360e21b81526004810189905260248101849052821515604482015281151560648201523090632177470c90608401600060405180830381600087803b15801561264157600080fd5b505af1158015612655573d6000803e3d6000fd5b5050604051632b00f57560e11b8152600481018b905260248101889052309250635601eaea9150604401600060405180830381600087803b15801561269957600080fd5b505af11580156126ad573d6000803e3d6000fd5b505050505050505b5050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161272191906132a1565b6000604051808303816000865af19150503d806000811461275e576040519150601f19603f3d011682016040523d82523d6000602084013e612763565b606091505b509150915081801561278d57508051158061278d57508080602001905181019061278d91906132de565b979650505050505050565b600080600060408451106127fe575050506020810151604082015160608301516001600160601b03831615806127d957506002546001600160601b03841610155b156127e357600192505b816000036127f057600391505b806127f9575060015b610d71565b50600193600393508492509050565b828054828255906000526020600020908101928215612848579160200282015b8281111561284857825182559160200191906001019061282d565b506128549291506128d6565b5090565b8260048101928215612848579160200282015b82811115612848578251829060ff1690559160200191906001019061286b565b60405180608001604052806004906020820280368337509192915050565b8260048101928215612848579160200282018281111561284857825182559160200191906001019061282d565b5b8082111561285457600081556001016128d7565b6001600160a01b038116811461215657600080fd5b60006020828403121561291257600080fd5b813561291d816128eb565b9392505050565b801515811461215657600080fd5b6000806040838503121561294557600080fd5b82359150602083013561295781612924565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298957600080fd5b604051608081018181106001600160401b03821117156129ab576129ab612962565b6040528060808401858111156129c057600080fd5b845b818110156129da5780358352602092830192016129c2565b509195945050505050565b600080600060c084860312156129fa57600080fd5b8335612a05816128eb565b92506020840135612a15816128eb565b9150612a248560408601612978565b90509250925092565b60008060408385031215612a4057600080fd5b8235612a4b816128eb565b946020939093013593505050565b600060208284031215612a6b57600080fd5b5035919050565b60008060008060808587031215612a8857600080fd5b84359350602085013592506040850135612aa181612924565b91506060850135612ab181612924565b939692955090935050565b80356001600160601b0381168114612ad357600080fd5b919050565b600060208284031215612aea57600080fd5b610d4582612abc565b8060005b6004811015611547578151845260209384019390910190600101612af7565b60808101610d488284612af3565b6000806000806000806000610140888a031215612b4057600080fd5b612b4988612abc565b96506020880135612b5981612924565b955060408801359450606088013593506080880135925060a08801359150612b848960c08a01612978565b905092959891949750929550565b60008060408385031215612ba557600080fd5b8235612bb0816128eb565b91506020830135612957816128eb565b600082601f830112612bd157600080fd5b81356001600160401b0380821115612beb57612beb612962565b604051601f8301601f19908116603f01168101908282118183101715612c1357612c13612962565b81604052838152866020858801011115612c2c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c5f57600080fd5b8235612c6a816128eb565b915060208301356001600160401b03811115612c8557600080fd5b612c9185828601612bc0565b9150509250929050565b60008060408385031215612cae57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612ce357612ce3612cbd565b9052565b6001600160601b03851681526001600160a01b038416602082015260808101612d136040830185612cd3565b821515606083015295945050505050565b60008060008060808587031215612d3a57600080fd5b8435612d45816128eb565b9350602085013592506040850135612aa181612924565b600080600060608486031215612d7157600080fd5b8335612d7c816128eb565b92506020840135915060408401356001600160401b03811115612d9e57600080fd5b612daa86828701612bc0565b9150509250925092565b60008060408385031215612dc757600080fd5b8235612dd2816128eb565b9150602083013561295781612924565b600080600060608486031215612df757600080fd5b8335612e02816128eb565b925060208401356001600160401b0381168114612e1e57600080fd5b9150604084013560ff81168114612e3457600080fd5b809150509250925092565b60008060408385031215612e5257600080fd5b8235915060208301356001600160401b03811115612c8557600080fd5b60008083601f840112612e8157600080fd5b5081356001600160401b03811115612e9857600080fd5b602083019150836020828501011115612eb057600080fd5b9250929050565b600080600060408486031215612ecc57600080fd5b83356001600160401b03811115612ee257600080fd5b612eee86828701612e6f565b9094509250506020840135612e34816128eb565b60008060008060808587031215612f1857600080fd5b843593506020850135925060408501356001600160401b03811115612f3c57600080fd5b612f4887828801612bc0565b9250506060850135612ab181612924565b60048110612ce357612ce3612cbd565b60808101612f778287612f59565b602082019490945291151560408301521515606090910152919050565b600080600080600060808688031215612fac57600080fd5b8535945060208601356001600160401b03811115612fc957600080fd5b612fd588828901612e6f565b9095509350506040860135612fe9816128eb565b949793965091946060013592915050565b60006020828403121561300c57600080fd5b81356001600160401b0381111561302257600080fd5b611ce584828501612bc0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610d4857610d48613044565b634e487b7160e01b600052601260045260246000fd5b6000826130925761309261306d565b500490565b8082028115828204841417610d4857610d48613044565b80820180821115610d4857610d48613044565b6000610120820190508715158252602087602084015286604084015285606084015284608084015260a083018460005b600481101561310e578154835291830191600191820191016130f1565b50505050979650505050505050565b60006080820190506131338260ff855416612f59565b60018301546020830152600283015460ff81161515604084015260ff8160081c16151560608401525092915050565b600181815b8085111561319d57816000190482111561318357613183613044565b8085161561319057918102915b93841c9390800290613167565b509250929050565b6000826131b457506001610d48565b816131c157506000610d48565b81600181146131d757600281146131e1576131fd565b6001915050610d48565b60ff8411156131f2576131f2613044565b50506001821b610d48565b5060208310610133831016604e8410600b8410161715613220575081810a610d48565b61322a8383613162565b806000190482111561323e5761323e613044565b029392505050565b6000610d4560ff8416836131a5565b600061012082019050871515825286602083015285604083015284606083015283608083015261278d60a0830184612af3565b60006020828403121561329a57600080fd5b5051919050565b6000825160005b818110156132c257602081860181015185830152016132a8565b506000920191825250919050565b60208101610d488284612cd3565b6000602082840312156132f057600080fd5b815161291d81612924565b60008261330a5761330a61306d565b50069056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212204bcdc26480adc94ceb9c089d1af202275da9840934fdb8dead13e3defee11c1164736f6c63430008180033", + "devdoc": { + "errors": { + "AlreadyInitialized()": [ + { + "details": "The contract is already initialized." + } + ], + "NotInitializing()": [ + { + "details": "The contract is not initializing." + } + ], + "UUPSUnauthorizedCallContext()": [ + { + "details": "The call is from an unauthorized context." + } + ], + "UUPSUnsupportedProxiableUUID(bytes32)": [ + { + "details": "The storage `slot` is unsupported as a UUID." + } + ] + }, + "events": { + "AcceptedFeeToken(address,bool)": { + "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", + "params": { + "_accepted": "Whether the token is accepted or not.", + "_token": "The ERC20 token." + } + }, + "DisputeCreation(uint256,address)": { + "details": "To be emitted when a dispute is created.", + "params": { + "_arbitrable": "The contract which created the dispute.", + "_disputeID": "The identifier of the dispute in the Arbitrator contract." + } + }, + "Initialized(uint64)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "NewCurrencyRate(address,uint64,uint8)": { + "details": "To be emitted when the fee for a particular ERC20 token is updated.", + "params": { + "_feeToken": "The ERC20 token.", + "_rateDecimals": "The new decimals of the fee token rate.", + "_rateInEth": "The new rate of the fee token in ETH." + } + }, + "Ruling(address,uint256,uint256)": { + "details": "To be raised when a ruling is given.", + "params": { + "_arbitrable": "The arbitrable receiving the ruling.", + "_disputeID": "The identifier of the dispute in the Arbitrator contract.", + "_ruling": "The ruling which was given." + } + }, + "Upgraded(address)": { + "params": { + "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." + } + } + }, + "kind": "dev", + "methods": { + "appeal(uint256,uint256,bytes,bool)": { + "details": "Appeals the ruling of a specified dispute.", + "params": { + "_disputeID": "The ID of the dispute.", + "_jump": "Whether to jump to the parent court or not." + } + }, + "appealCost(uint256,bool)": { + "details": "Gets the cost of appealing a specified dispute.", + "params": { + "_disputeID": "The ID of the dispute.", + "_jump": "Whether to jump to the parent court or not." + }, + "returns": { + "cost": "The appeal cost." + } + }, + "arbitrationCost(bytes)": { + "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", + "params": { + "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." + }, + "returns": { + "cost": "The arbitration cost in ETH." + } + }, + "arbitrationCost(bytes,address)": { + "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", + "params": { + "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", + "_feeToken": "The ERC20 token used to pay fees." + }, + "returns": { + "cost": "The arbitration cost in `_feeToken`." + } + }, + "changeAcceptedFeeTokens(address,bool)": { + "details": "Changes the supported fee tokens.", + "params": { + "_accepted": "Whether the token is supported or not as a method of fee payment.", + "_feeToken": "The fee token." + } + }, + "changeCurrencyRates(address,uint64,uint8)": { + "details": "Changes the currency rate of a fee token.", + "params": { + "_feeToken": "The fee token.", + "_rateDecimals": "The new decimals of the fee token rate.", + "_rateInEth": "The new rate of the fee token in ETH." + } + }, + "changeGovernor(address)": { + "details": "Changes the `governor` storage variable.", + "params": { + "_governor": "The new value for the `governor` storage variable." + } + }, + "changePinakion(address)": { + "details": "Changes the `pinakion` storage variable.", + "params": { + "_pinakion": "The new value for the `pinakion` storage variable." + } + }, + "constructor": { + "details": "Constructor, initializing the implementation to reduce attack surface." + }, + "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4])": { + "details": "Creates a court under a specified parent court.", + "params": { + "_alpha": "The `alpha` property value of the court.", + "_feeForJuror": "The `feeForJuror` property value of the court.", + "_hiddenVotes": "The `hiddenVotes` property value of the court.", + "_jurorsForCourtJump": "The `jurorsForCourtJump` property value of the court.", + "_minStake": "The `minStake` property value of the court.", + "_parent": "The `parent` property value of the court.", + "_timesPerPeriod": "The `timesPerPeriod` property value of the court." + } + }, + "createDispute(uint256,bytes)": { + "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", + "params": { + "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", + "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." + }, + "returns": { + "disputeID": "The identifier of the dispute created." + } + }, + "createDispute(uint256,bytes,address,uint256)": { + "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", + "params": { + "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", + "_feeAmount": "Amount of the ERC20 token used to pay fees.", + "_feeToken": "The ERC20 token used to pay fees.", + "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." + }, + "returns": { + "disputeID": "The identifier of the dispute created." + } + }, + "currentRuling(uint256)": { + "details": "Gets the current ruling of a specified dispute.", + "params": { + "_disputeID": "The ID of the dispute." + }, + "returns": { + "overridden": "Whether the ruling was overridden by appeal funding or not.", + "ruling": "The current ruling.", + "tied": "Whether it's a tie or not." + } + }, + "execute(uint256,uint256)": { + "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", + "params": { + "_disputeID": "The ID of the dispute.", + "_round": "The appeal round." + } + }, + "executeGovernorProposal(address,uint256,bytes)": { + "details": "Allows the governor to call anything on behalf of the contract.", + "params": { + "_amount": "The value sent with the call.", + "_data": "The data sent with the call.", + "_destination": "The destination of the call." + } + }, + "executeRuling(uint256,uint256,bool,bool)": { + "details": "Executes a specified dispute's ruling.", + "params": { + "_disputeID": "The ID of the dispute." + } + }, + "getNumberOfVotes(uint256)": { + "details": "Gets the number of votes permitted for the specified dispute in the latest round.", + "params": { + "_disputeID": "The ID of the dispute." + } + }, + "initialize(address,address,uint256[4])": { + "details": "Initializer (constructor equivalent for upgradable contracts).", + "params": { + "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", + "_governor": "The governor's address.", + "_pinakion": "The address of the token contract." + } + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", + "params": { + "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", + "newImplementation": "Address of the new implementation contract." + } + } + }, + "title": "KlerosCoreRuler Core arbitrator contract for development and testing purposes.", + "version": 1 + }, + "userdoc": { + "errors": { + "FailedDelegateCall()": [ + { + "notice": "Failed Delegated call" + } + ], + "InvalidImplementation(address)": [ + { + "notice": "The `implementation` is not UUPS-compliant" + } + ] + }, + "events": { + "Upgraded(address)": { + "notice": "Emitted when the `implementation` has been successfully upgraded." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 16346, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "governor", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 16349, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "pinakion", + "offset": 0, + "slot": "1", + "type": "t_contract(IERC20)1755" + }, + { + "astId": 16353, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "courts", + "offset": 0, + "slot": "2", + "type": "t_array(t_struct(Court)16297_storage)dyn_storage" + }, + { + "astId": 16357, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "disputes", + "offset": 0, + "slot": "3", + "type": "t_array(t_struct(Dispute)16312_storage)dyn_storage" + }, + { + "astId": 16363, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "currencyRates", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)16327_storage)" + }, + { + "astId": 16368, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rulers", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_contract(IArbitrableV2)21759,t_address)" + }, + { + "astId": 16374, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "settings", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_contract(IArbitrableV2)21759,t_struct(RulerSettings)16275_storage)" + }, + { + "astId": 16379, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rulingResults", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_struct(RulingResult)16334_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Court)16297_storage)dyn_storage": { + "base": "t_struct(Court)16297_storage", + "encoding": "dynamic_array", + "label": "struct KlerosCoreRuler.Court[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Dispute)16312_storage)dyn_storage": { + "base": "t_struct(Dispute)16312_storage", + "encoding": "dynamic_array", + "label": "struct KlerosCoreRuler.Dispute[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Round)16320_storage)dyn_storage": { + "base": "t_struct(Round)16320_storage", + "encoding": "dynamic_array", + "label": "struct KlerosCoreRuler.Round[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)4_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[4]", + "numberOfBytes": "128" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IArbitrableV2)21759": { + "encoding": "inplace", + "label": "contract IArbitrableV2", + "numberOfBytes": "20" + }, + "t_contract(IERC20)1755": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_enum(Period)16265": { + "encoding": "inplace", + "label": "enum KlerosCoreRuler.Period", + "numberOfBytes": "1" + }, + "t_enum(RulingMode)16259": { + "encoding": "inplace", + "label": "enum KlerosCoreRuler.RulingMode", + "numberOfBytes": "1" + }, + "t_mapping(t_contract(IArbitrableV2)21759,t_address)": { + "encoding": "mapping", + "key": "t_contract(IArbitrableV2)21759", + "label": "mapping(contract IArbitrableV2 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_contract(IArbitrableV2)21759,t_struct(RulerSettings)16275_storage)": { + "encoding": "mapping", + "key": "t_contract(IArbitrableV2)21759", + "label": "mapping(contract IArbitrableV2 => struct KlerosCoreRuler.RulerSettings)", + "numberOfBytes": "32", + "value": "t_struct(RulerSettings)16275_storage" + }, + "t_mapping(t_contract(IERC20)1755,t_struct(CurrencyRate)16327_storage)": { + "encoding": "mapping", + "key": "t_contract(IERC20)1755", + "label": "mapping(contract IERC20 => struct KlerosCoreRuler.CurrencyRate)", + "numberOfBytes": "32", + "value": "t_struct(CurrencyRate)16327_storage" + }, + "t_mapping(t_uint256,t_struct(RulingResult)16334_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct KlerosCoreRuler.RulingResult)", + "numberOfBytes": "32", + "value": "t_struct(RulingResult)16334_storage" + }, + "t_struct(Court)16297_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.Court", + "members": [ + { + "astId": 16277, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "parent", + "offset": 0, + "slot": "0", + "type": "t_uint96" + }, + { + "astId": 16279, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "hiddenVotes", + "offset": 12, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 16282, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "children", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 16284, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "minStake", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 16286, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "alpha", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 16288, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "feeForJuror", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 16290, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "jurorsForCourtJump", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 16294, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "timesPerPeriod", + "offset": 0, + "slot": "6", + "type": "t_array(t_uint256)4_storage" + }, + { + "astId": 16296, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "disabled", + "offset": 0, + "slot": "10", + "type": "t_bool" + } + ], + "numberOfBytes": "352" + }, + "t_struct(CurrencyRate)16327_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.CurrencyRate", + "members": [ + { + "astId": 16322, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "feePaymentAccepted", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 16324, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rateInEth", + "offset": 1, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 16326, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rateDecimals", + "offset": 9, + "slot": "0", + "type": "t_uint8" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Dispute)16312_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.Dispute", + "members": [ + { + "astId": 16299, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "courtID", + "offset": 0, + "slot": "0", + "type": "t_uint96" + }, + { + "astId": 16302, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "arbitrated", + "offset": 12, + "slot": "0", + "type": "t_contract(IArbitrableV2)21759" + }, + { + "astId": 16305, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "period", + "offset": 0, + "slot": "1", + "type": "t_enum(Period)16265" + }, + { + "astId": 16307, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "ruled", + "offset": 1, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 16311, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rounds", + "offset": 0, + "slot": "2", + "type": "t_array(t_struct(Round)16320_storage)dyn_storage" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Round)16320_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.Round", + "members": [ + { + "astId": 16314, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "totalFeesForJurors", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 16316, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "sumFeeRewardPaid", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 16319, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "feeToken", + "offset": 0, + "slot": "2", + "type": "t_contract(IERC20)1755" + } + ], + "numberOfBytes": "96" + }, + "t_struct(RulerSettings)16275_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.RulerSettings", + "members": [ + { + "astId": 16268, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "rulingMode", + "offset": 0, + "slot": "0", + "type": "t_enum(RulingMode)16259" + }, + { + "astId": 16270, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "presetRuling", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 16272, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "presetTied", + "offset": 0, + "slot": "2", + "type": "t_bool" + }, + { + "astId": 16274, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "presetOverridden", + "offset": 1, + "slot": "2", + "type": "t_bool" + } + ], + "numberOfBytes": "96" + }, + "t_struct(RulingResult)16334_storage": { + "encoding": "inplace", + "label": "struct KlerosCoreRuler.RulingResult", + "members": [ + { + "astId": 16329, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "ruling", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 16331, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "tied", + "offset": 0, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 16333, + "contract": "src/arbitration/devtools/KlerosCoreRuler.sol:KlerosCoreRuler", + "label": "overridden", + "offset": 1, + "slot": "1", + "type": "t_bool" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + } +} diff --git a/contracts/deployments/arbitrum/KlerosCoreRulerNeo_Proxy.json b/contracts/deployments/arbitrum/KlerosCoreRulerNeo_Proxy.json new file mode 100644 index 000000000..89a258aaa --- /dev/null +++ b/contracts/deployments/arbitrum/KlerosCoreRulerNeo_Proxy.json @@ -0,0 +1,95 @@ +{ + "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "transactionIndex": 2, + "gasUsed": "314451", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100004000000000000000000000000000060008000000000000000000000000220000000000000000000800000080000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d", + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 286701284, + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "topics": [ + "0x0c907a651f88974ed0d9423aacc8b998c40eedf39920e2c3bdae0adcc486a761", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 0, + "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" + }, + { + "transactionIndex": 2, + "blockNumber": 286701284, + "transactionHash": "0x467a826ff2b4ec23bed9936441307123e1609acf8ce0cf70f4fffe7c2d25671f", + "address": "0xc0169e0B19aE02ac4fADD689260CF038726DFE13", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 1, + "blockHash": "0x905e9059a1f41a82e3c5c67e027ff256285596bc1cef98acdbd330f043a8a44d" + } + ], + "blockNumber": 286701284, + "cumulativeGasUsed": "348983", + "status": 1, + "byzantium": true + }, + "args": [ + "0x85093b5EDa4F2e2E2fEDae34Da91239D6a08e324", + "0x05d3177d000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000010" + ], + "numDeployments": 1, + "solcInputHash": "072c3d36aa3704de09a27a044cf00231", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreRulerProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxy\\n * @author Simon Malatrait \\n * @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n * @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n * @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n */\\ncontract UUPSProxy {\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n * NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212205e24db8a42d0caaa77ce845dfb341502dc3b700c5ccf0c51c4cf914535a4a64564736f6c63430008180033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/web-devtools/src/app/(main)/dispute-template/FetchDisputeRequestInput.tsx b/web-devtools/src/app/(main)/dispute-template/FetchDisputeRequestInput.tsx index bf5f75272..a14d08133 100644 --- a/web-devtools/src/app/(main)/dispute-template/FetchDisputeRequestInput.tsx +++ b/web-devtools/src/app/(main)/dispute-template/FetchDisputeRequestInput.tsx @@ -45,19 +45,9 @@ const StyledA = styled.a` const presets = [ { - title: "Escrow", - txnHash: "0x2565b756e500240544f7fc36f938462c7efbbd2e343c57979f81fecdf1054e23", - chainId: 421614, - }, - { - title: "Curated Lists", - txnHash: "0xa7981830bf8144ab2070f3a639bd36b204c4c48ee1fafef66abaf60272418ed4", - chainId: 421614, - }, - { - title: "Trump-Harris", - txnHash: "0x86db91678cf3f8c4503e37340cf2cd93bffcba84f9c43a98c090f6a4c76d8793", - chainId: 421614, + title: "Dispute Resolver - Compensation Claim", + txnHash: "0x01db1d330acef1a0df007b0f9dcb56b7a88aeb49687f95cb5c58d5c36526ef70", + chainId: 42161, }, ]; diff --git a/web-devtools/src/consts/chains.ts b/web-devtools/src/consts/chains.ts index 23afcf66a..0a22df36f 100644 --- a/web-devtools/src/consts/chains.ts +++ b/web-devtools/src/consts/chains.ts @@ -1,13 +1,16 @@ -import { type Chain, mainnet, arbitrumSepolia, gnosisChiado } from "viem/chains"; +import { type Chain, mainnet, arbitrumSepolia, gnosisChiado, arbitrum, gnosis } from "viem/chains"; + +import { isProductionDeployment } from "./index"; + +export const DEFAULT_CHAIN = isProductionDeployment() ? arbitrum.id : arbitrumSepolia.id; export const SUPPORTED_CHAINS: Record = { - [arbitrumSepolia.id]: arbitrumSepolia, + [isProductionDeployment() ? arbitrum.id : arbitrumSepolia.id]: isProductionDeployment() ? arbitrum : arbitrumSepolia, }; export const QUERY_CHAINS: Record = { - [gnosisChiado.id]: gnosisChiado, + [isProductionDeployment() ? gnosis.id : gnosisChiado.id]: isProductionDeployment() ? gnosis : gnosisChiado, [mainnet.id]: mainnet, }; export const ALL_CHAINS = [...Object.values(SUPPORTED_CHAINS), ...Object.values(QUERY_CHAINS)]; -export const DEFAULT_CHAIN = arbitrumSepolia.id; diff --git a/web-devtools/src/context/Web3Provider.tsx b/web-devtools/src/context/Web3Provider.tsx index 4e2651a18..cb25b691e 100644 --- a/web-devtools/src/context/Web3Provider.tsx +++ b/web-devtools/src/context/Web3Provider.tsx @@ -6,7 +6,8 @@ import { createConfig, fallback, http, WagmiProvider, webSocket } from "wagmi"; import { mainnet, arbitrumSepolia, arbitrum, gnosisChiado, sepolia, gnosis } from "wagmi/chains"; import { walletConnect } from "wagmi/connectors"; -import { ALL_CHAINS } from "consts/chains"; +import { ALL_CHAINS, DEFAULT_CHAIN } from "consts/chains"; +import { isProductionDeployment } from "consts/index"; import { theme } from "styles/Theme"; @@ -15,6 +16,8 @@ if (!alchemyApiKey) { throw new Error("Alchemy API key is not set in NEXT_PUBLIC_ALCHEMY_API_KEY environment variable."); } +const isProduction = isProductionDeployment(); + // https://github.com/alchemyplatform/alchemy-sdk-js/blob/c4440cb/src/types/types.ts#L98-L153 const alchemyToViemChain: Record = { [arbitrumSepolia.id]: "arb-sepolia", @@ -36,12 +39,27 @@ function alchemyURL(protocol: AlchemyProtocol, chainId: number): string { return `${protocol}://${network}.g.alchemy.com/v2/${alchemyApiKey}`; } +export const getChainRpcUrl = (protocol: AlchemyProtocol, chainId: number) => { + return alchemyURL(protocol, chainId); +}; + +export const getDefaultChainRpcUrl = (protocol: AlchemyProtocol) => { + return getChainRpcUrl(protocol, DEFAULT_CHAIN); +}; + export const getTransports = () => { const alchemyTransport = (chain: Chain) => fallback([http(alchemyURL("https", chain.id)), webSocket(alchemyURL("wss", chain.id))]); + const defaultTransport = (chain: Chain) => + fallback([http(chain.rpcUrls.default?.http?.[0]), webSocket(chain.rpcUrls.default?.webSocket?.[0])]); return { - [arbitrumSepolia.id]: alchemyTransport(arbitrumSepolia), + [isProduction ? arbitrum.id : arbitrumSepolia.id]: isProduction + ? alchemyTransport(arbitrum) + : alchemyTransport(arbitrumSepolia), + [isProduction ? gnosis.id : gnosisChiado.id]: isProduction + ? defaultTransport(gnosis) + : defaultTransport(gnosisChiado), [mainnet.id]: alchemyTransport(mainnet), // Always enabled for ENS resolution }; }; @@ -63,7 +81,7 @@ const wagmiConfig = createConfig({ createWeb3Modal({ wagmiConfig, projectId, - defaultChain: arbitrumSepolia, + defaultChain: isProduction ? arbitrum : arbitrumSepolia, themeVariables: { "--w3m-color-mix": theme.klerosUIComponentsPrimaryPurple, "--w3m-color-mix-strength": 20, diff --git a/web-devtools/wagmi.config.ts b/web-devtools/wagmi.config.ts index 1391f0b5b..ce00ca961 100644 --- a/web-devtools/wagmi.config.ts +++ b/web-devtools/wagmi.config.ts @@ -4,13 +4,13 @@ import { parse, join } from "path"; import { type Config, type ContractConfig, defineConfig } from "@wagmi/cli"; import { react, actions } from "@wagmi/cli/plugins"; import dotenv from "dotenv"; -import { Abi, Chain } from "viem"; +import { type Chain, type Abi } from "viem"; +import { arbitrum, arbitrumSepolia, gnosis, gnosisChiado, mainnet, sepolia } from "viem/chains"; import IArbitrableV2 from "@kleros/kleros-v2-contracts/artifacts/src/arbitration/interfaces/IArbitrableV2.sol/IArbitrableV2.json" with { type: "json" }; import IHomeGateway from "@kleros/kleros-v2-contracts/artifacts/src/gateway/interfaces/IHomeGateway.sol/IHomeGateway.json" with { type: "json" }; import { ArbitratorTypes, getArbitratorType } from "./src/consts/arbitratorTypes"; -import { arbitrum, arbitrumSepolia, gnosis, gnosisChiado, mainnet, sepolia } from "viem/chains"; dotenv.config(); @@ -27,7 +27,14 @@ const readArtifacts = async (type: ArbitratorTypes, viemChainName: string, hardh type === ArbitratorTypes.vanilla ? "" : ArbitratorTypes[type].toString().charAt(0).toUpperCase() + ArbitratorTypes[type].toString().slice(1); - const vanillaArtifacts = ["KlerosCore", "DisputeKitClassic", "SortitionModule", "DisputeResolver", "KlerosCoreRuler"]; + const vanillaArtifacts = [ + "KlerosCore", + "DisputeKitClassic", + "SortitionModule", + "DisputeResolver", + "KlerosCoreRuler", + "DisputeResolverRuler", + ]; const typeSpecificArtifacts = vanillaArtifacts.map((artifact) => `${artifact}${artifactSuffix}`); const chainMap: Record = { diff --git a/web/src/context/Web3Provider.tsx b/web/src/context/Web3Provider.tsx index 342ac5ed9..138525a56 100644 --- a/web/src/context/Web3Provider.tsx +++ b/web/src/context/Web3Provider.tsx @@ -3,7 +3,7 @@ import React from "react"; import { createWeb3Modal } from "@web3modal/wagmi/react"; import { type Chain } from "viem"; import { createConfig, fallback, http, WagmiProvider, webSocket } from "wagmi"; -import { mainnet, arbitrumSepolia, arbitrum, gnosisChiado, gnosis, sepolia } from "wagmi/chains"; +import { mainnet, arbitrumSepolia, arbitrum, gnosisChiado, sepolia, gnosis } from "wagmi/chains"; import { walletConnect } from "wagmi/connectors"; import { configureSDK } from "@kleros/kleros-sdk/src/sdk"; @@ -13,22 +13,33 @@ import { isProductionDeployment } from "consts/index"; import { lightTheme } from "styles/themes"; -const alchemyApiKey = import.meta.env.ALCHEMY_API_KEY ?? ""; +const alchemyApiKey = import.meta.env.ALCHEMY_API_KEY; +if (!alchemyApiKey) { + throw new Error("Alchemy API key is not set in ALCHEMY_API_KEY environment variable."); +} + const isProduction = isProductionDeployment(); -// https://github.com/alchemyplatform/alchemy-sdk-js/blob/96b3f62/src/types/types.ts#L98-L119 -const alchemyToViemChain = { - [arbitrum.id]: "arb-mainnet", +// https://github.com/alchemyplatform/alchemy-sdk-js/blob/c4440cb/src/types/types.ts#L98-L153 +const alchemyToViemChain: Record = { [arbitrumSepolia.id]: "arb-sepolia", + [arbitrum.id]: "arb-mainnet", [mainnet.id]: "eth-mainnet", [sepolia.id]: "eth-sepolia", + [gnosis.id]: "gnosis-mainnet", + [gnosisChiado.id]: "gnosis-chiado", }; type AlchemyProtocol = "https" | "wss"; -// https://github.com/alchemyplatform/alchemy-sdk-js/blob/96b3f62/src/util/const.ts#L16-L18 -const alchemyURL = (protocol: AlchemyProtocol, chainId: number) => - `${protocol}://${alchemyToViemChain[chainId]}.g.alchemy.com/v2/${alchemyApiKey}`; +// https://github.com/alchemyplatform/alchemy-sdk-js/blob/c4440cb/src/util/const.ts#L16-L18 +function alchemyURL(protocol: AlchemyProtocol, chainId: number): string { + const network = alchemyToViemChain[chainId]; + if (!network) { + throw new Error(`Unsupported chain ID: ${chainId}`); + } + return `${protocol}://${network}.g.alchemy.com/v2/${alchemyApiKey}`; +} export const getChainRpcUrl = (protocol: AlchemyProtocol, chainId: number) => { return alchemyURL(protocol, chainId); @@ -57,7 +68,12 @@ export const getTransports = () => { const chains = ALL_CHAINS as [Chain, ...Chain[]]; const transports = getTransports(); -const projectId = import.meta.env.WALLETCONNECT_PROJECT_ID ?? ""; + +const projectId = import.meta.env.WALLETCONNECT_PROJECT_ID; +if (!projectId) { + throw new Error("WalletConnect project ID is not set in WALLETCONNECT_PROJECT_ID environment variable."); +} + const wagmiConfig = createConfig({ chains, transports, @@ -74,7 +90,7 @@ configureSDK({ createWeb3Modal({ wagmiConfig, projectId, - defaultChain: isProductionDeployment() ? arbitrum : arbitrumSepolia, + defaultChain: isProduction ? arbitrum : arbitrumSepolia, themeVariables: { "--w3m-color-mix": lightTheme.primaryPurple, "--w3m-color-mix-strength": 20,