Feature Tip: Add private address tag to any address under My Name Tag !
Version 1 of the Kleros Court contract, Athena Release. Submitted by Kleros Curate.
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 15,924 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Stake | 20622273 | 2 days ago | IN | 0 ETH | 0.0007464 | ||||
Pass Phase | 20572534 | 9 days ago | IN | 0 ETH | 0.00008447 | ||||
Set Stake | 20562888 | 11 days ago | IN | 0 ETH | 0.0006631 | ||||
Set Stake | 20557915 | 11 days ago | IN | 0 ETH | 0.00013842 | ||||
Set Stake | 20528295 | 16 days ago | IN | 0 ETH | 0.00103914 | ||||
Set Stake | 20527518 | 16 days ago | IN | 0 ETH | 0.00089212 | ||||
Set Stake | 20527480 | 16 days ago | IN | 0 ETH | 0.00113325 | ||||
Set Stake | 20511661 | 18 days ago | IN | 0 ETH | 0.00044279 | ||||
Set Stake | 20505551 | 19 days ago | IN | 0 ETH | 0.00080977 | ||||
Set Stake | 20505550 | 19 days ago | IN | 0 ETH | 0.00089505 | ||||
Set Stake | 20477736 | 23 days ago | IN | 0 ETH | 0.00148871 | ||||
Set Stake | 20474972 | 23 days ago | IN | 0 ETH | 0.00019151 | ||||
Set Stake | 20471857 | 23 days ago | IN | 0 ETH | 0.00178373 | ||||
Set Stake | 20471833 | 23 days ago | IN | 0 ETH | 0.00074247 | ||||
Set Stake | 20461916 | 25 days ago | IN | 0 ETH | 0.00185932 | ||||
Set Stake | 20461268 | 25 days ago | IN | 0 ETH | 0.00271216 | ||||
Set Stake | 20451086 | 26 days ago | IN | 0 ETH | 0.00010784 | ||||
Set Stake | 20438837 | 28 days ago | IN | 0 ETH | 0.00050879 | ||||
Set Stake | 20407254 | 32 days ago | IN | 0 ETH | 0.00036666 | ||||
Set Stake | 20406062 | 33 days ago | IN | 0 ETH | 0.00026611 | ||||
Set Stake | 20397457 | 34 days ago | IN | 0 ETH | 0.00012873 | ||||
Set Stake | 20380499 | 36 days ago | IN | 0 ETH | 0.00049948 | ||||
Set Stake | 20380451 | 36 days ago | IN | 0 ETH | 0.00141132 | ||||
Set Stake | 20380342 | 36 days ago | IN | 0 ETH | 0.00137251 | ||||
Set Stake | 20370597 | 38 days ago | IN | 0 ETH | 0.00220185 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
20642494 | 1 hr ago | 0 ETH | |||||
20642309 | 2 hrs ago | 0 ETH | |||||
20642309 | 2 hrs ago | 0 ETH | |||||
20642283 | 2 hrs ago | 0 ETH | |||||
20642283 | 2 hrs ago | 0 ETH | |||||
20642156 | 2 hrs ago | 0 ETH | |||||
20642156 | 2 hrs ago | 0 ETH | |||||
20642144 | 2 hrs ago | 0 ETH | |||||
20642144 | 2 hrs ago | 0 ETH | |||||
20641554 | 4 hrs ago | 0 ETH | |||||
20641554 | 4 hrs ago | 0 ETH | |||||
20641423 | 5 hrs ago | 0 ETH | |||||
20641423 | 5 hrs ago | 0 ETH | |||||
20641392 | 5 hrs ago | 0 ETH | |||||
20641392 | 5 hrs ago | 0 ETH | |||||
20641382 | 5 hrs ago | 0 ETH | |||||
20641382 | 5 hrs ago | 0 ETH | |||||
20640033 | 9 hrs ago | 0 ETH | |||||
20638959 | 13 hrs ago | 0 ETH | |||||
20638959 | 13 hrs ago | 0 ETH | |||||
20638953 | 13 hrs ago | 0 ETH | |||||
20638953 | 13 hrs ago | 0 ETH | |||||
20638917 | 13 hrs ago | 0 ETH | |||||
20638917 | 13 hrs ago | 0 ETH | |||||
20638616 | 14 hrs ago | 0 ETH |
Loading...
Loading
Contract Name:
KlerosLiquid
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-03-04 */ /** * Kleros Liquid * https://contributing.kleros.io/smart-contract-workflow * @reviewers: [@clesaege] * @auditors: [] * @bounties: [{duration: 14days, link: https://github.com/kleros/kleros/issues/117, max_payout: 50ETH}] * @deployments: [] */ /* solium-disable error-reason */ /* solium-disable security/no-block-members */ pragma solidity ^0.4.25; /** * @title SortitionSumTreeFactory * @author Enrique Piqueras - <[email protected]> * @dev A factory of trees that keep track of staked values for sortition. */ library SortitionSumTreeFactory { /* Structs */ struct SortitionSumTree { uint K; // The maximum number of childs per node. // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around. uint[] stack; uint[] nodes; // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node. mapping(bytes32 => uint) IDsToNodeIndexes; mapping(uint => bytes32) nodeIndexesToIDs; } /* Storage */ struct SortitionSumTrees { mapping(bytes32 => SortitionSumTree) sortitionSumTrees; } /* Public */ /** * @dev Create a sortition sum tree at the specified key. * @param _key The key of the new tree. * @param _K The number of children each node in the tree should have. */ function createTree(SortitionSumTrees storage self, bytes32 _key, uint _K) public { SortitionSumTree storage tree = self.sortitionSumTrees[_key]; require(tree.K == 0, "Tree already exists."); require(_K > 1, "K must be greater than one."); tree.K = _K; tree.stack.length = 0; tree.nodes.length = 0; tree.nodes.push(0); } /** * @dev Set a value of a tree. * @param _key The key of the tree. * @param _value The new value. * @param _ID The ID of the value. * `O(log_k(n))` where * `k` is the maximum number of childs per node in the tree, * and `n` is the maximum number of nodes ever appended. */ function set(SortitionSumTrees storage self, bytes32 _key, uint _value, bytes32 _ID) public { SortitionSumTree storage tree = self.sortitionSumTrees[_key]; uint treeIndex = tree.IDsToNodeIndexes[_ID]; if (treeIndex == 0) { // No existing node. if (_value != 0) { // Non zero value. // Append. // Add node. if (tree.stack.length == 0) { // No vacant spots. // Get the index and append the value. treeIndex = tree.nodes.length; tree.nodes.push(_value); // Potentially append a new node and make the parent a sum node. if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) { // Is first child. uint parentIndex = treeIndex / tree.K; bytes32 parentID = tree.nodeIndexesToIDs[parentIndex]; uint newIndex = treeIndex + 1; tree.nodes.push(tree.nodes[parentIndex]); delete tree.nodeIndexesToIDs[parentIndex]; tree.IDsToNodeIndexes[parentID] = newIndex; tree.nodeIndexesToIDs[newIndex] = parentID; } } else { // Some vacant spot. // Pop the stack and append the value. treeIndex = tree.stack[tree.stack.length - 1]; tree.stack.length--; tree.nodes[treeIndex] = _value; } // Add label. tree.IDsToNodeIndexes[_ID] = treeIndex; tree.nodeIndexesToIDs[treeIndex] = _ID; updateParents(self, _key, treeIndex, true, _value); } } else { // Existing node. if (_value == 0) { // Zero value. // Remove. // Remember value and set to 0. uint value = tree.nodes[treeIndex]; tree.nodes[treeIndex] = 0; // Push to stack. tree.stack.push(treeIndex); // Clear label. delete tree.IDsToNodeIndexes[_ID]; delete tree.nodeIndexesToIDs[treeIndex]; updateParents(self, _key, treeIndex, false, value); } else if (_value != tree.nodes[treeIndex]) { // New, non zero value. // Set. bool plusOrMinus = tree.nodes[treeIndex] <= _value; uint plusOrMinusValue = plusOrMinus ? _value - tree.nodes[treeIndex] : tree.nodes[treeIndex] - _value; tree.nodes[treeIndex] = _value; updateParents(self, _key, treeIndex, plusOrMinus, plusOrMinusValue); } } } /* Public Views */ /** * @dev Query the leaves of a tree. Note that if `startIndex == 0`, the tree is empty and the root node will be returned. * @param _key The key of the tree to get the leaves from. * @param _cursor The pagination cursor. * @param _count The number of items to return. * @return The index at which leaves start, the values of the returned leaves, and whether there are more for pagination. * `O(n)` where * `n` is the maximum number of nodes ever appended. */ function queryLeafs( SortitionSumTrees storage self, bytes32 _key, uint _cursor, uint _count ) public view returns(uint startIndex, uint[] values, bool hasMore) { SortitionSumTree storage tree = self.sortitionSumTrees[_key]; // Find the start index. for (uint i = 0; i < tree.nodes.length; i++) { if ((tree.K * i) + 1 >= tree.nodes.length) { startIndex = i; break; } } // Get the values. uint loopStartIndex = startIndex + _cursor; values = new uint[](loopStartIndex + _count > tree.nodes.length ? tree.nodes.length - loopStartIndex : _count); uint valuesIndex = 0; for (uint j = loopStartIndex; j < tree.nodes.length; j++) { if (valuesIndex < _count) { values[valuesIndex] = tree.nodes[j]; valuesIndex++; } else { hasMore = true; break; } } } /** * @dev Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0. * @param _key The key of the tree. * @param _drawnNumber The drawn number. * @return The drawn ID. * `O(k * log_k(n))` where * `k` is the maximum number of childs per node in the tree, * and `n` is the maximum number of nodes ever appended. */ function draw(SortitionSumTrees storage self, bytes32 _key, uint _drawnNumber) public view returns(bytes32 ID) { SortitionSumTree storage tree = self.sortitionSumTrees[_key]; uint treeIndex = 0; uint currentDrawnNumber = _drawnNumber % tree.nodes[0]; while ((tree.K * treeIndex) + 1 < tree.nodes.length) // While it still has children. for (uint i = 1; i <= tree.K; i++) { // Loop over children. uint nodeIndex = (tree.K * treeIndex) + i; uint nodeValue = tree.nodes[nodeIndex]; if (currentDrawnNumber >= nodeValue) currentDrawnNumber -= nodeValue; // Go to the next child. else { // Pick this child. treeIndex = nodeIndex; break; } } ID = tree.nodeIndexesToIDs[treeIndex]; } /** @dev Gets a specified ID's associated value. * @param _key The key of the tree. * @param _ID The ID of the value. * @return The associated value. */ function stakeOf(SortitionSumTrees storage self, bytes32 _key, bytes32 _ID) public view returns(uint value) { SortitionSumTree storage tree = self.sortitionSumTrees[_key]; uint treeIndex = tree.IDsToNodeIndexes[_ID]; if (treeIndex == 0) value = 0; else value = tree.nodes[treeIndex]; } /* Private */ /** * @dev Update all the parents of a node. * @param _key The key of the tree to update. * @param _treeIndex The index of the node to start from. * @param _plusOrMinus Wether to add (true) or substract (false). * @param _value The value to add or substract. * `O(log_k(n))` where * `k` is the maximum number of childs per node in the tree, * and `n` is the maximum number of nodes ever appended. */ function updateParents(SortitionSumTrees storage self, bytes32 _key, uint _treeIndex, bool _plusOrMinus, uint _value) private { SortitionSumTree storage tree = self.sortitionSumTrees[_key]; uint parentIndex = _treeIndex; while (parentIndex != 0) { parentIndex = (parentIndex - 1) / tree.K; tree.nodes[parentIndex] = _plusOrMinus ? tree.nodes[parentIndex] + _value : tree.nodes[parentIndex] - _value; } } } contract RNG{ /** @dev Contribute to the reward of a random number. * @param _block Block the random number is linked to. */ function contribute(uint _block) public payable; /** @dev Request a random number. * @param _block Block linked to the request. */ function requestRN(uint _block) public payable { contribute(_block); } /** @dev Get the random number. * @param _block Block the random number is linked to. * @return RN Random Number. If the number is not ready or has not been required 0 instead. */ function getRN(uint _block) public returns (uint RN); /** @dev Get a uncorrelated random number. Act like getRN but give a different number for each sender. * This is to prevent users from getting correlated numbers. * @param _block Block the random number is linked to. * @return RN Random Number. If the number is not ready or has not been required 0 instead. */ function getUncorrelatedRN(uint _block) public returns (uint RN) { uint baseRN = getRN(_block); if (baseRN == 0) return 0; else return uint(keccak256(msg.sender,baseRN)); } } /** @title Arbitrator * Arbitrator abstract contract. * When developing arbitrator contracts we need to: * -Define the functions for dispute creation (createDispute) and appeal (appeal). Don't forget to store the arbitrated contract and the disputeID (which should be unique, use nbDisputes). * -Define the functions for cost display (arbitrationCost and appealCost). * -Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling). */ contract Arbitrator { enum DisputeStatus {Waiting, Appealable, Solved} modifier requireArbitrationFee(bytes _extraData) { require(msg.value >= arbitrationCost(_extraData), "Not enough ETH to cover arbitration costs."); _; } modifier requireAppealFee(uint _disputeID, bytes _extraData) { require(msg.value >= appealCost(_disputeID, _extraData), "Not enough ETH to cover appeal costs."); _; } /** @dev To be raised when a dispute is created. * @param _disputeID ID of the dispute. * @param _arbitrable The contract which created the dispute. */ event DisputeCreation(uint indexed _disputeID, Arbitrable indexed _arbitrable); /** @dev To be raised when a dispute can be appealed. * @param _disputeID ID of the dispute. */ event AppealPossible(uint indexed _disputeID, Arbitrable indexed _arbitrable); /** @dev To be raised when the current ruling is appealed. * @param _disputeID ID of the dispute. * @param _arbitrable The contract which created the dispute. */ event AppealDecision(uint indexed _disputeID, Arbitrable indexed _arbitrable); /** @dev Create a dispute. Must be called by the arbitrable contract. * Must be paid at least arbitrationCost(_extraData). * @param _choices Amount of choices the arbitrator can make in this dispute. * @param _extraData Can be used to give additional info on the dispute to be created. * @return disputeID ID of the dispute created. */ function createDispute(uint _choices, bytes _extraData) public requireArbitrationFee(_extraData) payable returns(uint disputeID) {} /** @dev Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation. * @param _extraData Can be used to give additional info on the dispute to be created. * @return fee Amount to be paid. */ function arbitrationCost(bytes _extraData) public view returns(uint fee); /** @dev Appeal a ruling. Note that it has to be called before the arbitrator contract calls rule. * @param _disputeID ID of the dispute to be appealed. * @param _extraData Can be used to give extra info on the appeal. */ function appeal(uint _disputeID, bytes _extraData) public requireAppealFee(_disputeID,_extraData) payable { emit AppealDecision(_disputeID, Arbitrable(msg.sender)); } /** @dev Compute the cost of appeal. It is recommended not to increase it often, as it can be higly time and gas consuming for the arbitrated contracts to cope with fee augmentation. * @param _disputeID ID of the dispute to be appealed. * @param _extraData Can be used to give additional info on the dispute to be created. * @return fee Amount to be paid. */ function appealCost(uint _disputeID, bytes _extraData) public view returns(uint fee); /** @dev Compute the start and end of the dispute's current or next appeal period, if possible. * @param _disputeID ID of the dispute. * @return The start and end of the period. */ function appealPeriod(uint _disputeID) public view returns(uint start, uint end) {} /** @dev Return the status of a dispute. * @param _disputeID ID of the dispute to rule. * @return status The status of the dispute. */ function disputeStatus(uint _disputeID) public view returns(DisputeStatus status); /** @dev Return the current ruling of a dispute. This is useful for parties to know if they should appeal. * @param _disputeID ID of the dispute. * @return ruling The ruling which has been given or the one which will be given if there is no appeal. */ function currentRuling(uint _disputeID) public view returns(uint ruling); } /** * @title IArbitrable * @author Enrique Piqueras - <[email protected]> * Bug Bounties: This code hasn't undertaken a bug bounty program yet. */ /** @title IArbitrable * Arbitrable interface. * When developing arbitrable contracts, we need to: * -Define the action taken when a ruling is received by the contract. We should do so in executeRuling. * -Allow dispute creation. For this a function must: * -Call arbitrator.createDispute.value(_fee)(_choices,_extraData); * -Create the event Dispute(_arbitrator,_disputeID,_rulingOptions); */ interface IArbitrable { /** @dev To be emmited when meta-evidence is submitted. * @param _metaEvidenceID Unique identifier of meta-evidence. * @param _evidence A link to the meta-evidence JSON. */ event MetaEvidence(uint indexed _metaEvidenceID, string _evidence); /** @dev To be emmited when a dispute is created to link the correct meta-evidence to the disputeID * @param _arbitrator The arbitrator of the contract. * @param _disputeID ID of the dispute in the Arbitrator contract. * @param _metaEvidenceID Unique identifier of meta-evidence. * @param _evidenceGroupID Unique identifier of the evidence group that is linked to this dispute. */ event Dispute(Arbitrator indexed _arbitrator, uint indexed _disputeID, uint _metaEvidenceID, uint _evidenceGroupID); /** @dev To be raised when evidence are submitted. Should point to the ressource (evidences are not to be stored on chain due to gas considerations). * @param _arbitrator The arbitrator of the contract. * @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to. * @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party. * @param _evidence A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json. */ event Evidence(Arbitrator indexed _arbitrator, uint indexed _evidenceGroupID, address indexed _party, string _evidence); /** @dev To be raised when a ruling is given. * @param _arbitrator The arbitrator giving the ruling. * @param _disputeID ID of the dispute in the Arbitrator contract. * @param _ruling The ruling which was given. */ event Ruling(Arbitrator indexed _arbitrator, uint indexed _disputeID, uint _ruling); /** @dev Give a ruling for a dispute. Must be called by the arbitrator. * The purpose of this function is to ensure that the address calling it has the right to rule on the contract. * @param _disputeID ID of the dispute in the Arbitrator contract. * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". */ function rule(uint _disputeID, uint _ruling) public; } /** @title Arbitrable * Arbitrable abstract contract. * When developing arbitrable contracts, we need to: * -Define the action taken when a ruling is received by the contract. We should do so in executeRuling. * -Allow dispute creation. For this a function must: * -Call arbitrator.createDispute.value(_fee)(_choices,_extraData); * -Create the event Dispute(_arbitrator,_disputeID,_rulingOptions); */ contract Arbitrable is IArbitrable { Arbitrator public arbitrator; bytes public arbitratorExtraData; // Extra data to require particular dispute and appeal behaviour. modifier onlyArbitrator {require(msg.sender == address(arbitrator), "Can only be called by the arbitrator."); _;} /** @dev Constructor. Choose the arbitrator. * @param _arbitrator The arbitrator of the contract. * @param _arbitratorExtraData Extra data for the arbitrator. */ constructor(Arbitrator _arbitrator, bytes _arbitratorExtraData) public { arbitrator = _arbitrator; arbitratorExtraData = _arbitratorExtraData; } /** @dev Give a ruling for a dispute. Must be called by the arbitrator. * The purpose of this function is to ensure that the address calling it has the right to rule on the contract. * @param _disputeID ID of the dispute in the Arbitrator contract. * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". */ function rule(uint _disputeID, uint _ruling) public onlyArbitrator { emit Ruling(Arbitrator(msg.sender),_disputeID,_ruling); executeRuling(_disputeID,_ruling); } /** @dev Execute a ruling of a dispute. * @param _disputeID ID of the dispute in the Arbitrator contract. * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". */ function executeRuling(uint _disputeID, uint _ruling) internal; } /* Copyright 2016, Jordi Baylina. Slight modification by Clément Lesaege. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /// @title MiniMeToken Contract /// @author Jordi Baylina /// @dev This token contract's goal is to make it easy for anyone to clone this /// token using the token distribution at a given block, this will allow DAO's /// and DApps to upgrade their features in a decentralized manner without /// affecting the original token /// @dev It is ERC20 compliant, but still needs to under go further testing. contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 _amount, address _token, bytes _data) public; } /// @dev The token controller contract must implement these functions contract TokenController { /// @notice Called when `_owner` sends ether to the MiniMe Token contract /// @param _owner The address that sent the ether to create tokens /// @return True if the ether is accepted, false if it throws function proxyPayment(address _owner) public payable returns(bool); /// @notice Notifies the controller about a token transfer allowing the /// controller to react if desired /// @param _from The origin of the transfer /// @param _to The destination of the transfer /// @param _amount The amount of the transfer /// @return False if the controller does not authorize the transfer function onTransfer(address _from, address _to, uint _amount) public returns(bool); /// @notice Notifies the controller about an approval allowing the /// controller to react if desired /// @param _owner The address that calls `approve()` /// @param _spender The spender in the `approve()` call /// @param _amount The amount in the `approve()` call /// @return False if the controller does not authorize the approval function onApprove(address _owner, address _spender, uint _amount) public returns(bool); } contract Controlled { /// @notice The address of the controller is the only address that can call /// a function with this modifier modifier onlyController { require(msg.sender == controller); _; } address public controller; function Controlled() public { controller = msg.sender;} /// @notice Changes the controller of the contract /// @param _newController The new controller of the contract function changeController(address _newController) public onlyController { controller = _newController; } } /// @dev The actual token contract, the default controller is the msg.sender /// that deploys the contract, so usually this token will be deployed by a /// token controller contract, which Giveth will call a "Campaign" contract MiniMeToken is Controlled { string public name; //The Token's name: e.g. DigixDAO Tokens uint8 public decimals; //Number of decimals of the smallest unit string public symbol; //An identifier: e.g. REP string public version = 'MMT_0.2'; //An arbitrary versioning scheme /// @dev `Checkpoint` is the structure that attaches a block number to a /// given value, the block number attached is the one that last changed the /// value struct Checkpoint { // `fromBlock` is the block number that the value was generated from uint128 fromBlock; // `value` is the amount of tokens at a specific block number uint128 value; } // `parentToken` is the Token address that was cloned to produce this token; // it will be 0x0 for a token that was not cloned MiniMeToken public parentToken; // `parentSnapShotBlock` is the block number from the Parent Token that was // used to determine the initial distribution of the Clone Token uint public parentSnapShotBlock; // `creationBlock` is the block number that the Clone Token was created uint public creationBlock; // `balances` is the map that tracks the balance of each address, in this // contract when the balance changes the block number that the change // occurred is also included in the map mapping (address => Checkpoint[]) balances; // `allowed` tracks any extra transfer rights as in all ERC20 tokens mapping (address => mapping (address => uint256)) allowed; // Tracks the history of the `totalSupply` of the token Checkpoint[] totalSupplyHistory; // Flag that determines if the token is transferable or not. bool public transfersEnabled; // The factory used to create new clone tokens MiniMeTokenFactory public tokenFactory; //////////////// // Constructor //////////////// /// @notice Constructor to create a MiniMeToken /// @param _tokenFactory The address of the MiniMeTokenFactory contract that /// will create the Clone token contracts, the token factory needs to be /// deployed first /// @param _parentToken Address of the parent token, set to 0x0 if it is a /// new token /// @param _parentSnapShotBlock Block of the parent token that will /// determine the initial distribution of the clone token, set to 0 if it /// is a new token /// @param _tokenName Name of the new token /// @param _decimalUnits Number of decimals of the new token /// @param _tokenSymbol Token Symbol for the new token /// @param _transfersEnabled If true, tokens will be able to be transferred function MiniMeToken( address _tokenFactory, address _parentToken, uint _parentSnapShotBlock, string _tokenName, uint8 _decimalUnits, string _tokenSymbol, bool _transfersEnabled ) public { tokenFactory = MiniMeTokenFactory(_tokenFactory); name = _tokenName; // Set the name decimals = _decimalUnits; // Set the decimals symbol = _tokenSymbol; // Set the symbol parentToken = MiniMeToken(_parentToken); parentSnapShotBlock = _parentSnapShotBlock; transfersEnabled = _transfersEnabled; creationBlock = block.number; } /////////////////// // ERC20 Methods /////////////////// /// @notice Send `_amount` tokens to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _amount The amount of tokens to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _amount) public returns (bool success) { require(transfersEnabled); doTransfer(msg.sender, _to, _amount); return true; } /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it /// is approved by `_from` /// @param _from The address holding the tokens being transferred /// @param _to The address of the recipient /// @param _amount The amount of tokens to be transferred /// @return True if the transfer was successful function transferFrom(address _from, address _to, uint256 _amount ) public returns (bool success) { // The controller of this contract can move tokens around at will, // this is important to recognize! Confirm that you trust the // controller of this contract, which in most situations should be // another open source smart contract or 0x0 if (msg.sender != controller) { require(transfersEnabled); // The standard ERC 20 transferFrom functionality require(allowed[_from][msg.sender] >= _amount); allowed[_from][msg.sender] -= _amount; } doTransfer(_from, _to, _amount); return true; } /// @dev This is the actual transfer function in the token contract, it can /// only be called by other functions in this contract. /// @param _from The address holding the tokens being transferred /// @param _to The address of the recipient /// @param _amount The amount of tokens to be transferred /// @return True if the transfer was successful function doTransfer(address _from, address _to, uint _amount ) internal { if (_amount == 0) { Transfer(_from, _to, _amount); // Follow the spec to louch the event when transfer 0 return; } require(parentSnapShotBlock < block.number); // Do not allow transfer to 0x0 or the token contract itself require((_to != 0) && (_to != address(this))); // If the amount being transfered is more than the balance of the // account the transfer throws var previousBalanceFrom = balanceOfAt(_from, block.number); require(previousBalanceFrom >= _amount); // Alerts the token controller of the transfer if (isContract(controller)) { require(TokenController(controller).onTransfer(_from, _to, _amount)); } // First update the balance array with the new value for the address // sending the tokens updateValueAtNow(balances[_from], previousBalanceFrom - _amount); // Then update the balance array with the new value for the address // receiving the tokens var previousBalanceTo = balanceOfAt(_to, block.number); require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow updateValueAtNow(balances[_to], previousBalanceTo + _amount); // An event to make the transfer easy to find on the blockchain Transfer(_from, _to, _amount); } /// @param _owner The address that's balance is being requested /// @return The balance of `_owner` at the current block function balanceOf(address _owner) public constant returns (uint256 balance) { return balanceOfAt(_owner, block.number); } /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on /// its behalf. This is the standard version to allow backward compatibility. /// @param _spender The address of the account able to transfer the tokens /// @param _amount The amount of tokens to be approved for transfer /// @return True if the approval was successful function approve(address _spender, uint256 _amount) public returns (bool success) { require(transfersEnabled); // Alerts the token controller of the approve function call if (isContract(controller)) { require(TokenController(controller).onApprove(msg.sender, _spender, _amount)); } allowed[msg.sender][_spender] = _amount; Approval(msg.sender, _spender, _amount); return true; } /// @dev This function makes it easy to read the `allowed[]` map /// @param _owner The address of the account that owns the token /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens of _owner that _spender is allowed /// to spend function allowance(address _owner, address _spender ) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /// @notice `msg.sender` approves `_spender` to send `_amount` tokens on /// its behalf, and then a function is triggered in the contract that is /// being approved, `_spender`. This allows users to use their tokens to /// interact with contracts in one function call instead of two /// @param _spender The address of the contract able to transfer the tokens /// @param _amount The amount of tokens to be approved for transfer /// @return True if the function call was successful function approveAndCall(address _spender, uint256 _amount, bytes _extraData ) public returns (bool success) { require(approve(_spender, _amount)); ApproveAndCallFallBack(_spender).receiveApproval( msg.sender, _amount, this, _extraData ); return true; } /// @dev This function makes it easy to get the total number of tokens /// @return The total number of tokens function totalSupply() public constant returns (uint) { return totalSupplyAt(block.number); } //////////////// // Query balance and totalSupply in History //////////////// /// @dev Queries the balance of `_owner` at a specific `_blockNumber` /// @param _owner The address from which the balance will be retrieved /// @param _blockNumber The block number when the balance is queried /// @return The balance at `_blockNumber` function balanceOfAt(address _owner, uint _blockNumber) public constant returns (uint) { // These next few lines are used when the balance of the token is // requested before a check point was ever created for this token, it // requires that the `parentToken.balanceOfAt` be queried at the // genesis block for that token as this contains initial balance of // this token if ((balances[_owner].length == 0) || (balances[_owner][0].fromBlock > _blockNumber)) { if (address(parentToken) != 0) { return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock)); } else { // Has no parent return 0; } // This will return the expected balance during normal situations } else { return getValueAt(balances[_owner], _blockNumber); } } /// @notice Total amount of tokens at a specific `_blockNumber`. /// @param _blockNumber The block number when the totalSupply is queried /// @return The total amount of tokens at `_blockNumber` function totalSupplyAt(uint _blockNumber) public constant returns(uint) { // These next few lines are used when the totalSupply of the token is // requested before a check point was ever created for this token, it // requires that the `parentToken.totalSupplyAt` be queried at the // genesis block for this token as that contains totalSupply of this // token at this block number. if ((totalSupplyHistory.length == 0) || (totalSupplyHistory[0].fromBlock > _blockNumber)) { if (address(parentToken) != 0) { return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock)); } else { return 0; } // This will return the expected totalSupply during normal situations } else { return getValueAt(totalSupplyHistory, _blockNumber); } } //////////////// // Clone Token Method //////////////// /// @notice Creates a new clone token with the initial distribution being /// this token at `_snapshotBlock` /// @param _cloneTokenName Name of the clone token /// @param _cloneDecimalUnits Number of decimals of the smallest unit /// @param _cloneTokenSymbol Symbol of the clone token /// @param _snapshotBlock Block when the distribution of the parent token is /// copied to set the initial distribution of the new clone token; /// if the block is zero than the actual block, the current block is used /// @param _transfersEnabled True if transfers are allowed in the clone /// @return The address of the new MiniMeToken Contract function createCloneToken( string _cloneTokenName, uint8 _cloneDecimalUnits, string _cloneTokenSymbol, uint _snapshotBlock, bool _transfersEnabled ) public returns(address) { if (_snapshotBlock == 0) _snapshotBlock = block.number; MiniMeToken cloneToken = tokenFactory.createCloneToken( this, _snapshotBlock, _cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _transfersEnabled ); cloneToken.changeController(msg.sender); // An event to make the token easy to find on the blockchain NewCloneToken(address(cloneToken), _snapshotBlock); return address(cloneToken); } //////////////// // Generate and destroy tokens //////////////// /// @notice Generates `_amount` tokens that are assigned to `_owner` /// @param _owner The address that will be assigned the new tokens /// @param _amount The quantity of tokens generated /// @return True if the tokens are generated correctly function generateTokens(address _owner, uint _amount ) public onlyController returns (bool) { uint curTotalSupply = totalSupply(); require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow uint previousBalanceTo = balanceOf(_owner); require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow updateValueAtNow(totalSupplyHistory, curTotalSupply + _amount); updateValueAtNow(balances[_owner], previousBalanceTo + _amount); Transfer(0, _owner, _amount); return true; } /// @notice Burns `_amount` tokens from `_owner` /// @param _owner The address that will lose the tokens /// @param _amount The quantity of tokens to burn /// @return True if the tokens are burned correctly function destroyTokens(address _owner, uint _amount ) onlyController public returns (bool) { uint curTotalSupply = totalSupply(); require(curTotalSupply >= _amount); uint previousBalanceFrom = balanceOf(_owner); require(previousBalanceFrom >= _amount); updateValueAtNow(totalSupplyHistory, curTotalSupply - _amount); updateValueAtNow(balances[_owner], previousBalanceFrom - _amount); Transfer(_owner, 0, _amount); return true; } //////////////// // Enable tokens transfers //////////////// /// @notice Enables token holders to transfer their tokens freely if true /// @param _transfersEnabled True if transfers are allowed in the clone function enableTransfers(bool _transfersEnabled) public onlyController { transfersEnabled = _transfersEnabled; } //////////////// // Internal helper functions to query and set a value in a snapshot array //////////////// /// @dev `getValueAt` retrieves the number of tokens at a given block number /// @param checkpoints The history of values being queried /// @param _block The block number to retrieve the value at /// @return The number of tokens being queried function getValueAt(Checkpoint[] storage checkpoints, uint _block ) constant internal returns (uint) { if (checkpoints.length == 0) return 0; // Shortcut for the actual value if (_block >= checkpoints[checkpoints.length-1].fromBlock) return checkpoints[checkpoints.length-1].value; if (_block < checkpoints[0].fromBlock) return 0; // Binary search of the value in the array uint min = 0; uint max = checkpoints.length-1; while (max > min) { uint mid = (max + min + 1)/ 2; if (checkpoints[mid].fromBlock<=_block) { min = mid; } else { max = mid-1; } } return checkpoints[min].value; } /// @dev `updateValueAtNow` used to update the `balances` map and the /// `totalSupplyHistory` /// @param checkpoints The history of data being updated /// @param _value The new number of tokens function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value ) internal { if ((checkpoints.length == 0) || (checkpoints[checkpoints.length -1].fromBlock < block.number)) { Checkpoint storage newCheckPoint = checkpoints[ checkpoints.length++ ]; newCheckPoint.fromBlock = uint128(block.number); newCheckPoint.value = uint128(_value); } else { Checkpoint storage oldCheckPoint = checkpoints[checkpoints.length-1]; oldCheckPoint.value = uint128(_value); } } /// @dev Internal function to determine if an address is a contract /// @param _addr The address being queried /// @return True if `_addr` is a contract function isContract(address _addr) constant internal returns(bool) { uint size; if (_addr == 0) return false; assembly { size := extcodesize(_addr) } return size>0; } /// @dev Helper function to return a min betwen the two uints function min(uint a, uint b) pure internal returns (uint) { return a < b ? a : b; } /// @notice The fallback function: If the contract's controller has not been /// set to 0, then the `proxyPayment` method is called which relays the /// ether and creates tokens as described in the token controller contract function () public payable { require(isContract(controller)); require(TokenController(controller).proxyPayment.value(msg.value)(msg.sender)); } ////////// // Safety Methods ////////// /// @notice This method can be used by the controller to extract mistakenly /// sent tokens to this contract. /// @param _token The address of the token contract that you want to recover /// set to 0 in case you want to extract ether. function claimTokens(address _token) public onlyController { if (_token == 0x0) { controller.transfer(this.balance); return; } MiniMeToken token = MiniMeToken(_token); uint balance = token.balanceOf(this); token.transfer(controller, balance); ClaimedTokens(_token, controller, balance); } //////////////// // Events //////////////// event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount); event Transfer(address indexed _from, address indexed _to, uint256 _amount); event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock); event Approval( address indexed _owner, address indexed _spender, uint256 _amount ); } //////////////// // MiniMeTokenFactory //////////////// /// @dev This contract is used to generate clone contracts from a contract. /// In solidity this is the way to create a contract from a contract of the /// same class contract MiniMeTokenFactory { /// @notice Update the DApp by creating a new token with new functionalities /// the msg.sender becomes the controller of this clone token /// @param _parentToken Address of the token being cloned /// @param _snapshotBlock Block of the parent token that will /// determine the initial distribution of the clone token /// @param _tokenName Name of the new token /// @param _decimalUnits Number of decimals of the new token /// @param _tokenSymbol Token Symbol for the new token /// @param _transfersEnabled If true, tokens will be able to be transferred /// @return The address of the new token contract function createCloneToken( address _parentToken, uint _snapshotBlock, string _tokenName, uint8 _decimalUnits, string _tokenSymbol, bool _transfersEnabled ) public returns (MiniMeToken) { MiniMeToken newToken = new MiniMeToken( this, _parentToken, _snapshotBlock, _tokenName, _decimalUnits, _tokenSymbol, _transfersEnabled ); newToken.changeController(msg.sender); return newToken; } } /** * @title KlerosLiquid * @author Enrique Piqueras - <[email protected]> * @dev The main Kleros contract with dispute resolution logic for the Athena release. */ contract KlerosLiquid is TokenController, Arbitrator { /* Enums */ // General enum Phase { staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors. generating, // Waiting for a random number. Pass as soon as it is ready. drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes. } // Dispute enum Period { evidence, // Evidence can be submitted. This is also when drawing has to take place. commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes. vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not. appeal, // The dispute can be appealed. execution // Tokens are redistributed and the ruling is executed. } /* Structs */ // General struct Court { uint96 parent; // The parent court. uint[] children; // List of child courts. bool hiddenVotes; // Whether to use commit and reveal or not. uint minStake; // Minimum tokens needed to stake in the court. uint alpha; // Basis point of tokens that are lost when incoherent. uint feeForJuror; // Arbitration fee paid per juror. // The appeal after the one that reaches this number of jurors will go to the parent court if any, otherwise, no more appeals are possible. uint jurorsForCourtJump; uint[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`. } struct DelayedSetStake { address account; // The address of the juror. uint96 subcourtID; // The ID of the subcourt. uint128 stake; // The new stake. } // Dispute struct Vote { address account; // The address of the juror. bytes32 commit; // The commit of the juror. For courts with hidden votes. uint choice; // The choice of the juror. bool voted; // True if the vote has been cast or revealed, false otherwise. } struct VoteCounter { // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first. uint winningChoice; mapping(uint => uint) counts; // The sum of votes for each choice in the form `counts[choice]`. bool tied; // True if there is a tie, false otherwise. } struct Dispute { // Note that appeal `0` is equivalent to the first round of the dispute. uint96 subcourtID; // The ID of the subcourt the dispute is in. Arbitrable arbitrated; // The arbitrated arbitrable contract. // The number of choices jurors have when voting. This does not include choice `0` which is reserved for "refuse to arbitrate"/"no ruling". uint numberOfChoices; Period period; // The current period of the dispute. uint lastPeriodChange; // The last time the period was changed. // The votes in the form `votes[appeal][voteID]`. On each round, a new list is pushed and packed with as many empty votes as there are draws. We use `dispute.votes.length` to get the number of appeals plus 1 for the first round. Vote[][] votes; VoteCounter[] voteCounters; // The vote counters in the form `voteCounters[appeal]`. uint[] tokensAtStakePerJuror; // The amount of tokens at stake for each juror in the form `tokensAtStakePerJuror[appeal]`. uint[] totalFeesForJurors; // The total juror fees paid in the form `totalFeesForJurors[appeal]`. uint drawsInRound; // A counter of draws made in the current round. uint commitsInRound; // A counter of commits made in the current round. uint[] votesInEachRound; // A counter of votes made in each round in the form `votesInEachRound[appeal]`. // A counter of vote reward repartitions made in each round in the form `repartitionsInEachRound[appeal]`. uint[] repartitionsInEachRound; uint[] penaltiesInEachRound; // The amount of tokens collected from penalties in each round in the form `penaltiesInEachRound[appeal]`. bool ruled; // True if the ruling has been executed, false otherwise. } // Juror struct Juror { // The IDs of subcourts where the juror has stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`. uint96[] subcourtIDs; uint stakedTokens; // The juror's total amount of tokens staked in subcourts. uint lockedTokens; // The juror's total amount of tokens locked in disputes. } /* Events */ /** @dev Emitted when we pass to a new phase. * @param _phase The new phase. */ event NewPhase(Phase _phase); /** @dev Emitted when a dispute passes to a new period. * @param _disputeID The ID of the dispute. * @param _period The new period. */ event NewPeriod(uint indexed _disputeID, Period _period); /** @dev Emitted when a juror's stake is set. * @param _address The address of the juror. * @param _subcourtID The ID of the subcourt at the end of the stake path. * @param _stake The new stake. * @param _newTotalStake The new total stake. */ event StakeSet(address indexed _address, uint _subcourtID, uint128 _stake, uint _newTotalStake); /** @dev Emitted when a juror is drawn. * @param _address The drawn address. * @param _disputeID The ID of the dispute. * @param _appeal The appeal the draw is for. 0 is for the first round. * @param _voteID The vote ID. */ event Draw(address indexed _address, uint indexed _disputeID, uint _appeal, uint _voteID); /** @dev Emitted when a juror wins or loses tokens and ETH from a dispute. * @param _address The juror affected. * @param _disputeID The ID of the dispute. * @param _tokenAmount The amount of tokens won or lost. * @param _ETHAmount The amount of ETH won or lost. */ event TokenAndETHShift(address indexed _address, uint indexed _disputeID, int _tokenAmount, int _ETHAmount); /* Storage */ // General Constants uint public constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have. uint public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute. uint public constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH. uint public constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by. // General Contracts address public governor; // The governor of the contract. MiniMeToken public pinakion; // The Pinakion token contract. RNG public RNGenerator; // The random number generator contract. // General Dynamic Phase public phase; // The current phase. uint public lastPhaseChange; // The last time the phase was changed. uint public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors. // The block number to get the next random number from. Used so there is at least a 1 block difference from the staking phase. uint public RNBlock; uint public RN; // The current random number. uint public minStakingTime; // The minimum staking time. uint public maxDrawingTime; // The maximum drawing time. // True if insolvent (`balance < stakedTokens || balance < lockedTokens`) token transfers should be blocked. Used to avoid blocking penalties. bool public lockInsolventTransfers = true; // General Storage Court[] public courts; // The subcourts. using SortitionSumTreeFactory for SortitionSumTreeFactory.SortitionSumTrees; // Use library functions for sortition sum trees. SortitionSumTreeFactory.SortitionSumTrees internal sortitionSumTrees; // The sortition sum trees. // The delayed calls to `_setStake`. Used to schedule `_setStake`s when not in the staking phase. mapping(uint => DelayedSetStake) public delayedSetStakes; // The index of the next `delayedSetStakes` item to execute. Starts at 1 because `lastDelayedSetStake` starts at 0. uint public nextDelayedSetStake = 1; uint public lastDelayedSetStake; // The index of the last `delayedSetStakes` item. 0 is skipped because it is the initial value. // Dispute Dispute[] public disputes; // The disputes. // Juror mapping(address => Juror) public jurors; // The jurors. /* Modifiers */ /** @dev Requires a specific phase. * @param _phase The required phase. */ modifier onlyDuringPhase(Phase _phase) {require(phase == _phase); _;} /** @dev Requires a specific period in a dispute. * @param _disputeID The ID of the dispute. * @param _period The required period. */ modifier onlyDuringPeriod(uint _disputeID, Period _period) {require(disputes[_disputeID].period == _period); _;} /** @dev Requires that the sender is the governor. Note that the governor is expected to not be malicious. */ modifier onlyByGovernor() {require(governor == msg.sender); _;} /* Constructor */ /** @dev Constructs the KlerosLiquid contract. * @param _governor The governor's address. * @param _pinakion The address of the token contract. * @param _RNGenerator The address of the RNG contract. * @param _minStakingTime The minimum time that the staking phase should last. * @param _maxDrawingTime The maximum time that the drawing phase should last. * @param _hiddenVotes The `hiddenVotes` property value of the general court. * @param _minStake The `minStake` property value of the general court. * @param _alpha The `alpha` property value of the general court. * @param _feeForJuror The `feeForJuror` property value of the general court. * @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the general court. * @param _timesPerPeriod The `timesPerPeriod` property value of the general court. * @param _sortitionSumTreeK The number of children per node of the general court's sortition sum tree. */ constructor( address _governor, MiniMeToken _pinakion, RNG _RNGenerator, uint _minStakingTime, uint _maxDrawingTime, bool _hiddenVotes, uint _minStake, uint _alpha, uint _feeForJuror, uint _jurorsForCourtJump, uint[4] _timesPerPeriod, uint _sortitionSumTreeK ) public { // Initialize contract. governor = _governor; pinakion = _pinakion; RNGenerator = _RNGenerator; minStakingTime = _minStakingTime; maxDrawingTime = _maxDrawingTime; lastPhaseChange = now; // Create the general court. courts.push(Court({ parent: 0, children: new uint[](0), hiddenVotes: _hiddenVotes, minStake: _minStake, alpha: _alpha, feeForJuror: _feeForJuror, jurorsForCourtJump: _jurorsForCourtJump, timesPerPeriod: _timesPerPeriod })); sortitionSumTrees.createTree(bytes32(0), _sortitionSumTreeK); } /* External */ /** @dev Lets the governor call anything on behalf of the contract. * @param _destination The destination of the call. * @param _amount The value sent with the call. * @param _data The data sent with the call. */ function executeGovernorProposal(address _destination, uint _amount, bytes _data) external onlyByGovernor { require(_destination.call.value(_amount)(_data)); // solium-disable-line security/no-call-value } /** @dev Changes the `governor` storage variable. * @param _governor The new value for the `governor` storage variable. */ function changeGovernor(address _governor) external onlyByGovernor { governor = _governor; } /** @dev Changes the `pinakion` storage variable. * @param _pinakion The new value for the `pinakion` storage variable. */ function changePinakion(MiniMeToken _pinakion) external onlyByGovernor { pinakion = _pinakion; } /** @dev Changes the `RNGenerator` storage variable. * @param _RNGenerator The new value for the `RNGenerator` storage variable. */ function changeRNGenerator(RNG _RNGenerator) external onlyByGovernor { RNGenerator = _RNGenerator; if (phase == Phase.generating) { RNBlock = block.number + 1; RNGenerator.requestRN(RNBlock); } } /** @dev Changes the `minStakingTime` storage variable. * @param _minStakingTime The new value for the `minStakingTime` storage variable. */ function changeMinStakingTime(uint _minStakingTime) external onlyByGovernor { minStakingTime = _minStakingTime; } /** @dev Changes the `maxDrawingTime` storage variable. * @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable. */ function changeMaxDrawingTime(uint _maxDrawingTime) external onlyByGovernor { maxDrawingTime = _maxDrawingTime; } /** @dev Creates a subcourt under a specified parent court. * @param _parent The `parent` property value of the subcourt. * @param _hiddenVotes The `hiddenVotes` property value of the subcourt. * @param _minStake The `minStake` property value of the subcourt. * @param _alpha The `alpha` property value of the subcourt. * @param _feeForJuror The `feeForJuror` property value of the subcourt. * @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the subcourt. * @param _timesPerPeriod The `timesPerPeriod` property value of the subcourt. * @param _sortitionSumTreeK The number of children per node of the subcourt's sortition sum tree. */ function createSubcourt( uint96 _parent, bool _hiddenVotes, uint _minStake, uint _alpha, uint _feeForJuror, uint _jurorsForCourtJump, uint[4] _timesPerPeriod, uint _sortitionSumTreeK ) external onlyByGovernor { require(courts[_parent].minStake <= _minStake, "A subcourt cannot be a child of a subcourt with a higher minimum stake."); // Create the subcourt. uint96 subcourtID = uint96( courts.push(Court({ parent: _parent, children: new uint[](0), hiddenVotes: _hiddenVotes, minStake: _minStake, alpha: _alpha, feeForJuror: _feeForJuror, jurorsForCourtJump: _jurorsForCourtJump, timesPerPeriod: _timesPerPeriod })) - 1 ); sortitionSumTrees.createTree(bytes32(subcourtID), _sortitionSumTreeK); // Update the parent. courts[_parent].children.push(subcourtID); } /** @dev Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value. * @param _subcourtID The ID of the subcourt. * @param _minStake The new value for the `minStake` property value. */ function changeSubcourtMinStake(uint96 _subcourtID, uint _minStake) external onlyByGovernor { require(_subcourtID == 0 || courts[courts[_subcourtID].parent].minStake <= _minStake); for (uint i = 0; i < courts[_subcourtID].children.length; i++) { require( courts[courts[_subcourtID].children[i]].minStake >= _minStake, "A subcourt cannot be the parent of a subcourt with a lower minimum stake." ); } courts[_subcourtID].minStake = _minStake; } /** @dev Changes the `alpha` property value of a specified subcourt. * @param _subcourtID The ID of the subcourt. * @param _alpha The new value for the `alpha` property value. */ function changeSubcourtAlpha(uint96 _subcourtID, uint _alpha) external onlyByGovernor { courts[_subcourtID].alpha = _alpha; } /** @dev Changes the `feeForJuror` property value of a specified subcourt. * @param _subcourtID The ID of the subcourt. * @param _feeForJuror The new value for the `feeForJuror` property value. */ function changeSubcourtJurorFee(uint96 _subcourtID, uint _feeForJuror) external onlyByGovernor { courts[_subcourtID].feeForJuror = _feeForJuror; } /** @dev Changes the `jurorsForCourtJump` property value of a specified subcourt. * @param _subcourtID The ID of the subcourt. * @param _jurorsForCourtJump The new value for the `jurorsForCourtJump` property value. */ function changeSubcourtJurorsForJump(uint96 _subcourtID, uint _jurorsForCourtJump) external onlyByGovernor { courts[_subcourtID].jurorsForCourtJump = _jurorsForCourtJump; } /** @dev Changes the `timesPerPeriod` property value of a specified subcourt. * @param _subcourtID The ID of the subcourt. * @param _timesPerPeriod The new value for the `timesPerPeriod` property value. */ function changeSubcourtTimesPerPeriod(uint96 _subcourtID, uint[4] _timesPerPeriod) external onlyByGovernor { courts[_subcourtID].timesPerPeriod = _timesPerPeriod; } /** @dev Passes the phase. TRUSTED */ function passPhase() external { if (phase == Phase.staking) { require(now - lastPhaseChange >= minStakingTime, "The minimum staking time has not passed yet."); require(disputesWithoutJurors > 0, "There are no disputes that need jurors."); RNBlock = block.number + 1; RNGenerator.requestRN(RNBlock); phase = Phase.generating; } else if (phase == Phase.generating) { RN = RNGenerator.getUncorrelatedRN(RNBlock); require(RN != 0, "Random number is not ready yet."); phase = Phase.drawing; } else if (phase == Phase.drawing) { require(disputesWithoutJurors == 0 || now - lastPhaseChange >= maxDrawingTime, "There are still disputes without jurors and the maximum drawing time has not passed yet."); phase = Phase.staking; } lastPhaseChange = now; emit NewPhase(phase); } /** @dev Passes the period of a specified dispute. * @param _disputeID The ID of the dispute. */ function passPeriod(uint _disputeID) external { Dispute storage dispute = disputes[_disputeID]; if (dispute.period == Period.evidence) { require( dispute.votes.length > 1 || now - dispute.lastPeriodChange >= courts[dispute.subcourtID].timesPerPeriod[uint(dispute.period)], "The evidence period time has not passed yet and it is not an appeal." ); require(dispute.drawsInRound == dispute.votes[dispute.votes.length - 1].length, "The dispute has not finished drawing yet."); dispute.period = courts[dispute.subcourtID].hiddenVotes ? Period.commit : Period.vote; } else if (dispute.period == Period.commit) { require( now - dispute.lastPeriodChange >= courts[dispute.subcourtID].timesPerPeriod[uint(dispute.period)] || dispute.commitsInRound == dispute.votes[dispute.votes.length - 1].length, "The commit period time has not passed yet and not every juror has committed yet." ); dispute.period = Period.vote; } else if (dispute.period == Period.vote) { require( now - dispute.lastPeriodChange >= courts[dispute.subcourtID].timesPerPeriod[uint(dispute.period)] || dispute.votesInEachRound[dispute.votes.length - 1] == dispute.votes[dispute.votes.length - 1].length, "The vote period time has not passed yet and not every juror has voted yet." ); dispute.period = Period.appeal; emit AppealPossible(_disputeID, dispute.arbitrated); } else if (dispute.period == Period.appeal) { require(now - dispute.lastPeriodChange >= courts[dispute.subcourtID].timesPerPeriod[uint(dispute.period)], "The appeal period time has not passed yet."); dispute.period = Period.execution; } else if (dispute.period == Period.execution) { revert("The dispute is already in the last period."); } dispute.lastPeriodChange = now; emit NewPeriod(_disputeID, dispute.period); } /** @dev Sets the caller's stake in a subcourt. * @param _subcourtID The ID of the subcourt. * @param _stake The new stake. */ function setStake(uint96 _subcourtID, uint128 _stake) external { require(_setStake(msg.sender, _subcourtID, _stake)); } /** @dev Executes the next delayed set stakes. * @param _iterations The number of delayed set stakes to execute. */ function executeDelayedSetStakes(uint _iterations) external onlyDuringPhase(Phase.staking) { uint actualIterations = (nextDelayedSetStake + _iterations) - 1 > lastDelayedSetStake ? (lastDelayedSetStake - nextDelayedSetStake) + 1 : _iterations; uint newNextDelayedSetStake = nextDelayedSetStake + actualIterations; require(newNextDelayedSetStake >= nextDelayedSetStake); for (uint i = nextDelayedSetStake; i < newNextDelayedSetStake; i++) { DelayedSetStake storage delayedSetStake = delayedSetStakes[i]; _setStake(delayedSetStake.account, delayedSetStake.subcourtID, delayedSetStake.stake); delete delayedSetStakes[i]; } nextDelayedSetStake = newNextDelayedSetStake; } /** @dev Draws jurors for a dispute. Can be called in parts. * `O(n * k * log_k(j))` where * `n` is the number of iterations to run, * `k` is the number of children per node of the dispute's court's sortition sum tree, * and `j` is the maximum number of jurors that ever staked in it simultaneously. * @param _disputeID The ID of the dispute. * @param _iterations The number of iterations to run. */ function drawJurors( uint _disputeID, uint _iterations ) external onlyDuringPhase(Phase.drawing) onlyDuringPeriod(_disputeID, Period.evidence) { Dispute storage dispute = disputes[_disputeID]; uint endIndex = dispute.drawsInRound + _iterations; require(endIndex >= dispute.drawsInRound); // Avoid going out of range. if (endIndex > dispute.votes[dispute.votes.length - 1].length) endIndex = dispute.votes[dispute.votes.length - 1].length; for (uint i = dispute.drawsInRound; i < endIndex; i++) { // Draw from sortition tree. ( address drawnAddress, uint subcourtID ) = stakePathIDToAccountAndSubcourtID(sortitionSumTrees.draw(bytes32(dispute.subcourtID), uint(keccak256(RN, _disputeID, i)))); // Save the vote. dispute.votes[dispute.votes.length - 1][i].account = drawnAddress; jurors[drawnAddress].lockedTokens += dispute.tokensAtStakePerJuror[dispute.tokensAtStakePerJuror.length - 1]; emit Draw(drawnAddress, _disputeID, dispute.votes.length - 1, i); // If dispute is fully drawn. if (i == dispute.votes[dispute.votes.length - 1].length - 1) disputesWithoutJurors--; } dispute.drawsInRound = endIndex; } /** @dev Sets the caller's commit for the specified votes. * `O(n)` where * `n` is the number of votes. * @param _disputeID The ID of the dispute. * @param _voteIDs The IDs of the votes. * @param _commit The commit. */ function castCommit(uint _disputeID, uint[] _voteIDs, bytes32 _commit) external onlyDuringPeriod(_disputeID, Period.commit) { Dispute storage dispute = disputes[_disputeID]; require(_commit != bytes32(0)); for (uint i = 0; i < _voteIDs.length; i++) { require(dispute.votes[dispute.votes.length - 1][_voteIDs[i]].account == msg.sender, "The caller has to own the vote."); require(dispute.votes[dispute.votes.length - 1][_voteIDs[i]].commit == bytes32(0), "Already committed this vote."); dispute.votes[dispute.votes.length - 1][_voteIDs[i]].commit = _commit; } dispute.commitsInRound += _voteIDs.length; } /** @dev Sets the caller's choices for the specified votes. * `O(n)` where * `n` is the number of votes. * @param _disputeID The ID of the dispute. * @param _voteIDs The IDs of the votes. * @param _choice The choice. * @param _salt The salt for the commit if the votes were hidden. */ function castVote(uint _disputeID, uint[] _voteIDs, uint _choice, uint _salt) external onlyDuringPeriod(_disputeID, Period.vote) { Dispute storage dispute = disputes[_disputeID]; require(_voteIDs.length > 0); require(_choice <= dispute.numberOfChoices, "The choice has to be less than or equal to the number of choices for the dispute."); // Save the votes. for (uint i = 0; i < _voteIDs.length; i++) { require(dispute.votes[dispute.votes.length - 1][_voteIDs[i]].account == msg.sender, "The caller has to own the vote."); require( !courts[dispute.subcourtID].hiddenVotes || dispute.votes[dispute.votes.length - 1][_voteIDs[i]].commit == keccak256(_choice, _salt), "The commit must match the choice in subcourts with hidden votes." ); require(!dispute.votes[dispute.votes.length - 1][_voteIDs[i]].voted, "Vote already cast."); dispute.votes[dispute.votes.length - 1][_voteIDs[i]].choice = _choice; dispute.votes[dispute.votes.length - 1][_voteIDs[i]].voted = true; } dispute.votesInEachRound[dispute.votes.length - 1] += _voteIDs.length; // Update winning choice. VoteCounter storage voteCounter = dispute.voteCounters[dispute.voteCounters.length - 1]; voteCounter.counts[_choice] += _voteIDs.length; if (_choice == voteCounter.winningChoice) { // Voted for the winning choice. if (voteCounter.tied) voteCounter.tied = false; // Potentially broke tie. } else { // Voted for another choice. if (voteCounter.counts[_choice] == voteCounter.counts[voteCounter.winningChoice]) { // Tie. if (!voteCounter.tied) voteCounter.tied = true; } else if (voteCounter.counts[_choice] > voteCounter.counts[voteCounter.winningChoice]) { // New winner. voteCounter.winningChoice = _choice; voteCounter.tied = false; } } } /** @dev Computes the token and ETH rewards for a specified appeal in a specified dispute. * @param _disputeID The ID of the dispute. * @param _appeal The appeal. * @return The token and ETH rewards. */ function computeTokenAndETHRewards(uint _disputeID, uint _appeal) private view returns(uint tokenReward, uint ETHReward) { Dispute storage dispute = disputes[_disputeID]; // Distribute penalties and arbitration fees. if (dispute.voteCounters[dispute.voteCounters.length - 1].tied) { // Distribute penalties and fees evenly between active jurors. uint activeCount = dispute.votesInEachRound[_appeal]; if (activeCount > 0) { tokenReward = dispute.penaltiesInEachRound[_appeal] / activeCount; ETHReward = dispute.totalFeesForJurors[_appeal] / activeCount; } else { tokenReward = 0; ETHReward = 0; } } else { // Distribute penalties and fees evenly between coherent jurors. uint winningChoice = dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice; uint coherentCount = dispute.voteCounters[_appeal].counts[winningChoice]; tokenReward = dispute.penaltiesInEachRound[_appeal] / coherentCount; ETHReward = dispute.totalFeesForJurors[_appeal] / coherentCount; } } /** @dev Repartitions tokens and ETH for a specified appeal in a specified dispute. Can be called in parts. * `O(i + u * n * (n + p * log_k(j)))` where * `i` is the number of iterations to run, * `u` is the number of jurors that need to be unstaked, * `n` is the maximum number of subcourts one of these jurors has staked in, * `p` is the depth of the subcourt tree, * `k` is the minimum number of children per node of one of these subcourts' sortition sum tree, * and `j` is the maximum number of jurors that ever staked in one of these subcourts simultaneously. * @param _disputeID The ID of the dispute. * @param _appeal The appeal. * @param _iterations The number of iterations to run. */ function execute(uint _disputeID, uint _appeal, uint _iterations) external onlyDuringPeriod(_disputeID, Period.execution) { lockInsolventTransfers = false; Dispute storage dispute = disputes[_disputeID]; uint end = dispute.repartitionsInEachRound[_appeal] + _iterations; require(end >= dispute.repartitionsInEachRound[_appeal]); uint penaltiesInRoundCache = dispute.penaltiesInEachRound[_appeal]; // For saving gas. (uint tokenReward, uint ETHReward) = (0, 0); // Avoid going out of range. if ( !dispute.voteCounters[dispute.voteCounters.length - 1].tied && dispute.voteCounters[_appeal].counts[dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice] == 0 ) { // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome. if (end > dispute.votes[_appeal].length) end = dispute.votes[_appeal].length; } else { // We loop over the votes twice, first to collect penalties, and second to distribute them as rewards along with arbitration fees. (tokenReward, ETHReward) = dispute.repartitionsInEachRound[_appeal] >= dispute.votes[_appeal].length ? computeTokenAndETHRewards(_disputeID, _appeal) : (0, 0); // Compute rewards if rewarding. if (end > dispute.votes[_appeal].length * 2) end = dispute.votes[_appeal].length * 2; } for (uint i = dispute.repartitionsInEachRound[_appeal]; i < end; i++) { Vote storage vote = dispute.votes[_appeal][i % dispute.votes[_appeal].length]; if ( vote.voted && (vote.choice == dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice || dispute.voteCounters[dispute.voteCounters.length - 1].tied) ) { // Juror was active, and voted coherently or it was a tie. if (i >= dispute.votes[_appeal].length) { // Only execute in the second half of the iterations. // Reward. pinakion.transfer(vote.account, tokenReward); // Intentional use to avoid blocking. vote.account.send(ETHReward); // solium-disable-line security/no-send emit TokenAndETHShift(vote.account, _disputeID, int(tokenReward), int(ETHReward)); jurors[vote.account].lockedTokens -= dispute.tokensAtStakePerJuror[_appeal]; } } else { // Juror was inactive, or voted incoherently and it was not a tie. if (i < dispute.votes[_appeal].length) { // Only execute in the first half of the iterations. // Penalize. uint penalty = dispute.tokensAtStakePerJuror[_appeal] > pinakion.balanceOf(vote.account) ? pinakion.balanceOf(vote.account) : dispute.tokensAtStakePerJuror[_appeal]; pinakion.transferFrom(vote.account, this, penalty); emit TokenAndETHShift(vote.account, _disputeID, -int(penalty), 0); penaltiesInRoundCache += penalty; jurors[vote.account].lockedTokens -= dispute.tokensAtStakePerJuror[_appeal]; // Unstake juror if his penalty made balance less than his total stake or if he lost due to inactivity. if (pinakion.balanceOf(vote.account) < jurors[vote.account].stakedTokens || !vote.voted) for (uint j = 0; j < jurors[vote.account].subcourtIDs.length; j++) _setStake(vote.account, jurors[vote.account].subcourtIDs[j], 0); } } if (i == dispute.votes[_appeal].length - 1) { // Send fees and tokens to the governor if no one was coherent. if (dispute.votesInEachRound[_appeal] == 0 || !dispute.voteCounters[dispute.voteCounters.length - 1].tied && dispute.voteCounters[_appeal].counts[dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice] == 0) { // Intentional use to avoid blocking. governor.send(dispute.totalFeesForJurors[_appeal]); // solium-disable-line security/no-send pinakion.transfer(governor, penaltiesInRoundCache); } else if (i + 1 < end) { // Compute rewards because we are going into rewarding. dispute.penaltiesInEachRound[_appeal] = penaltiesInRoundCache; (tokenReward, ETHReward) = computeTokenAndETHRewards(_disputeID, _appeal); } } } if (dispute.penaltiesInEachRound[_appeal] != penaltiesInRoundCache) dispute.penaltiesInEachRound[_appeal] = penaltiesInRoundCache; dispute.repartitionsInEachRound[_appeal] = end; lockInsolventTransfers = true; } /** @dev Executes a specified dispute's ruling. UNTRUSTED. * @param _disputeID The ID of the dispute. */ function executeRuling(uint _disputeID) external onlyDuringPeriod(_disputeID, Period.execution) { Dispute storage dispute = disputes[_disputeID]; require(!dispute.ruled, "Ruling already executed."); dispute.ruled = true; uint winningChoice = dispute.voteCounters[dispute.voteCounters.length - 1].tied ? 0 : dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice; dispute.arbitrated.rule(_disputeID, winningChoice); } /* Public */ /** @dev Creates a dispute. Must be called by the arbitrable contract. * @param _numberOfChoices Number of choices to choose from in the dispute to be created. * @param _extraData Additional info about the dispute to be created. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes). * @return The ID of the created dispute. */ function createDispute( uint _numberOfChoices, bytes _extraData ) public payable requireArbitrationFee(_extraData) returns(uint disputeID) { (uint96 subcourtID, uint minJurors) = extraDataToSubcourtIDAndMinJurors(_extraData); disputeID = disputes.length++; Dispute storage dispute = disputes[disputeID]; dispute.subcourtID = subcourtID; dispute.arbitrated = Arbitrable(msg.sender); dispute.numberOfChoices = _numberOfChoices; dispute.period = Period.evidence; dispute.lastPeriodChange = now; // As many votes that can be afforded by the provided funds. dispute.votes[dispute.votes.length++].length = msg.value / courts[dispute.subcourtID].feeForJuror; dispute.voteCounters[dispute.voteCounters.length++].tied = true; dispute.tokensAtStakePerJuror.push((courts[dispute.subcourtID].minStake * courts[dispute.subcourtID].alpha) / ALPHA_DIVISOR); dispute.totalFeesForJurors.push(msg.value); dispute.votesInEachRound.push(0); dispute.repartitionsInEachRound.push(0); dispute.penaltiesInEachRound.push(0); disputesWithoutJurors++; emit DisputeCreation(disputeID, Arbitrable(msg.sender)); } /** @dev Appeals the ruling of a specified dispute. * @param _disputeID The ID of the dispute. * @param _extraData Additional info about the appeal. Not used by this contract. */ function appeal( uint _disputeID, bytes _extraData ) public payable requireAppealFee(_disputeID, _extraData) onlyDuringPeriod(_disputeID, Period.appeal) { Dispute storage dispute = disputes[_disputeID]; require( msg.sender == address(dispute.arbitrated), "Can only be called by the arbitrable contract." ); if (dispute.votes[dispute.votes.length - 1].length >= courts[dispute.subcourtID].jurorsForCourtJump) // Jump to parent subcourt. dispute.subcourtID = courts[dispute.subcourtID].parent; dispute.period = Period.evidence; dispute.lastPeriodChange = now; // As many votes that can be afforded by the provided funds. dispute.votes[dispute.votes.length++].length = msg.value / courts[dispute.subcourtID].feeForJuror; dispute.voteCounters[dispute.voteCounters.length++].tied = true; dispute.tokensAtStakePerJuror.push((courts[dispute.subcourtID].minStake * courts[dispute.subcourtID].alpha) / ALPHA_DIVISOR); dispute.totalFeesForJurors.push(msg.value); dispute.drawsInRound = 0; dispute.commitsInRound = 0; dispute.votesInEachRound.push(0); dispute.repartitionsInEachRound.push(0); dispute.penaltiesInEachRound.push(0); disputesWithoutJurors++; emit AppealDecision(_disputeID, Arbitrable(msg.sender)); } /** @dev Called when `_owner` sends ether to the MiniMe Token contract. * @param _owner The address that sent the ether to create tokens. * @return Whether the operation should be allowed or not. */ function proxyPayment(address _owner) public payable returns(bool allowed) { allowed = false; } /** @dev Notifies the controller about a token transfer allowing the controller to react if desired. * @param _from The origin of the transfer. * @param _to The destination of the transfer. * @param _amount The amount of the transfer. * @return Whether the operation should be allowed or not. */ function onTransfer(address _from, address _to, uint _amount) public returns(bool allowed) { if (lockInsolventTransfers) { // Never block penalties or rewards. uint newBalance = pinakion.balanceOf(_from) - _amount; if (newBalance < jurors[_from].stakedTokens || newBalance < jurors[_from].lockedTokens) return false; } allowed = true; } /** @dev Notifies the controller about an approval allowing the controller to react if desired. * @param _owner The address that calls `approve()`. * @param _spender The spender in the `approve()` call. * @param _amount The amount in the `approve()` call. * @return Whether the operation should be allowed or not. */ function onApprove(address _owner, address _spender, uint _amount) public returns(bool allowed) { allowed = true; } /* Public Views */ /** @dev Gets the cost of arbitration in a specified subcourt. * @param _extraData Additional info about the dispute. We use it to pass the ID of the subcourt to create the dispute in (first 32 bytes) and the minimum number of jurors required (next 32 bytes). * @return The cost. */ function arbitrationCost(bytes _extraData) public view returns(uint cost) { (uint96 subcourtID, uint minJurors) = extraDataToSubcourtIDAndMinJurors(_extraData); cost = courts[subcourtID].feeForJuror * minJurors; } /** @dev Gets the cost of appealing a specified dispute. * @param _disputeID The ID of the dispute. * @param _extraData Additional info about the appeal. Not used by this contract. * @return The cost. */ function appealCost(uint _disputeID, bytes _extraData) public view returns(uint cost) { Dispute storage dispute = disputes[_disputeID]; uint lastNumberOfJurors = dispute.votes[dispute.votes.length - 1].length; if (lastNumberOfJurors >= courts[dispute.subcourtID].jurorsForCourtJump) { // Jump to parent subcourt. if (dispute.subcourtID == 0) // Already in the general court. cost = NON_PAYABLE_AMOUNT; else // Get the cost of the parent subcourt. cost = courts[courts[dispute.subcourtID].parent].feeForJuror * ((lastNumberOfJurors * 2) + 1); } else // Stay in current subcourt. cost = courts[dispute.subcourtID].feeForJuror * ((lastNumberOfJurors * 2) + 1); } /** @dev Gets the start and end of a specified dispute's current appeal period. * @param _disputeID The ID of the dispute. * @return The start and end of the appeal period. */ function appealPeriod(uint _disputeID) public view returns(uint start, uint end) { Dispute storage dispute = disputes[_disputeID]; if (dispute.period == Period.appeal) { start = dispute.lastPeriodChange; end = dispute.lastPeriodChange + courts[dispute.subcourtID].timesPerPeriod[uint(Period.appeal)]; } else { start = 0; end = 0; } } /** @dev Gets the status of a specified dispute. * @param _disputeID The ID of the dispute. * @return The status. */ function disputeStatus(uint _disputeID) public view returns(DisputeStatus status) { Dispute storage dispute = disputes[_disputeID]; if (dispute.period < Period.appeal) status = DisputeStatus.Waiting; else if (dispute.period < Period.execution) status = DisputeStatus.Appealable; else status = DisputeStatus.Solved; } /** @dev Gets the current ruling of a specified dispute. * @param _disputeID The ID of the dispute. * @return The current ruling. */ function currentRuling(uint _disputeID) public view returns(uint ruling) { Dispute storage dispute = disputes[_disputeID]; ruling = dispute.voteCounters[dispute.voteCounters.length - 1].tied ? 0 : dispute.voteCounters[dispute.voteCounters.length - 1].winningChoice; } /* Internal */ /** @dev Sets the specified juror's stake in a subcourt. * `O(n + p * log_k(j))` where * `n` is the number of subcourts the juror has staked in, * `p` is the depth of the subcourt tree, * `k` is the minimum number of children per node of one of these subcourts' sortition sum tree, * and `j` is the maximum number of jurors that ever staked in one of these subcourts simultaneously. * @param _account The address of the juror. * @param _subcourtID The ID of the subcourt. * @param _stake The new stake. * @return True if the call succeeded, false otherwise. */ function _setStake(address _account, uint96 _subcourtID, uint128 _stake) internal returns(bool succeeded) { if (!(_subcourtID < courts.length)) return false; // Delayed action logic. if (phase != Phase.staking) { delayedSetStakes[++lastDelayedSetStake] = DelayedSetStake({ account: _account, subcourtID: _subcourtID, stake: _stake }); return true; } if (!(_stake == 0 || courts[_subcourtID].minStake <= _stake)) return false; // The juror's stake cannot be lower than the minimum stake for the subcourt. Juror storage juror = jurors[_account]; bytes32 stakePathID = accountAndSubcourtIDToStakePathID(_account, _subcourtID); uint currentStake = sortitionSumTrees.stakeOf(bytes32(_subcourtID), stakePathID); if (!(_stake == 0 || currentStake > 0 || juror.subcourtIDs.length < MAX_STAKE_PATHS)) return false; // Maximum stake paths reached. uint newTotalStake = juror.stakedTokens - currentStake + _stake; // Can't overflow because _stake is a uint128. if (!(_stake == 0 || pinakion.balanceOf(_account) >= newTotalStake)) return false; // The juror's total amount of staked tokens cannot be higher than the juror's balance. // Update juror's records. juror.stakedTokens = newTotalStake; if (_stake == 0) { for (uint i = 0; i < juror.subcourtIDs.length; i++) if (juror.subcourtIDs[i] == _subcourtID) { juror.subcourtIDs[i] = juror.subcourtIDs[juror.subcourtIDs.length - 1]; juror.subcourtIDs.length--; break; } } else if (currentStake == 0) juror.subcourtIDs.push(_subcourtID); // Update subcourt parents. bool finished = false; uint currentSubcourtID = _subcourtID; while (!finished) { sortitionSumTrees.set(bytes32(currentSubcourtID), _stake, stakePathID); if (currentSubcourtID == 0) finished = true; else currentSubcourtID = courts[currentSubcourtID].parent; } emit StakeSet(_account, _subcourtID, _stake, newTotalStake); return true; } /** @dev Gets a subcourt ID and the minimum number of jurors required from a specified extra data bytes array. * @param _extraData The extra data bytes array. The first 32 bytes are the subcourt ID and the next 32 bytes are the minimum number of jurors. * @return The subcourt ID and the minimum number of jurors required. */ function extraDataToSubcourtIDAndMinJurors(bytes _extraData) internal view returns (uint96 subcourtID, uint minJurors) { if (_extraData.length >= 64) { assembly { // solium-disable-line security/no-inline-assembly subcourtID := mload(add(_extraData, 0x20)) minJurors := mload(add(_extraData, 0x40)) } if (subcourtID >= courts.length) subcourtID = 0; if (minJurors == 0) minJurors = MIN_JURORS; } else { subcourtID = 0; minJurors = MIN_JURORS; } } /** @dev Packs an account and a subcourt ID into a stake path ID. * @param _account The account to pack. * @param _subcourtID The subcourt ID to pack. * @return The stake path ID. */ function accountAndSubcourtIDToStakePathID(address _account, uint96 _subcourtID) internal pure returns (bytes32 stakePathID) { assembly { // solium-disable-line security/no-inline-assembly let ptr := mload(0x40) for { let i := 0x00 } lt(i, 0x14) { i := add(i, 0x01) } { mstore8(add(ptr, i), byte(add(0x0c, i), _account)) } for { let i := 0x14 } lt(i, 0x20) { i := add(i, 0x01) } { mstore8(add(ptr, i), byte(i, _subcourtID)) } stakePathID := mload(ptr) } } /** @dev Unpacks a stake path ID into an account and a subcourt ID. * @param _stakePathID The stake path ID to unpack. * @return The account and subcourt ID. */ function stakePathIDToAccountAndSubcourtID(bytes32 _stakePathID) internal pure returns (address account, uint96 subcourtID) { assembly { // solium-disable-line security/no-inline-assembly let ptr := mload(0x40) for { let i := 0x00 } lt(i, 0x14) { i := add(i, 0x01) } { mstore8(add(add(ptr, 0x0c), i), byte(i, _stakePathID)) } account := mload(ptr) subcourtID := _stakePathID } } /* Interface Views */ /** @dev Gets a specified subcourt's non primitive properties. * @param _subcourtID The ID of the subcourt. * @return The subcourt's non primitive properties. */ function getSubcourt(uint96 _subcourtID) external view returns( uint[] children, uint[4] timesPerPeriod ) { Court storage subcourt = courts[_subcourtID]; children = subcourt.children; timesPerPeriod = subcourt.timesPerPeriod; } /** @dev Gets a specified vote for a specified appeal in a specified dispute. * @param _disputeID The ID of the dispute. * @param _appeal The appeal. * @param _voteID The ID of the vote. * @return The vote. */ function getVote(uint _disputeID, uint _appeal, uint _voteID) external view returns( address account, bytes32 commit, uint choice, bool voted ) { Vote storage vote = disputes[_disputeID].votes[_appeal][_voteID]; account = vote.account; commit = vote.commit; choice = vote.choice; voted = vote.voted; } /** @dev Gets the vote counter for a specified appeal in a specified dispute. * Note: This function is only to be used by the interface and it won't work if the number of choices is too high. * @param _disputeID The ID of the dispute. * @param _appeal The appeal. * @return The vote counter. * `O(n)` where * `n` is the number of choices of the dispute. */ function getVoteCounter(uint _disputeID, uint _appeal) external view returns( uint winningChoice, uint[] counts, bool tied ) { Dispute storage dispute = disputes[_disputeID]; VoteCounter storage voteCounter = dispute.voteCounters[_appeal]; winningChoice = voteCounter.winningChoice; counts = new uint[](dispute.numberOfChoices + 1); for (uint i = 0; i <= dispute.numberOfChoices; i++) counts[i] = voteCounter.counts[i]; tied = voteCounter.tied; } /** @dev Gets a specified dispute's non primitive properties. * @param _disputeID The ID of the dispute. * @return The dispute's non primitive properties. * `O(a)` where * `a` is the number of appeals of the dispute. */ function getDispute(uint _disputeID) external view returns( uint[] votesLengths, uint[] tokensAtStakePerJuror, uint[] totalFeesForJurors, uint[] votesInEachRound, uint[] repartitionsInEachRound, uint[] penaltiesInEachRound ) { Dispute storage dispute = disputes[_disputeID]; votesLengths = new uint[](dispute.votes.length); for (uint i = 0; i < dispute.votes.length; i++) votesLengths[i] = dispute.votes[i].length; tokensAtStakePerJuror = dispute.tokensAtStakePerJuror; totalFeesForJurors = dispute.totalFeesForJurors; votesInEachRound = dispute.votesInEachRound; repartitionsInEachRound = dispute.repartitionsInEachRound; penaltiesInEachRound = dispute.penaltiesInEachRound; } /** @dev Gets a specified juror's non primitive properties. * @param _account The address of the juror. * @return The juror's non primitive properties. */ function getJuror(address _account) external view returns( uint96[] subcourtIDs ) { Juror storage juror = jurors[_account]; subcourtIDs = juror.subcourtIDs; } /** @dev Gets the stake of a specified juror in a specified subcourt. * @param _account The address of the juror. * @param _subcourtID The ID of the subcourt. * @return The stake. */ function stakeOf(address _account, uint96 _subcourtID) external view returns(uint stake) { return sortitionSumTrees.stakeOf(bytes32(_subcourtID), accountAndSubcourtIDToStakePathID(_account, _subcourtID)); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"_pinakion","type":"address"}],"name":"changePinakion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RNBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"disputesWithoutJurors","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"passPhase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"governor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastDelayedSetStake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"}],"name":"disputeStatus","outputs":[{"name":"status","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"}],"name":"passPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxDrawingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"}],"name":"currentRuling","outputs":[{"name":"ruling","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"courts","outputs":[{"name":"parent","type":"uint96"},{"name":"hiddenVotes","type":"bool"},{"name":"minStake","type":"uint256"},{"name":"alpha","type":"uint256"},{"name":"feeForJuror","type":"uint256"},{"name":"jurorsForCourtJump","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_appeal","type":"uint256"},{"name":"_iterations","type":"uint256"}],"name":"execute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ALPHA_DIVISOR","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_voteIDs","type":"uint256[]"},{"name":"_choice","type":"uint256"},{"name":"_salt","type":"uint256"}],"name":"castVote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint96"},{"name":"_minStake","type":"uint256"}],"name":"changeSubcourtMinStake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_subcourtID","type":"uint96"}],"name":"getSubcourt","outputs":[{"name":"children","type":"uint256[]"},{"name":"timesPerPeriod","type":"uint256[4]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"appeal","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"onTransfer","outputs":[{"name":"allowed","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"disputes","outputs":[{"name":"subcourtID","type":"uint96"},{"name":"arbitrated","type":"address"},{"name":"numberOfChoices","type":"uint256"},{"name":"period","type":"uint8"},{"name":"lastPeriodChange","type":"uint256"},{"name":"drawsInRound","type":"uint256"},{"name":"commitsInRound","type":"uint256"},{"name":"ruled","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint96"},{"name":"_timesPerPeriod","type":"uint256[4]"}],"name":"changeSubcourtTimesPerPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint96"},{"name":"_feeForJuror","type":"uint256"}],"name":"changeSubcourtJurorFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint96"},{"name":"_alpha","type":"uint256"}],"name":"changeSubcourtAlpha","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_voteIDs","type":"uint256[]"},{"name":"_commit","type":"bytes32"}],"name":"castCommit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RN","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RNGenerator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_destination","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"executeGovernorProposal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_minStakingTime","type":"uint256"}],"name":"changeMinStakingTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"NON_PAYABLE_AMOUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint96"},{"name":"_stake","type":"uint128"}],"name":"setStake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"}],"name":"executeRuling","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_appeal","type":"uint256"},{"name":"_voteID","type":"uint256"}],"name":"getVote","outputs":[{"name":"account","type":"address"},{"name":"commit","type":"bytes32"},{"name":"choice","type":"uint256"},{"name":"voted","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_RNGenerator","type":"address"}],"name":"changeRNGenerator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_iterations","type":"uint256"}],"name":"executeDelayedSetStakes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"},{"name":"_subcourtID","type":"uint96"}],"name":"stakeOf","outputs":[{"name":"stake","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint96"},{"name":"_jurorsForCourtJump","type":"uint256"}],"name":"changeSubcourtJurorsForJump","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"}],"name":"appealPeriod","outputs":[{"name":"start","type":"uint256"},{"name":"end","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"phase","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_STAKE_PATHS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"delayedSetStakes","outputs":[{"name":"account","type":"address"},{"name":"subcourtID","type":"uint96"},{"name":"stake","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastPhaseChange","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minStakingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextDelayedSetStake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_numberOfChoices","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"createDispute","outputs":[{"name":"disputeID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_iterations","type":"uint256"}],"name":"drawJurors","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_parent","type":"uint96"},{"name":"_hiddenVotes","type":"bool"},{"name":"_minStake","type":"uint256"},{"name":"_alpha","type":"uint256"},{"name":"_feeForJuror","type":"uint256"},{"name":"_jurorsForCourtJump","type":"uint256"},{"name":"_timesPerPeriod","type":"uint256[4]"},{"name":"_sortitionSumTreeK","type":"uint256"}],"name":"createSubcourt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"}],"name":"getJuror","outputs":[{"name":"subcourtIDs","type":"uint96[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"onApprove","outputs":[{"name":"allowed","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"jurors","outputs":[{"name":"stakedTokens","type":"uint256"},{"name":"lockedTokens","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxDrawingTime","type":"uint256"}],"name":"changeMaxDrawingTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"}],"name":"getDispute","outputs":[{"name":"votesLengths","type":"uint256[]"},{"name":"tokensAtStakePerJuror","type":"uint256[]"},{"name":"totalFeesForJurors","type":"uint256[]"},{"name":"votesInEachRound","type":"uint256[]"},{"name":"repartitionsInEachRound","type":"uint256[]"},{"name":"penaltiesInEachRound","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_appeal","type":"uint256"}],"name":"getVoteCounter","outputs":[{"name":"winningChoice","type":"uint256"},{"name":"counts","type":"uint256[]"},{"name":"tied","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_governor","type":"address"}],"name":"changeGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MIN_JURORS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeID","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"appealCost","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"proxyPayment","outputs":[{"name":"allowed","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"lockInsolventTransfers","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_extraData","type":"bytes"}],"name":"arbitrationCost","outputs":[{"name":"cost","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pinakion","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_governor","type":"address"},{"name":"_pinakion","type":"address"},{"name":"_RNGenerator","type":"address"},{"name":"_minStakingTime","type":"uint256"},{"name":"_maxDrawingTime","type":"uint256"},{"name":"_hiddenVotes","type":"bool"},{"name":"_minStake","type":"uint256"},{"name":"_alpha","type":"uint256"},{"name":"_feeForJuror","type":"uint256"},{"name":"_jurorsForCourtJump","type":"uint256"},{"name":"_timesPerPeriod","type":"uint256[4]"},{"name":"_sortitionSumTreeK","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_phase","type":"uint8"}],"name":"NewPhase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_disputeID","type":"uint256"},{"indexed":false,"name":"_period","type":"uint8"}],"name":"NewPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_address","type":"address"},{"indexed":false,"name":"_subcourtID","type":"uint256"},{"indexed":false,"name":"_stake","type":"uint128"},{"indexed":false,"name":"_newTotalStake","type":"uint256"}],"name":"StakeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_address","type":"address"},{"indexed":true,"name":"_disputeID","type":"uint256"},{"indexed":false,"name":"_appeal","type":"uint256"},{"indexed":false,"name":"_voteID","type":"uint256"}],"name":"Draw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_address","type":"address"},{"indexed":true,"name":"_disputeID","type":"uint256"},{"indexed":false,"name":"_tokenAmount","type":"int256"},{"indexed":false,"name":"_ETHAmount","type":"int256"}],"name":"TokenAndETHShift","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_disputeID","type":"uint256"},{"indexed":true,"name":"_arbitrable","type":"address"}],"name":"DisputeCreation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_disputeID","type":"uint256"},{"indexed":true,"name":"_arbitrable","type":"address"}],"name":"AppealPossible","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_disputeID","type":"uint256"},{"indexed":true,"name":"_arbitrable","type":"address"}],"name":"AppealDecision","type":"event"}]
Contract Creation Code
60806040526009805460ff19166001908117909155600d553480156200002457600080fd5b506040516101e08062005e6483398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190919082608001805190602001909291905050508b6000806101000a815481600160a060020a030219169083600160a060020a031602179055508a600160006101000a815481600160a060020a030219169083600160a060020a0316021790555089600260006101000a815481600160a060020a030219169083600160a060020a03160217905550886007819055508760088190555042600381905550600a6101006040519081016040528060006001606060020a03168152602001600060405190808252806020026020018201604052801562000187578160200160208202803883390190505b508152891515602080830191909152604082018a9052606082018990526080820188905260a0820187905260c0909101859052825460018082018086556000958652948390208451600b9093020180546001606060020a0319166001606060020a0390931692909217825583830151805192936200020c93928501929101906200030e565b50604082015160028201805460ff191691151591909117905560608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e083015162000267916007840191906200035e565b5050604080517f9075789e000000000000000000000000000000000000000000000000000000008152600b600482015260006024820181905260448201869052915173180eba68d164c3f8c3f6dc354125ebccf4dfcb869450639075789e935060648083019392829003018186803b158015620002e357600080fd5b505af4158015620002f8573d6000803e3d6000fd5b50505050505050505050505050505050620003ae565b8280548282559060005260206000209081019282156200034c579160200282015b828111156200034c5782518255916020019190600101906200032f565b506200035a9291506200038e565b5090565b82600481019282156200034c57916020028201828111156200034c5782518255916020019190600101906200032f565b620003ab91905b808211156200035a576000815560010162000395565b90565b615aa680620003be6000396000f3006080604052600436106102995763ffffffff60e060020a600035041662f5822c811461029e578063023d44df146102c157806303432744146102e85780630b274f2e146102fd5780630c340a24146103125780630d44cf791461034357806310f169e814610358578063115d5376146103945780631b92bbbe146103ac5780631c3db16d146103c15780631f5a0dd2146103d95780632d29a47b1461042e5780632ea7b4d01461044c5780633850f804146104615780633e1d09be1461048b57806340026c87146104af57806349912f881461054d5780634a3931491461059e578063564a565d146105dc578063572603641461066057806359354c77146106835780635bc24dd3146106a75780635c92e2f6146106cb5780635e4a627d146106f25780636a4f8f3914610707578063751accd01461071c578063823cfd701461074d578063840bc19c1461076557806385c855f31461077a5780638bb04875146107a75780638ce7ff4a146107bf57806396d92a721461080f5780639929057b14610830578063a2473cc114610848578063a57366e714610875578063afe15cfb14610899578063b1c9fe6e146108ca578063b4a61608146108df578063b78a80ff146108f4578063b888adfa14610945578063c057eca71461095a578063c108f3b41461096f578063c13517e114610984578063cbd88663146109d5578063ce9e7730146109f0578063d4155d1f14610a28578063da682aeb14610a99578063dca5f6b014610ac3578063dd5e5cb514610ae4578063e3a96cbd14610afc578063e3b0073e14610cc1578063e4c0aaf414610d42578063eaff425a14610d63578063f23f16e614610d78578063f48c305414610dd6578063f66d685a14610dea578063f7434ea914610dff578063fbf405b014610e58575b600080fd5b3480156102aa57600080fd5b506102bf600160a060020a0360043516610e6d565b005b3480156102cd57600080fd5b506102d6610eb3565b60408051918252519081900360200190f35b3480156102f457600080fd5b506102d6610eb9565b34801561030957600080fd5b506102bf610ebf565b34801561031e57600080fd5b50610327611327565b60408051600160a060020a039092168252519081900360200190f35b34801561034f57600080fd5b506102d6611336565b34801561036457600080fd5b5061037060043561133c565b6040518082600281111561038057fe5b60ff16815260200191505060405180910390f35b3480156103a057600080fd5b506102bf6004356113b3565b3480156103b857600080fd5b506102d6611b11565b3480156103cd57600080fd5b506102d6600435611b17565b3480156103e557600080fd5b506103f1600435611ba1565b604080516001606060020a0390971687529415156020870152858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561043a57600080fd5b506102bf600435602435604435611bf3565b34801561045857600080fd5b506102d6612780565b34801561046d57600080fd5b506102bf600480359060248035908101910135604435606435612786565b34801561049757600080fd5b506102bf6001606060020a0360043516602435612cfd565b3480156104bb57600080fd5b506104d06001606060020a0360043516612efe565b604051806020810183608080838360005b838110156104f95781810151838201526020016104e1565b50505050905001828103825284818151815260200191508051906020019060200280838360005b83811015610538578181015183820152602001610520565b50505050905001935050505060405180910390f35b60408051602060046024803582810135601f81018590048502860185019096528585526102bf958335953695604494919390910191908190840183828082843750949750612fc09650505050505050565b3480156105aa57600080fd5b506105c8600160a060020a03600435811690602435166044356133cd565b604080519115158252519081900360200190f35b3480156105e857600080fd5b506105f46004356134c1565b604080516001606060020a038a168152600160a060020a03891660208201529081018790526060810186600481111561062957fe5b60ff168152602001858152602001848152602001838152602001821515151581526020019850505050505050505060405180910390f35b34801561066c57600080fd5b506102bf6001606060020a03600435166024613538565b34801561068f57600080fd5b506102bf6001606060020a036004351660243561358c565b3480156106b357600080fd5b506102bf6001606060020a03600435166024356135d5565b3480156106d757600080fd5b506102bf60048035906024803590810191013560443561361e565b3480156106fe57600080fd5b506102d661386c565b34801561071357600080fd5b50610327613872565b34801561072857600080fd5b506102bf60048035600160a060020a0316906024803591604435918201910135613881565b34801561075957600080fd5b506102bf6004356138da565b34801561077157600080fd5b506102d66138f6565b34801561078657600080fd5b506102bf6001606060020a03600435166001608060020a036024351661391a565b3480156107b357600080fd5b506102bf600435613934565b3480156107cb57600080fd5b506107dd600435602435604435613afc565b60408051600160a060020a03909516855260208501939093528383019190915215156060830152519081900360800190f35b34801561081b57600080fd5b506102bf600160a060020a0360043516613b89565b34801561083c57600080fd5b506102bf600435613c72565b34801561085457600080fd5b506102d6600160a060020a03600435166001606060020a0360243516613d68565b34801561088157600080fd5b506102bf6001606060020a0360043516602435613e15565b3480156108a557600080fd5b506108b1600435613e5e565b6040805192835260208301919091528051918290030190f35b3480156108d657600080fd5b50610370613ef2565b3480156108eb57600080fd5b506102d6613f02565b34801561090057600080fd5b5061090c600435613f07565b60408051600160a060020a0390941684526001606060020a0390921660208401526001608060020a031682820152519081900360600190f35b34801561095157600080fd5b506102d6613f45565b34801561096657600080fd5b506102d6613f4b565b34801561097b57600080fd5b506102d6613f51565b60408051602060046024803582810135601f81018590048502860185019096528585526102d6958335953695604494919390910191908190840183828082843750949750613f579650505050505050565b3480156109e157600080fd5b506102bf60043560243561423c565b3480156109fc57600080fd5b506102bf6001606060020a0360043516602435151560443560643560843560a43560c461014435614561565b348015610a3457600080fd5b50610a49600160a060020a036004351661485e565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610a85578181015183820152602001610a6d565b505050509050019250505060405180910390f35b348015610aa557600080fd5b506105c8600160a060020a0360043581169060243516604435614901565b348015610acf57600080fd5b506108b1600160a060020a036004351661490a565b348015610af057600080fd5b506102bf600435614926565b348015610b0857600080fd5b50610b14600435614942565b6040518080602001806020018060200180602001806020018060200187810387528d818151815260200191508051906020019060200280838360005b83811015610b68578181015183820152602001610b50565b5050505090500187810386528c818151815260200191508051906020019060200280838360005b83811015610ba7578181015183820152602001610b8f565b5050505090500187810385528b818151815260200191508051906020019060200280838360005b83811015610be6578181015183820152602001610bce565b5050505090500187810384528a818151815260200191508051906020019060200280838360005b83811015610c25578181015183820152602001610c0d565b50505050905001878103835289818151815260200191508051906020019060200280838360005b83811015610c64578181015183820152602001610c4c565b50505050905001878103825288818151815260200191508051906020019060200280838360005b83811015610ca3578181015183820152602001610c8b565b505050509050019c5050505050505050505050505060405180910390f35b348015610ccd57600080fd5b50610cdc600435602435614ba2565b604051808481526020018060200183151515158152602001828103825284818151815260200191508051906020019060200280838360005b83811015610d2c578181015183820152602001610d14565b5050505090500194505050505060405180910390f35b348015610d4e57600080fd5b506102bf600160a060020a0360043516614c7e565b348015610d6f57600080fd5b506102d6614cc4565b348015610d8457600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102d6958335953695604494919390910191908190840183828082843750949750614cc99650505050505050565b6105c8600160a060020a0360043516614e26565b348015610df657600080fd5b506105c8614e2c565b348015610e0b57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102d6943694929360249392840191908190840183828082843750949750614e359650505050505050565b348015610e6457600080fd5b50610327614e7c565b600054600160a060020a03163314610e8457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055481565b60045481565b60006002805460a060020a900460ff1690811115610ed957fe5b141561109b5760075460035442031015610f63576040805160e560020a62461bcd02815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201527f20706173736564207965742e0000000000000000000000000000000000000000606482015290519081900360840190fd5b600454600010610fe3576040805160e560020a62461bcd02815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e6565642060448201527f6a75726f72732e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600143016005819055600254604080517f7b9c34e0000000000000000000000000000000000000000000000000000000008152600481019390935251600160a060020a0390911691637b9c34e091602480830192600092919082900301818387803b15801561105157600080fd5b505af1158015611065573d6000803e3d6000fd5b5050600280546001935090915074ff0000000000000000000000000000000000000000191660a060020a835b02179055506112ca565b60016002805460a060020a900460ff16908111156110b557fe5b14156111d557600254600554604080517f1c73601e000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a0390921691631c73601e916024808201926020929091908290030181600087803b15801561112557600080fd5b505af1158015611139573d6000803e3d6000fd5b505050506040513d602081101561114f57600080fd5b5051600681905515156111ac576040805160e560020a62461bcd02815260206004820152601f60248201527f52616e646f6d206e756d626572206973206e6f74207265616479207965742e00604482015290519081900360640190fd5b60028054819074ff0000000000000000000000000000000000000000191660a060020a82611091565b600280805460a060020a900460ff16908111156111ee57fe5b14156112ca5760045415806112095750600854600354420310155b15156112ab576040805160e560020a62461bcd02815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e672060648201527f74696d6520686173206e6f7420706173736564207965742e0000000000000000608482015290519081900360a40190fd5b6002805474ff0000000000000000000000000000000000000000191690555b426003819055507f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b93600260149054906101000a900460ff166040518082600281111561131257fe5b60ff16815260200191505060405180910390a1565b600054600160a060020a031681565b600e5481565b600080600f8381548110151561134e57fe5b60009182526020909120600e9091020190506003600282015460ff16600481111561137557fe5b101561138457600091506113ad565b6004600282015460ff16600481111561139957fe5b10156113a857600191506113ad565b600291505b50919050565b6000600f828154811015156113c457fe5b600091825260208220600e909102019150600282015460ff1660048111156113e857fe5b14156115fe5760048101546001108061145a57508054600a805490916001606060020a031690811061141657fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff16600481111561144457fe5b6004811061144e57fe5b01548160030154420310155b15156114fd576040805160e560020a62461bcd028152602060048201526044602482018190527f5468652065766964656e636520706572696f642074696d6520686173206e6f74908201527f207061737365642079657420616e64206974206973206e6f7420616e2061707060648201527f65616c2e00000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600481018054600019810190811061151157fe5b60009182526020909120015460088201541461159d576040805160e560020a62461bcd02815260206004820152602960248201527f546865206469737075746520686173206e6f742066696e69736865642064726160448201527f77696e67207965742e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8054600a805490916001606060020a03169081106115b757fe5b600091825260209091206002600b90920201015460ff166115d95760026115dc565b60015b60028201805460ff191660018360048111156115f457fe5b0217905550611ab5565b6001600282015460ff16600481111561161357fe5b1415611758578054600a805490916001606060020a031690811061163357fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff16600481111561166157fe5b6004811061166b57fe5b0154816003015442031015806116a35750600481018054600019810190811061169057fe5b6000918252602090912001546009820154145b1515611745576040805160e560020a62461bcd02815260206004820152605060248201527f54686520636f6d6d697420706572696f642074696d6520686173206e6f74207060448201527f61737365642079657420616e64206e6f74206576657279206a75726f7220686160648201527f7320636f6d6d6974746564207965742e00000000000000000000000000000000608482015290519081900360a40190fd5b6002818101805460ff19166001836115f4565b60028082015460ff16600481111561176c57fe5b141561191c578054600a805490916001606060020a031690811061178c57fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff1660048111156117ba57fe5b600481106117c457fe5b01548160030154420310158061181c575060048101805460001981019081106117e957fe5b6000918252602090912001546004820154600a8301805490916000190190811061180f57fe5b9060005260206000200154145b15156118be576040805160e560020a62461bcd02815260206004820152604a60248201527f54686520766f746520706572696f642074696d6520686173206e6f742070617360448201527f7365642079657420616e64206e6f74206576657279206a75726f72206861732060648201527f766f746564207965742e00000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600281018054600360ff1990911617905580546040516c01000000000000000000000000909104600160a060020a03169083907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611ab5565b6003600282015460ff16600481111561193157fe5b1415611a24578054600a805490916001606060020a031690811061195157fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff16600481111561197f57fe5b6004811061198957fe5b0154600382015442031015611a0e576040805160e560020a62461bcd02815260206004820152602a60248201527f5468652061707065616c20706572696f642074696d6520686173206e6f74207060448201527f6173736564207965742e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b6002810180546004919060ff19166001836115f4565b6004600282015460ff166004811115611a3957fe5b1415611ab5576040805160e560020a62461bcd02815260206004820152602a60248201527f546865206469737075746520697320616c726561647920696e20746865206c6160448201527f737420706572696f642e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b426003820155600281015460405183917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b919160ff9091169080826004811115611afa57fe5b60ff16815260200191505060405180910390a25050565b60085481565b600080600f83815481101515611b2957fe5b60009182526020909120600e90910201600581018054919250906000198101908110611b5157fe5b600091825260209091206002600390920201015460ff16611b97576005810180546000198101908110611b8057fe5b906000526020600020906003020160000154611b9a565b60005b9392505050565b600a805482908110611baf57fe5b60009182526020909120600b90910201805460028201546003830154600484015460058501546006909501546001606060020a03909416955060ff90921693909286565b600080808080808080808b600480600f805484908110611c0f57fe5b600091825260209091206002600e90920201015460ff166004811115611c3157fe5b14611c3b57600080fd5b6009805460ff19169055600f80548f908110611c5357fe5b90600052602060002090600e02019a508b8b600b018e815481101515611c7557fe5b90600052602060002001540199508a600b018d815481101515611c9457fe5b90600052602060002001548a10151515611cad57600080fd5b600c8b0180548e908110611cbd57fe5b600091825260208220015460058d018054919b509199508998506000198101908110611ce557fe5b600091825260209091206002600390920201015460ff16158015611d67575060058b0180548e908110611d1457fe5b906000526020600020906003020160010160008c60050160018e6005018054905003815481101515611d4257fe5b9060005260206000209060030201600001548152602001908152602001600020546000145b15611db35760048b0180548e908110611d7c57fe5b6000918252602090912001548a1115611dae5760048b0180548e908110611d9f57fe5b60009182526020909120015499505b611e51565b60048b0180548e908110611dc357fe5b600091825260209091200154600b8c0180548f908110611ddf57fe5b90600052602060002001541015611df857600080611e02565b611e028e8e614e8b565b60048d018054929a50909850908e908110611e1957fe5b6000918252602090912001546002028a1115611e515760048b0180548e908110611e3f57fe5b60009182526020909120015460020299505b600b8b0180548e908110611e6157fe5b906000526020600020015495505b898610156127025760048b0180548e908110611e8757fe5b906000526020600020018b6004018e815481101515611ea257fe5b60009182526020909120015487811515611eb857fe5b06815481101515611ec557fe5b60009182526020909120600490910201600381015490955060ff168015611f45575060058b0180546000198101908110611efb57fe5b90600052602060002090600302016000015485600201541480611f45575060058b0180546000198101908110611f2d57fe5b600091825260209091206002600390920201015460ff165b156120d95760048b0180548e908110611f5a57fe5b60009182526020909120015486106120d4576001548554604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018c90529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015611fdd57600080fd5b505af1158015611ff1573d6000803e3d6000fd5b505050506040513d602081101561200757600080fd5b50508454604051600160a060020a039091169088156108fc029089906000818181858888f19350505050508d8560000160009054906101000a9004600160a060020a0316600160a060020a03167f24f45c2b08bbde8c837d70b67991ccb7660537cf749de21a940ae4858b681e198a8a604051808381526020018281526020019250505060405180910390a360068b0180548e9081106120a357fe5b60009182526020808320909101548754600160a060020a031683526010909152604090912060020180549190910390555b6124c2565b60048b0180548e9081106120e957fe5b6000918252602090912001548610156124c25760015485546040805160e060020a6370a08231028152600160a060020a039283166004820152905191909216916370a082319160248083019260209291908290030181600087803b15801561215057600080fd5b505af1158015612164573d6000803e3d6000fd5b505050506040513d602081101561217a57600080fd5b505160068c0180548f90811061218c57fe5b9060005260206000200154116121bc5760068b0180548e9081106121ac57fe5b906000526020600020015461223d565b60015485546040805160e060020a6370a08231028152600160a060020a039283166004820152905191909216916370a082319160248083019260209291908290030181600087803b15801561221057600080fd5b505af1158015612224573d6000803e3d6000fd5b505050506040513d602081101561223a57600080fd5b50515b6001548654604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201523060248201526044810185905290519397509116916323b872dd916064808201926020929091908290030181600087803b1580156122b657600080fd5b505af11580156122ca573d6000803e3d6000fd5b505050506040513d60208110156122e057600080fd5b8101908080519060200190929190505050508d8560000160009054906101000a9004600160a060020a0316600160a060020a03167f24f45c2b08bbde8c837d70b67991ccb7660537cf749de21a940ae4858b681e19866000036000604051808381526020018281526020019250505060405180910390a360068b018054998501998e90811061236b57fe5b60009182526020808320909101548754600160a060020a039081168452601083526040808520600201805493909303909255885481168085528285206001908101549054845160e060020a6370a0823102815260048101939093529351909593909216936370a082319360248084019492938390030190829087803b1580156123f357600080fd5b505af1158015612407573d6000803e3d6000fd5b505050506040513d602081101561241d57600080fd5b505110806124305750600385015460ff16155b156124c257600092505b8454600160a060020a03166000908152601060205260409020548310156124c2578454600160a060020a0316600081815260106020526040902080546124b69291908690811061248657fe5b9060005260206000209060029182820401919006600c029054906101000a90046001606060020a0316600061502e565b5060019092019161243a565b60018b6004018e8154811015156124d557fe5b600091825260209091200154038614156126f757600a8b0180548e9081106124f957fe5b9060005260206000200154600014806125a3575060058b018054600019810190811061252157fe5b600091825260209091206002600390920201015460ff161580156125a3575060058b0180548e90811061255057fe5b906000526020600020906003020160010160008c60050160018e600501805490500381548110151561257e57fe5b9060005260206000209060030201600001548152602001908152602001600020546000145b156126be576000809054906101000a9004600160a060020a0316600160a060020a03166108fc8c6007018f8154811015156125da57fe5b90600052602060002001549081150290604051600060405180830381858888f1935050505050600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb6000809054906101000a9004600160a060020a03168b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561268c57600080fd5b505af11580156126a0573d6000803e3d6000fd5b505050506040513d60208110156126b657600080fd5b506126f79050565b898660010110156126f757888b600c018e8154811015156126db57fe5b6000918252602090912001556126f18e8e614e8b565b90985096505b600190950194611e6f565b888b600c018e81548110151561271457fe5b906000526020600020015414151561274557888b600c018e81548110151561273857fe5b6000918252602090912001555b898b600b018e81548110151561275757fe5b60009182526020909120015550506009805460ff19166001179055505050505050505050505050565b61271081565b6000808087600280600f80548490811061279c57fe5b600091825260209091206002600e90920201015460ff1660048111156127be57fe5b146127c857600080fd5b600f80548b9081106127d657fe5b600091825260208220600e90910201955088116127f257600080fd5b600185015487111561289a576040805160e560020a62461bcd02815260206004820152605160248201527f5468652063686f6963652068617320746f206265206c657373207468616e206f60448201527f7220657175616c20746f20746865206e756d626572206f662063686f6963657360648201527f20666f722074686520646973707574652e000000000000000000000000000000608482015290519081900360a40190fd5b600093505b87841015612bef5760048501805433919060001981019081106128be57fe5b906000526020600020018a8a8781811015156128d657fe5b905060200201358154811015156128e957fe5b6000918252602090912060049091020154600160a060020a031614612958576040805160e560020a62461bcd02815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015290519081900360640190fd5b8454600a805490916001606060020a031690811061297257fe5b600091825260209091206002600b90920201015460ff161580612a0057506040805188815260208101889052815190819003909101902060048601805460001981019081106129bd57fe5b906000526020600020018a8a8781811015156129d557fe5b905060200201358154811015156129e857fe5b90600052602060002090600402016001015460001916145b1515612a7c576040805160e560020a62461bcd02815260206004820152602481018290527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20737562636f7572747320776974682068696464656e20766f7465732e606482015290519081900360840190fd5b6004850180546000198101908110612a9057fe5b906000526020600020018989868181101515612aa857fe5b90506020020135815481101515612abb57fe5b600091825260209091206003600490920201015460ff1615612b27576040805160e560020a62461bcd02815260206004820152601260248201527f566f746520616c726561647920636173742e0000000000000000000000000000604482015290519081900360640190fd5b6004850180548891906000198101908110612b3e57fe5b906000526020600020018a8a878181101515612b5657fe5b90506020020135815481101515612b6957fe5b600091825260209091206004918202016002019190915585018054600191906000198101908110612b9657fe5b906000526020600020018a8a878181101515612bae57fe5b90506020020135815481101515612bc157fe5b60009182526020909120600490910201600301805460ff19169115159190911790556001939093019261289f565b6004850154600a860180548a9260001901908110612c0957fe5b6000918252602090912001805490910190556005850180546000198101908110612c2f57fe5b600091825260208083208a845260016003909302019182019052604090912080548a0190558054909350871415612c7f57600283015460ff1615612c7a5760028301805460ff191690555b612cf1565b82546000908152600184016020526040808220548983529120541415612cc157600283015460ff161515612c7a5760028301805460ff19166001179055612cf1565b82546000908152600184016020526040808220548983529120541115612cf15786835560028301805460ff191690555b50505050505050505050565b60008054600160a060020a03163314612d1557600080fd5b6001606060020a0383161580612d7c575081600a80856001606060020a0316815481101515612d4057fe5b60009182526020909120600b909102015481546001606060020a03909116908110612d6757fe5b90600052602060002090600b02016003015411155b1515612d8757600080fd5b5060005b600a80546001606060020a038516908110612da257fe5b90600052602060002090600b020160010180549050811015612ecb5781600a80856001606060020a0316815481101515612dd857fe5b90600052602060002090600b020160010183815481101515612df657fe5b9060005260206000200154815481101515612e0d57fe5b90600052602060002090600b02016003015410151515612ec3576040805160e560020a62461bcd02815260206004820152604960248201527f4120737562636f7572742063616e6e6f742062652074686520706172656e742060448201527f6f66206120737562636f75727420776974682061206c6f776572206d696e696d60648201527f756d207374616b652e0000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600101612d8b565b81600a846001606060020a0316815481101515612ee457fe5b90600052602060002090600b020160030181905550505050565b6060612f086156f5565b6000600a846001606060020a0316815481101515612f2257fe5b90600052602060002090600b0201905080600101805480602002602001604051908101604052809291908181526020018280548015612f8057602002820191906000526020600020905b815481526020019060010190808311612f6c575b505060408051608081019182905294975060078601935060049250905082845b815481526020019060010190808311612fa0575050505050915050915091565b60008282612fce8282614cc9565b34101561304b576040805160e560020a62461bcd02815260206004820152602560248201527f4e6f7420656e6f7567682045544820746f20636f7665722061707065616c206360448201527f6f7374732e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b84600380600f80548490811061305d57fe5b600091825260209091206002600e90920201015460ff16600481111561307f57fe5b1461308957600080fd5b600f80548890811061309757fe5b60009182526020909120600e9091020180549095506c010000000000000000000000009004600160a060020a03163314613141576040805160e560020a62461bcd02815260206004820152602e60248201527f43616e206f6e6c792062652063616c6c6564206279207468652061726269747260448201527f61626c6520636f6e74726163742e000000000000000000000000000000000000606482015290519081900360840190fd5b8454600a805490916001606060020a031690811061315b57fe5b600091825260209091206006600b909202010154600486018054600019810190811061318357fe5b600091825260209091200154106131df578454600a805490916001606060020a03169081106131ae57fe5b60009182526020909120600b909102015485546bffffffffffffffffffffffff19166001606060020a039091161785555b60028501805460ff191690554260038601558454600a805490916001606060020a031690811061320b57fe5b90600052602060002090600b0201600501543481151561322757fe5b600487018054929091049161323f8260018301615714565b8154811061324957fe5b906000526020600020018161325e9190615738565b506005850180546001919061327582828501615764565b8154811061327f57fe5b60009182526020909120600390910201600201805460ff19169115159190911790558454600a8054600688019261271092916001606060020a039091169081106132c557fe5b600091825260209091206004600b9092020101548754600a805490916001606060020a03169081106132f357fe5b90600052602060002090600b0201600301540281151561330f57fe5b825460018181018555600094855260208086209490930493909101929092556007880180548084018255908452818420349101556008880183905560098801839055600a88018054808401825590845281842001839055600b88018054808401825590845281842001839055600c88018054808401825590845290832001829055600480549091019055604051339189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a350505050505050565b600954600090819060ff16156134b4576001546040805160e060020a6370a08231028152600160a060020a0388811660048301529151869392909216916370a08231916024808201926020929091908290030181600087803b15801561343257600080fd5b505af1158015613446573d6000803e3d6000fd5b505050506040513d602081101561345c57600080fd5b5051600160a060020a03871660009081526010602052604090206001015491900391508110806134a65750600160a060020a03851660009081526010602052604090206002015481105b156134b457600091506134b9565b600191505b509392505050565b600f8054829081106134cf57fe5b60009182526020909120600e90910201805460018201546002830154600384015460088501546009860154600d909601546001606060020a03861697506c01000000000000000000000000909504600160a060020a031695939460ff9384169492939192911688565b600054600160a060020a0316331461354f57600080fd5b80600a836001606060020a031681548110151561356857fe5b90600052602060002090600b0201600701906004613587929190615790565b505050565b600054600160a060020a031633146135a357600080fd5b80600a836001606060020a03168154811015156135bc57fe5b90600052602060002090600b0201600501819055505050565b600054600160a060020a031633146135ec57600080fd5b80600a836001606060020a031681548110151561360557fe5b90600052602060002090600b0201600401819055505050565b60008085600180600f80548490811061363357fe5b600091825260209091206002600e90920201015460ff16600481111561365557fe5b1461365f57600080fd5b600f80548990811061366d57fe5b60009182526020909120600e90910201935084151561368b57600080fd5b600092505b858310156138595760048401805433919060001981019081106136af57fe5b9060005260206000200188888681811015156136c757fe5b905060200201358154811015156136da57fe5b6000918252602090912060049091020154600160a060020a031614613749576040805160e560020a62461bcd02815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015290519081900360640190fd5b60048401805460009190600019810190811061376157fe5b90600052602060002001888886818110151561377957fe5b9050602002013581548110151561378c57fe5b6000918252602090912060016004909202010154146137f5576040805160e560020a62461bcd02815260206004820152601c60248201527f416c726561647920636f6d6d6974746564207468697320766f74652e00000000604482015290519081900360640190fd5b600484018054869190600019810190811061380c57fe5b90600052602060002001888886818110151561382457fe5b9050602002013581548110151561383757fe5b6000918252602090912060016004909202018101919091559290920191613690565b5050506009018054909201909155505050565b60065481565b600254600160a060020a031681565b600054600160a060020a0316331461389857600080fd5b83600160a060020a03168383836040518083838082843782019150509250505060006040518083038185875af19250505015156138d457600080fd5b50505050565b600054600160a060020a031633146138f157600080fd5b600755565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b61392533838361502e565b151561393057600080fd5b5050565b60008082600480600f80548490811061394957fe5b600091825260209091206002600e90920201015460ff16600481111561396b57fe5b1461397557600080fd5b600f80548690811061398357fe5b60009182526020909120600e90910201600d81015490945060ff16156139f3576040805160e560020a62461bcd02815260206004820152601860248201527f52756c696e6720616c72656164792065786563757465642e0000000000000000604482015290519081900360640190fd5b600d8401805460ff191660011790556005840180546000198101908110613a1657fe5b600091825260209091206002600390920201015460ff16613a5c576005840180546000198101908110613a4557fe5b906000526020600020906003020160000154613a5f565b60005b8454604080517f311a6c56000000000000000000000000000000000000000000000000000000008152600481018990526024810184905290519295506c01000000000000000000000000909104600160a060020a03169163311a6c569160448082019260009290919082900301818387803b158015613add57600080fd5b505af1158015613af1573d6000803e3d6000fd5b505050505050505050565b6000806000806000600f88815481101515613b1357fe5b90600052602060002090600e020160040187815481101515613b3157fe5b9060005260206000200186815481101515613b4857fe5b60009182526020909120600490910201805460018201546002830154600390930154600160a060020a039092169b909a5091985060ff169650945050505050565b600054600160a060020a03163314613ba057600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905560016002805460a060020a900460ff1690811115613be257fe5b1415613c6f57600143016005819055600254604080517f7b9c34e0000000000000000000000000000000000000000000000000000000008152600481019390935251600160a060020a0390911691637b9c34e091602480830192600092919082900301818387803b158015613c5657600080fd5b505af1158015613c6a573d6000803e3d6000fd5b505050505b50565b600080808080806002805460a060020a900460ff1690811115613c9157fe5b14613c9b57600080fd5b600e54600187600d54010311613cb15785613cbc565b600d54600e54036001015b600d549095508086019450841015613cd357600080fd5b600d5492505b83831015613d5e576000838152600c6020526040902080546001820154919350613d2791600160a060020a0382169160a060020a90046001606060020a0316906001608060020a031661502e565b506000838152600c60205260408120908155600190810180546fffffffffffffffffffffffffffffffff1916905590920191613cd9565b505050600d555050565b600073180eba68d164c3f8c3f6dc354125ebccf4dfcb86637521ccb1600b6001606060020a038516613d9a878761563c565b6040805160e060020a63ffffffff8716028152600481019490945260248401929092526044830152516064808301926020929190829003018186803b158015613de257600080fd5b505af4158015613df6573d6000803e3d6000fd5b505050506040513d6020811015613e0c57600080fd5b50519392505050565b600054600160a060020a03163314613e2c57600080fd5b80600a836001606060020a0316815481101515613e4557fe5b90600052602060002090600b0201600601819055505050565b6000806000600f84815481101515613e7257fe5b60009182526020909120600e9091020190506003600282015460ff166004811115613e9957fe5b1415613ee35760038101548154600a8054929550916001606060020a03909116908110613ec257fe5b60009182526020909120600a600b9092020101546003820154019150613eec565b60009250600091505b50915091565b60025460a060020a900460ff1681565b600481565b600c6020526000908152604090208054600190910154600160a060020a0382169160a060020a90046001606060020a0316906001608060020a031683565b60035481565b60075481565b600d5481565b60008060008084613f6781614e35565b341015613fe4576040805160e560020a62461bcd02815260206004820152602a60248201527f4e6f7420656e6f7567682045544820746f20636f76657220617262697472617460448201527f696f6e20636f7374732e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b613fed8661567b565b600f805492965090945061400490600183016157ce565b9450600f8581548110151561401557fe5b60009182526020909120600e9091020180546bffffffffffffffffffffffff19166001606060020a03868116919091178116336c010000000000000000000000000217808355600183018a905560028301805460ff19169055426003840155600a805493955092911690811061408757fe5b90600052602060002090600b020160050154348115156140a357fe5b60048401805492909104916140bb8260018301615714565b815481106140c557fe5b90600052602060002001816140da9190615738565b50600582018054600191906140f182828501615764565b815481106140fb57fe5b60009182526020909120600390910201600201805460ff19169115159190911790558154600a8054600685019261271092916001606060020a0390911690811061414157fe5b600091825260209091206004600b9092020101548454600a805490916001606060020a031690811061416f57fe5b90600052602060002090600b0201600301540281151561418b57fe5b82546001818101855560009485526020808620949093049390910192909255600785018054808401825590845281842034910155600a85018054808401825590845281842001839055600b85018054808401825590845281842001839055600c85018054808401825590845290832001829055600480549091019055604051339187917f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed9959190a35050505092915050565b6000808080806002806002805460a060020a900460ff169081111561425d57fe5b1461426757600080fd5b87600080600f80548490811061427957fe5b600091825260209091206002600e90920201015460ff16600481111561429b57fe5b146142a557600080fd5b600f80548b9081106142b357fe5b90600052602060002090600e02019750888860080154019650876008015487101515156142df57600080fd5b60048801805460001981019081106142f357fe5b60009182526020909120015487111561432957600488018054600019810190811061431a57fe5b60009182526020909120015496505b876008015495505b868610156145505787546006546040805191825260208083018e90528282018a905281519283900360600183207f88c1d467000000000000000000000000000000000000000000000000000000008452600b60048501526001606060020a03909416602484015260448301939093525161440d9273180eba68d164c3f8c3f6dc354125ebccf4dfcb86926388c1d4679260648083019392829003018186803b1580156143dc57600080fd5b505af41580156143f0573d6000803e3d6000fd5b505050506040513d602081101561440657600080fd5b50516156c9565b60048a0180549297506001606060020a039190911695508691600019810190811061443457fe5b906000526020600020018781548110151561444b57fe5b60009182526020909120600490910201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055600688018054600019810190811061449a57fe5b6000918252602080832090910154600160a060020a03881680845260108352604093849020600201805490920190915560048b01548351600019909101815291820189905282518d9391927f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b92908290030190a360048801805460019190600019810190811061452657fe5b6000918252602090912001540386141561454557600480546000190190555b600190950194614331565b505050505060089290920155505050565b60008054600160a060020a0316331461457957600080fd5b86600a8a6001606060020a031681548110151561459257fe5b90600052602060002090600b02016003015411151515614648576040805160e560020a62461bcd02815260206004820152604760248201527f4120737562636f7572742063616e6e6f742062652061206368696c64206f662060448201527f6120737562636f7572742077697468206120686967686572206d696e696d756d60648201527f207374616b652e00000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b60408051610100810182526001606060020a038b168152815160008152602080820184528201528915158183015260608101899052608080820189905260a0820188905260c082018790528251808201909352600192600a929160e083019190889060049083908390808284375050509190925250508154600180820180855560009485526020948590208451600b9094020180546bffffffffffffffffffffffff19166001606060020a039094169390931783558385015180519195614714938501929101906157fa565b50604082015160028201805460ff191691151591909117905560608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e083015161476d91600784019190615835565b5050604080517f9075789e000000000000000000000000000000000000000000000000000000008152600b6004820152939092036001606060020a038116602485015260448401869052915191935073180eba68d164c3f8c3f6dc354125ebccf4dfcb8692639075789e9260648083019350600092829003018186803b1580156147f657600080fd5b505af415801561480a573d6000803e3d6000fd5b50505050600a896001606060020a031681548110151561482657fe5b600091825260208083206001600b9093020182018054928301815583529091206001606060020a039092169101555050505050505050565b600160a060020a038116600090815260106020908152604091829020805483518184028101840190945280845260609391928391908301828280156148f457602002820191906000526020600020906000905b82829054906101000a90046001606060020a03166001606060020a0316815260200190600c0190602082600b010492830192600103820291508084116148b15790505b5050505050915050919050565b50600192915050565b6010602052600090815260409020600181015460029091015482565b600054600160a060020a0316331461493d57600080fd5b600855565b606080606080606080600080600f8981548110151561495d57fe5b90600052602060002090600e02019150816004018054905060405190808252806020026020018201604052801561499e578160200160208202803883390190505b509750600090505b60048201548110156149ee57600482018054829081106149c257fe5b60009182526020909120015488518990839081106149dc57fe5b602090810290910101526001016149a6565b81600601805480602002602001604051908101604052809291908181526020018280548015614a3c57602002820191906000526020600020905b815481526020019060010190808311614a28575b5050505050965081600701805480602002602001604051908101604052809291908181526020018280548015614a9157602002820191906000526020600020905b815481526020019060010190808311614a7d575b5050505050955081600a01805480602002602001604051908101604052809291908181526020018280548015614ae657602002820191906000526020600020905b815481526020019060010190808311614ad2575b5050505050945081600b01805480602002602001604051908101604052809291908181526020018280548015614b3b57602002820191906000526020600020905b815481526020019060010190808311614b27575b5050505050935081600c01805480602002602001604051908101604052809291908181526020018280548015614b9057602002820191906000526020600020905b815481526020019060010190808311614b7c575b50505050509250505091939550919395565b60006060600080600080600f88815481101515614bbb57fe5b90600052602060002090600e020192508260050187815481101515614bdc57fe5b90600052602060002090600302019150816000015495508260010154600101604051908082528060200260200182016040528015614c24578160200160208202803883390190505b509450600090505b60018301548111614c685760008181526001830160205260409020548551869083908110614c5657fe5b60209081029091010152600101614c2c565b506002015493969295505060ff90921692509050565b600054600160a060020a03163314614c9557600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600381565b6000806000600f85815481101515614cdd57fe5b60009182526020909120600e90910201600481018054919350906000198101908110614d0557fe5b6000918252602090912001548254600a8054929350916001606060020a03909116908110614d2f57fe5b90600052602060002090600b02016006015481101515614de85781546001606060020a03161515614d82577f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9250614de3565b8154600a8054600160028502019282916001606060020a03909116908110614da657fe5b60009182526020909120600b909102015481546001606060020a03909116908110614dcd57fe5b90600052602060002090600b0201600501540292505b614e1e565b8154600a805460016002850201926001606060020a0316908110614e0857fe5b90600052602060002090600b0201600501540292505b505092915050565b50600090565b60095460ff1681565b6000806000614e438461567b565b9150915080600a836001606060020a0316815481101515614e6057fe5b90600052602060002090600b0201600501540292505050919050565b600154600160a060020a031681565b600080600080600080600f88815481101515614ea357fe5b60009182526020909120600e90910201600581018054919550906000198101908110614ecb57fe5b600091825260209091206002600390920201015460ff1615614f7257600a8401805488908110614ef757fe5b906000526020600020015492506000831115614f64578284600c0188815481101515614f1f57fe5b9060005260206000200154811515614f3357fe5b049550828460070188815481101515614f4857fe5b9060005260206000200154811515614f5c57fe5b049450614f6d565b60009550600094505b615023565b6005840180546000198101908110614f8657fe5b90600052602060002090600302016000015491508360050187815481101515614fab57fe5b906000526020600020906003020160010160008381526020019081526020016000205490508084600c0188815481101515614fe257fe5b9060005260206000200154811515614ff657fe5b04955080846007018881548110151561500b57fe5b906000526020600020015481151561501f57fe5b0494505b505050509250929050565b600080600080600080600080600a805490508a6001606060020a031610151561505a576000975061562e565b60006002805460a060020a900460ff169081111561507457fe5b14615164576060604051908101604052808c600160a060020a031681526020018b6001606060020a031681526020018a6001608060020a0316815250600c6000600e60008154600101919050819055815260200190815260200160002060008201518160000160006101000a815481600160a060020a030219169083600160a060020a0316021790555060208201518160000160146101000a8154816001606060020a0302191690836001606060020a0316021790555060408201518160010160006101000a8154816001608060020a0302191690836001608060020a031602179055509050506001975061562e565b6001608060020a03891615806151ac5750886001608060020a0316600a8b6001606060020a031681548110151561519757fe5b90600052602060002090600b02016003015411155b15156151bb576000975061562e565b600160a060020a038b16600090815260106020526040902096506151df8b8b61563c565b604080517f7521ccb1000000000000000000000000000000000000000000000000000000008152600b60048201526001606060020a038d16602482015260448101839052905191975073180eba68d164c3f8c3f6dc354125ebccf4dfcb8691637521ccb191606480820192602092909190829003018186803b15801561526457600080fd5b505af4158015615278573d6000803e3d6000fd5b505050506040513d602081101561528e57600080fd5b505194506001608060020a03891615806152a85750600085115b806152b4575086546004115b15156152c3576000975061562e565b60018701548590036001608060020a038a169081019450158061536557506001546040805160e060020a6370a08231028152600160a060020a038e811660048301529151879392909216916370a08231916024808201926020929091908290030181600087803b15801561533657600080fd5b505af115801561534a573d6000803e3d6000fd5b505050506040513d602081101561536057600080fd5b505110155b1515615374576000975061562e565b600187018490556001608060020a038916151561549157600092505b865483101561548c5786546001606060020a038b16908890859081106153b257fe5b600091825260209091206002820401546001909116600c026101000a90046001606060020a03161415615481578654879060001981019081106153f157fe5b9060005260206000209060029182820401919006600c029054906101000a90046001606060020a0316876000018481548110151561542b57fe5b9060005260206000209060029182820401919006600c026101000a8154816001606060020a0302191690836001606060020a031602179055508660000180548091906001900361547b9190615862565b5061548c565b600190920191615390565b6154d3565b8415156154d3578654600180820189556000898152602090206002830401805491909216600c026101000a6001606060020a0381810219909216918d16021790555b50600090506001606060020a0389165b8115156155cc57604080517f2e25c38a000000000000000000000000000000000000000000000000000000008152600b6004820152602481018390526001608060020a038b16604482015260648101889052905173180eba68d164c3f8c3f6dc354125ebccf4dfcb8691632e25c38a916084808301926000929190829003018186803b15801561557257600080fd5b505af4158015615586573d6000803e3d6000fd5b50505050806000141561559c57600191506155c7565b600a8054829081106155aa57fe5b60009182526020909120600b90910201546001606060020a031690505b6154e3565b604080516001606060020a038c1681526001608060020a038b1660208201528082018690529051600160a060020a038d16917f8f753321c98641397daaca5e8abf8881fff1fd7a7bc229924a012e2cb61763d5919081900360600190a2600197505b505050505050509392505050565b600060405160005b601481101561565f578481600c011a81830153600101615644565b5060145b6020811015613e0c5783811a81830153600101615663565b600080604083511015156156bc57505060208101516040820151600a546001606060020a038316106156ac57600091505b8015156156b7575060035b6156c4565b506000905060035b915091565b60008060405160005b60148110156156ed5784811a81600c840101536001016156d2565b505193915050565b6080604051908101604052806004906020820280388339509192915050565b81548183558181111561358757600083815260209020613587918101908301615896565b8154818355818111156135875760040281600402836000526020600020918201910161358791906158bc565b815481835581811115613587576003028160030283600052602060002091820191016135879190615907565b82600481019282156157be579160200282015b828111156157be5782358255916020019190600101906157a3565b506157ca92915061592d565b5090565b81548183558181111561358757600e0281600e0283600052602060002091820191016135879190615947565b8280548282559060005260206000209081019282156157be579160200282015b828111156157be57825182559160200191906001019061581a565b82600481019282156157be57916020028201828111156157be57825182559160200191906001019061581a565b815481835581811115613587576001016002900481600101600290048360005260206000209182019101613587919061592d565b6158b991905b808211156157ca5760006158b082826159fc565b5060010161589c565b90565b6158b991905b808211156157ca57805473ffffffffffffffffffffffffffffffffffffffff19168155600060018201819055600282015560038101805460ff191690556004016158c2565b6158b991905b808211156157ca576000815560028101805460ff1916905560030161590d565b6158b991905b808211156157ca5760008155600101615933565b6158b991905b808211156157ca5760008082556001820181905560028201805460ff19169055600382018190556159816004830182615a1d565b61598f600583016000615a3b565b61599d600683016000615a5c565b6159ab600783016000615a5c565b60088201600090556009820160009055600a820160006159cb9190615a5c565b6159d9600b83016000615a5c565b6159e7600c83016000615a5c565b50600d8101805460ff19169055600e0161594d565b5080546000825560040290600052602060002090810190613c6f91906158bc565b5080546000825590600052602060002090810190613c6f9190615896565b5080546000825560030290600052602060002090810190613c6f9190615907565b5080546000825590600052602060002090810190613c6f919061592d5600a165627a7a723058209ccfb35b2a6ff0eba1f3ec627c850c4d9e5bc24ee334d8a8e6de0efd8b4d8e230029000000000000000000000000334f12afb7d8740868be0471963961653307523400000000000000000000000098a3a786f2caa319dc234d28fcd6e362a97507090000000000000000000000001738b62e403090666687243e758b1c29edffc90e0000000000000000000000000000000000000000000000000000000000000e100000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000000000000000000000000000000000000000009c40000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000059a600000000000000000000000000000000000000000000000000000000000098ee00000000000000000000000000000000000000000000000000000000000098ee00000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000000006
Deployed Bytecode
0x6080604052600436106102995763ffffffff60e060020a600035041662f5822c811461029e578063023d44df146102c157806303432744146102e85780630b274f2e146102fd5780630c340a24146103125780630d44cf791461034357806310f169e814610358578063115d5376146103945780631b92bbbe146103ac5780631c3db16d146103c15780631f5a0dd2146103d95780632d29a47b1461042e5780632ea7b4d01461044c5780633850f804146104615780633e1d09be1461048b57806340026c87146104af57806349912f881461054d5780634a3931491461059e578063564a565d146105dc578063572603641461066057806359354c77146106835780635bc24dd3146106a75780635c92e2f6146106cb5780635e4a627d146106f25780636a4f8f3914610707578063751accd01461071c578063823cfd701461074d578063840bc19c1461076557806385c855f31461077a5780638bb04875146107a75780638ce7ff4a146107bf57806396d92a721461080f5780639929057b14610830578063a2473cc114610848578063a57366e714610875578063afe15cfb14610899578063b1c9fe6e146108ca578063b4a61608146108df578063b78a80ff146108f4578063b888adfa14610945578063c057eca71461095a578063c108f3b41461096f578063c13517e114610984578063cbd88663146109d5578063ce9e7730146109f0578063d4155d1f14610a28578063da682aeb14610a99578063dca5f6b014610ac3578063dd5e5cb514610ae4578063e3a96cbd14610afc578063e3b0073e14610cc1578063e4c0aaf414610d42578063eaff425a14610d63578063f23f16e614610d78578063f48c305414610dd6578063f66d685a14610dea578063f7434ea914610dff578063fbf405b014610e58575b600080fd5b3480156102aa57600080fd5b506102bf600160a060020a0360043516610e6d565b005b3480156102cd57600080fd5b506102d6610eb3565b60408051918252519081900360200190f35b3480156102f457600080fd5b506102d6610eb9565b34801561030957600080fd5b506102bf610ebf565b34801561031e57600080fd5b50610327611327565b60408051600160a060020a039092168252519081900360200190f35b34801561034f57600080fd5b506102d6611336565b34801561036457600080fd5b5061037060043561133c565b6040518082600281111561038057fe5b60ff16815260200191505060405180910390f35b3480156103a057600080fd5b506102bf6004356113b3565b3480156103b857600080fd5b506102d6611b11565b3480156103cd57600080fd5b506102d6600435611b17565b3480156103e557600080fd5b506103f1600435611ba1565b604080516001606060020a0390971687529415156020870152858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561043a57600080fd5b506102bf600435602435604435611bf3565b34801561045857600080fd5b506102d6612780565b34801561046d57600080fd5b506102bf600480359060248035908101910135604435606435612786565b34801561049757600080fd5b506102bf6001606060020a0360043516602435612cfd565b3480156104bb57600080fd5b506104d06001606060020a0360043516612efe565b604051806020810183608080838360005b838110156104f95781810151838201526020016104e1565b50505050905001828103825284818151815260200191508051906020019060200280838360005b83811015610538578181015183820152602001610520565b50505050905001935050505060405180910390f35b60408051602060046024803582810135601f81018590048502860185019096528585526102bf958335953695604494919390910191908190840183828082843750949750612fc09650505050505050565b3480156105aa57600080fd5b506105c8600160a060020a03600435811690602435166044356133cd565b604080519115158252519081900360200190f35b3480156105e857600080fd5b506105f46004356134c1565b604080516001606060020a038a168152600160a060020a03891660208201529081018790526060810186600481111561062957fe5b60ff168152602001858152602001848152602001838152602001821515151581526020019850505050505050505060405180910390f35b34801561066c57600080fd5b506102bf6001606060020a03600435166024613538565b34801561068f57600080fd5b506102bf6001606060020a036004351660243561358c565b3480156106b357600080fd5b506102bf6001606060020a03600435166024356135d5565b3480156106d757600080fd5b506102bf60048035906024803590810191013560443561361e565b3480156106fe57600080fd5b506102d661386c565b34801561071357600080fd5b50610327613872565b34801561072857600080fd5b506102bf60048035600160a060020a0316906024803591604435918201910135613881565b34801561075957600080fd5b506102bf6004356138da565b34801561077157600080fd5b506102d66138f6565b34801561078657600080fd5b506102bf6001606060020a03600435166001608060020a036024351661391a565b3480156107b357600080fd5b506102bf600435613934565b3480156107cb57600080fd5b506107dd600435602435604435613afc565b60408051600160a060020a03909516855260208501939093528383019190915215156060830152519081900360800190f35b34801561081b57600080fd5b506102bf600160a060020a0360043516613b89565b34801561083c57600080fd5b506102bf600435613c72565b34801561085457600080fd5b506102d6600160a060020a03600435166001606060020a0360243516613d68565b34801561088157600080fd5b506102bf6001606060020a0360043516602435613e15565b3480156108a557600080fd5b506108b1600435613e5e565b6040805192835260208301919091528051918290030190f35b3480156108d657600080fd5b50610370613ef2565b3480156108eb57600080fd5b506102d6613f02565b34801561090057600080fd5b5061090c600435613f07565b60408051600160a060020a0390941684526001606060020a0390921660208401526001608060020a031682820152519081900360600190f35b34801561095157600080fd5b506102d6613f45565b34801561096657600080fd5b506102d6613f4b565b34801561097b57600080fd5b506102d6613f51565b60408051602060046024803582810135601f81018590048502860185019096528585526102d6958335953695604494919390910191908190840183828082843750949750613f579650505050505050565b3480156109e157600080fd5b506102bf60043560243561423c565b3480156109fc57600080fd5b506102bf6001606060020a0360043516602435151560443560643560843560a43560c461014435614561565b348015610a3457600080fd5b50610a49600160a060020a036004351661485e565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610a85578181015183820152602001610a6d565b505050509050019250505060405180910390f35b348015610aa557600080fd5b506105c8600160a060020a0360043581169060243516604435614901565b348015610acf57600080fd5b506108b1600160a060020a036004351661490a565b348015610af057600080fd5b506102bf600435614926565b348015610b0857600080fd5b50610b14600435614942565b6040518080602001806020018060200180602001806020018060200187810387528d818151815260200191508051906020019060200280838360005b83811015610b68578181015183820152602001610b50565b5050505090500187810386528c818151815260200191508051906020019060200280838360005b83811015610ba7578181015183820152602001610b8f565b5050505090500187810385528b818151815260200191508051906020019060200280838360005b83811015610be6578181015183820152602001610bce565b5050505090500187810384528a818151815260200191508051906020019060200280838360005b83811015610c25578181015183820152602001610c0d565b50505050905001878103835289818151815260200191508051906020019060200280838360005b83811015610c64578181015183820152602001610c4c565b50505050905001878103825288818151815260200191508051906020019060200280838360005b83811015610ca3578181015183820152602001610c8b565b505050509050019c5050505050505050505050505060405180910390f35b348015610ccd57600080fd5b50610cdc600435602435614ba2565b604051808481526020018060200183151515158152602001828103825284818151815260200191508051906020019060200280838360005b83811015610d2c578181015183820152602001610d14565b5050505090500194505050505060405180910390f35b348015610d4e57600080fd5b506102bf600160a060020a0360043516614c7e565b348015610d6f57600080fd5b506102d6614cc4565b348015610d8457600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102d6958335953695604494919390910191908190840183828082843750949750614cc99650505050505050565b6105c8600160a060020a0360043516614e26565b348015610df657600080fd5b506105c8614e2c565b348015610e0b57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102d6943694929360249392840191908190840183828082843750949750614e359650505050505050565b348015610e6457600080fd5b50610327614e7c565b600054600160a060020a03163314610e8457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055481565b60045481565b60006002805460a060020a900460ff1690811115610ed957fe5b141561109b5760075460035442031015610f63576040805160e560020a62461bcd02815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201527f20706173736564207965742e0000000000000000000000000000000000000000606482015290519081900360840190fd5b600454600010610fe3576040805160e560020a62461bcd02815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e6565642060448201527f6a75726f72732e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600143016005819055600254604080517f7b9c34e0000000000000000000000000000000000000000000000000000000008152600481019390935251600160a060020a0390911691637b9c34e091602480830192600092919082900301818387803b15801561105157600080fd5b505af1158015611065573d6000803e3d6000fd5b5050600280546001935090915074ff0000000000000000000000000000000000000000191660a060020a835b02179055506112ca565b60016002805460a060020a900460ff16908111156110b557fe5b14156111d557600254600554604080517f1c73601e000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a0390921691631c73601e916024808201926020929091908290030181600087803b15801561112557600080fd5b505af1158015611139573d6000803e3d6000fd5b505050506040513d602081101561114f57600080fd5b5051600681905515156111ac576040805160e560020a62461bcd02815260206004820152601f60248201527f52616e646f6d206e756d626572206973206e6f74207265616479207965742e00604482015290519081900360640190fd5b60028054819074ff0000000000000000000000000000000000000000191660a060020a82611091565b600280805460a060020a900460ff16908111156111ee57fe5b14156112ca5760045415806112095750600854600354420310155b15156112ab576040805160e560020a62461bcd02815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e672060648201527f74696d6520686173206e6f7420706173736564207965742e0000000000000000608482015290519081900360a40190fd5b6002805474ff0000000000000000000000000000000000000000191690555b426003819055507f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b93600260149054906101000a900460ff166040518082600281111561131257fe5b60ff16815260200191505060405180910390a1565b600054600160a060020a031681565b600e5481565b600080600f8381548110151561134e57fe5b60009182526020909120600e9091020190506003600282015460ff16600481111561137557fe5b101561138457600091506113ad565b6004600282015460ff16600481111561139957fe5b10156113a857600191506113ad565b600291505b50919050565b6000600f828154811015156113c457fe5b600091825260208220600e909102019150600282015460ff1660048111156113e857fe5b14156115fe5760048101546001108061145a57508054600a805490916001606060020a031690811061141657fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff16600481111561144457fe5b6004811061144e57fe5b01548160030154420310155b15156114fd576040805160e560020a62461bcd028152602060048201526044602482018190527f5468652065766964656e636520706572696f642074696d6520686173206e6f74908201527f207061737365642079657420616e64206974206973206e6f7420616e2061707060648201527f65616c2e00000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600481018054600019810190811061151157fe5b60009182526020909120015460088201541461159d576040805160e560020a62461bcd02815260206004820152602960248201527f546865206469737075746520686173206e6f742066696e69736865642064726160448201527f77696e67207965742e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8054600a805490916001606060020a03169081106115b757fe5b600091825260209091206002600b90920201015460ff166115d95760026115dc565b60015b60028201805460ff191660018360048111156115f457fe5b0217905550611ab5565b6001600282015460ff16600481111561161357fe5b1415611758578054600a805490916001606060020a031690811061163357fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff16600481111561166157fe5b6004811061166b57fe5b0154816003015442031015806116a35750600481018054600019810190811061169057fe5b6000918252602090912001546009820154145b1515611745576040805160e560020a62461bcd02815260206004820152605060248201527f54686520636f6d6d697420706572696f642074696d6520686173206e6f74207060448201527f61737365642079657420616e64206e6f74206576657279206a75726f7220686160648201527f7320636f6d6d6974746564207965742e00000000000000000000000000000000608482015290519081900360a40190fd5b6002818101805460ff19166001836115f4565b60028082015460ff16600481111561176c57fe5b141561191c578054600a805490916001606060020a031690811061178c57fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff1660048111156117ba57fe5b600481106117c457fe5b01548160030154420310158061181c575060048101805460001981019081106117e957fe5b6000918252602090912001546004820154600a8301805490916000190190811061180f57fe5b9060005260206000200154145b15156118be576040805160e560020a62461bcd02815260206004820152604a60248201527f54686520766f746520706572696f642074696d6520686173206e6f742070617360448201527f7365642079657420616e64206e6f74206576657279206a75726f72206861732060648201527f766f746564207965742e00000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600281018054600360ff1990911617905580546040516c01000000000000000000000000909104600160a060020a03169083907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3611ab5565b6003600282015460ff16600481111561193157fe5b1415611a24578054600a805490916001606060020a031690811061195157fe5b90600052602060002090600b02016007018160020160009054906101000a900460ff16600481111561197f57fe5b6004811061198957fe5b0154600382015442031015611a0e576040805160e560020a62461bcd02815260206004820152602a60248201527f5468652061707065616c20706572696f642074696d6520686173206e6f74207060448201527f6173736564207965742e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b6002810180546004919060ff19166001836115f4565b6004600282015460ff166004811115611a3957fe5b1415611ab5576040805160e560020a62461bcd02815260206004820152602a60248201527f546865206469737075746520697320616c726561647920696e20746865206c6160448201527f737420706572696f642e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b426003820155600281015460405183917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b919160ff9091169080826004811115611afa57fe5b60ff16815260200191505060405180910390a25050565b60085481565b600080600f83815481101515611b2957fe5b60009182526020909120600e90910201600581018054919250906000198101908110611b5157fe5b600091825260209091206002600390920201015460ff16611b97576005810180546000198101908110611b8057fe5b906000526020600020906003020160000154611b9a565b60005b9392505050565b600a805482908110611baf57fe5b60009182526020909120600b90910201805460028201546003830154600484015460058501546006909501546001606060020a03909416955060ff90921693909286565b600080808080808080808b600480600f805484908110611c0f57fe5b600091825260209091206002600e90920201015460ff166004811115611c3157fe5b14611c3b57600080fd5b6009805460ff19169055600f80548f908110611c5357fe5b90600052602060002090600e02019a508b8b600b018e815481101515611c7557fe5b90600052602060002001540199508a600b018d815481101515611c9457fe5b90600052602060002001548a10151515611cad57600080fd5b600c8b0180548e908110611cbd57fe5b600091825260208220015460058d018054919b509199508998506000198101908110611ce557fe5b600091825260209091206002600390920201015460ff16158015611d67575060058b0180548e908110611d1457fe5b906000526020600020906003020160010160008c60050160018e6005018054905003815481101515611d4257fe5b9060005260206000209060030201600001548152602001908152602001600020546000145b15611db35760048b0180548e908110611d7c57fe5b6000918252602090912001548a1115611dae5760048b0180548e908110611d9f57fe5b60009182526020909120015499505b611e51565b60048b0180548e908110611dc357fe5b600091825260209091200154600b8c0180548f908110611ddf57fe5b90600052602060002001541015611df857600080611e02565b611e028e8e614e8b565b60048d018054929a50909850908e908110611e1957fe5b6000918252602090912001546002028a1115611e515760048b0180548e908110611e3f57fe5b60009182526020909120015460020299505b600b8b0180548e908110611e6157fe5b906000526020600020015495505b898610156127025760048b0180548e908110611e8757fe5b906000526020600020018b6004018e815481101515611ea257fe5b60009182526020909120015487811515611eb857fe5b06815481101515611ec557fe5b60009182526020909120600490910201600381015490955060ff168015611f45575060058b0180546000198101908110611efb57fe5b90600052602060002090600302016000015485600201541480611f45575060058b0180546000198101908110611f2d57fe5b600091825260209091206002600390920201015460ff165b156120d95760048b0180548e908110611f5a57fe5b60009182526020909120015486106120d4576001548554604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018c90529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015611fdd57600080fd5b505af1158015611ff1573d6000803e3d6000fd5b505050506040513d602081101561200757600080fd5b50508454604051600160a060020a039091169088156108fc029089906000818181858888f19350505050508d8560000160009054906101000a9004600160a060020a0316600160a060020a03167f24f45c2b08bbde8c837d70b67991ccb7660537cf749de21a940ae4858b681e198a8a604051808381526020018281526020019250505060405180910390a360068b0180548e9081106120a357fe5b60009182526020808320909101548754600160a060020a031683526010909152604090912060020180549190910390555b6124c2565b60048b0180548e9081106120e957fe5b6000918252602090912001548610156124c25760015485546040805160e060020a6370a08231028152600160a060020a039283166004820152905191909216916370a082319160248083019260209291908290030181600087803b15801561215057600080fd5b505af1158015612164573d6000803e3d6000fd5b505050506040513d602081101561217a57600080fd5b505160068c0180548f90811061218c57fe5b9060005260206000200154116121bc5760068b0180548e9081106121ac57fe5b906000526020600020015461223d565b60015485546040805160e060020a6370a08231028152600160a060020a039283166004820152905191909216916370a082319160248083019260209291908290030181600087803b15801561221057600080fd5b505af1158015612224573d6000803e3d6000fd5b505050506040513d602081101561223a57600080fd5b50515b6001548654604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201523060248201526044810185905290519397509116916323b872dd916064808201926020929091908290030181600087803b1580156122b657600080fd5b505af11580156122ca573d6000803e3d6000fd5b505050506040513d60208110156122e057600080fd5b8101908080519060200190929190505050508d8560000160009054906101000a9004600160a060020a0316600160a060020a03167f24f45c2b08bbde8c837d70b67991ccb7660537cf749de21a940ae4858b681e19866000036000604051808381526020018281526020019250505060405180910390a360068b018054998501998e90811061236b57fe5b60009182526020808320909101548754600160a060020a039081168452601083526040808520600201805493909303909255885481168085528285206001908101549054845160e060020a6370a0823102815260048101939093529351909593909216936370a082319360248084019492938390030190829087803b1580156123f357600080fd5b505af1158015612407573d6000803e3d6000fd5b505050506040513d602081101561241d57600080fd5b505110806124305750600385015460ff16155b156124c257600092505b8454600160a060020a03166000908152601060205260409020548310156124c2578454600160a060020a0316600081815260106020526040902080546124b69291908690811061248657fe5b9060005260206000209060029182820401919006600c029054906101000a90046001606060020a0316600061502e565b5060019092019161243a565b60018b6004018e8154811015156124d557fe5b600091825260209091200154038614156126f757600a8b0180548e9081106124f957fe5b9060005260206000200154600014806125a3575060058b018054600019810190811061252157fe5b600091825260209091206002600390920201015460ff161580156125a3575060058b0180548e90811061255057fe5b906000526020600020906003020160010160008c60050160018e600501805490500381548110151561257e57fe5b9060005260206000209060030201600001548152602001908152602001600020546000145b156126be576000809054906101000a9004600160a060020a0316600160a060020a03166108fc8c6007018f8154811015156125da57fe5b90600052602060002001549081150290604051600060405180830381858888f1935050505050600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb6000809054906101000a9004600160a060020a03168b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561268c57600080fd5b505af11580156126a0573d6000803e3d6000fd5b505050506040513d60208110156126b657600080fd5b506126f79050565b898660010110156126f757888b600c018e8154811015156126db57fe5b6000918252602090912001556126f18e8e614e8b565b90985096505b600190950194611e6f565b888b600c018e81548110151561271457fe5b906000526020600020015414151561274557888b600c018e81548110151561273857fe5b6000918252602090912001555b898b600b018e81548110151561275757fe5b60009182526020909120015550506009805460ff19166001179055505050505050505050505050565b61271081565b6000808087600280600f80548490811061279c57fe5b600091825260209091206002600e90920201015460ff1660048111156127be57fe5b146127c857600080fd5b600f80548b9081106127d657fe5b600091825260208220600e90910201955088116127f257600080fd5b600185015487111561289a576040805160e560020a62461bcd02815260206004820152605160248201527f5468652063686f6963652068617320746f206265206c657373207468616e206f60448201527f7220657175616c20746f20746865206e756d626572206f662063686f6963657360648201527f20666f722074686520646973707574652e000000000000000000000000000000608482015290519081900360a40190fd5b600093505b87841015612bef5760048501805433919060001981019081106128be57fe5b906000526020600020018a8a8781811015156128d657fe5b905060200201358154811015156128e957fe5b6000918252602090912060049091020154600160a060020a031614612958576040805160e560020a62461bcd02815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015290519081900360640190fd5b8454600a805490916001606060020a031690811061297257fe5b600091825260209091206002600b90920201015460ff161580612a0057506040805188815260208101889052815190819003909101902060048601805460001981019081106129bd57fe5b906000526020600020018a8a8781811015156129d557fe5b905060200201358154811015156129e857fe5b90600052602060002090600402016001015460001916145b1515612a7c576040805160e560020a62461bcd02815260206004820152602481018290527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20737562636f7572747320776974682068696464656e20766f7465732e606482015290519081900360840190fd5b6004850180546000198101908110612a9057fe5b906000526020600020018989868181101515612aa857fe5b90506020020135815481101515612abb57fe5b600091825260209091206003600490920201015460ff1615612b27576040805160e560020a62461bcd02815260206004820152601260248201527f566f746520616c726561647920636173742e0000000000000000000000000000604482015290519081900360640190fd5b6004850180548891906000198101908110612b3e57fe5b906000526020600020018a8a878181101515612b5657fe5b90506020020135815481101515612b6957fe5b600091825260209091206004918202016002019190915585018054600191906000198101908110612b9657fe5b906000526020600020018a8a878181101515612bae57fe5b90506020020135815481101515612bc157fe5b60009182526020909120600490910201600301805460ff19169115159190911790556001939093019261289f565b6004850154600a860180548a9260001901908110612c0957fe5b6000918252602090912001805490910190556005850180546000198101908110612c2f57fe5b600091825260208083208a845260016003909302019182019052604090912080548a0190558054909350871415612c7f57600283015460ff1615612c7a5760028301805460ff191690555b612cf1565b82546000908152600184016020526040808220548983529120541415612cc157600283015460ff161515612c7a5760028301805460ff19166001179055612cf1565b82546000908152600184016020526040808220548983529120541115612cf15786835560028301805460ff191690555b50505050505050505050565b60008054600160a060020a03163314612d1557600080fd5b6001606060020a0383161580612d7c575081600a80856001606060020a0316815481101515612d4057fe5b60009182526020909120600b909102015481546001606060020a03909116908110612d6757fe5b90600052602060002090600b02016003015411155b1515612d8757600080fd5b5060005b600a80546001606060020a038516908110612da257fe5b90600052602060002090600b020160010180549050811015612ecb5781600a80856001606060020a0316815481101515612dd857fe5b90600052602060002090600b020160010183815481101515612df657fe5b9060005260206000200154815481101515612e0d57fe5b90600052602060002090600b02016003015410151515612ec3576040805160e560020a62461bcd02815260206004820152604960248201527f4120737562636f7572742063616e6e6f742062652074686520706172656e742060448201527f6f66206120737562636f75727420776974682061206c6f776572206d696e696d60648201527f756d207374616b652e0000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600101612d8b565b81600a846001606060020a0316815481101515612ee457fe5b90600052602060002090600b020160030181905550505050565b6060612f086156f5565b6000600a846001606060020a0316815481101515612f2257fe5b90600052602060002090600b0201905080600101805480602002602001604051908101604052809291908181526020018280548015612f8057602002820191906000526020600020905b815481526020019060010190808311612f6c575b505060408051608081019182905294975060078601935060049250905082845b815481526020019060010190808311612fa0575050505050915050915091565b60008282612fce8282614cc9565b34101561304b576040805160e560020a62461bcd02815260206004820152602560248201527f4e6f7420656e6f7567682045544820746f20636f7665722061707065616c206360448201527f6f7374732e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b84600380600f80548490811061305d57fe5b600091825260209091206002600e90920201015460ff16600481111561307f57fe5b1461308957600080fd5b600f80548890811061309757fe5b60009182526020909120600e9091020180549095506c010000000000000000000000009004600160a060020a03163314613141576040805160e560020a62461bcd02815260206004820152602e60248201527f43616e206f6e6c792062652063616c6c6564206279207468652061726269747260448201527f61626c6520636f6e74726163742e000000000000000000000000000000000000606482015290519081900360840190fd5b8454600a805490916001606060020a031690811061315b57fe5b600091825260209091206006600b909202010154600486018054600019810190811061318357fe5b600091825260209091200154106131df578454600a805490916001606060020a03169081106131ae57fe5b60009182526020909120600b909102015485546bffffffffffffffffffffffff19166001606060020a039091161785555b60028501805460ff191690554260038601558454600a805490916001606060020a031690811061320b57fe5b90600052602060002090600b0201600501543481151561322757fe5b600487018054929091049161323f8260018301615714565b8154811061324957fe5b906000526020600020018161325e9190615738565b506005850180546001919061327582828501615764565b8154811061327f57fe5b60009182526020909120600390910201600201805460ff19169115159190911790558454600a8054600688019261271092916001606060020a039091169081106132c557fe5b600091825260209091206004600b9092020101548754600a805490916001606060020a03169081106132f357fe5b90600052602060002090600b0201600301540281151561330f57fe5b825460018181018555600094855260208086209490930493909101929092556007880180548084018255908452818420349101556008880183905560098801839055600a88018054808401825590845281842001839055600b88018054808401825590845281842001839055600c88018054808401825590845290832001829055600480549091019055604051339189917f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d9190a350505050505050565b600954600090819060ff16156134b4576001546040805160e060020a6370a08231028152600160a060020a0388811660048301529151869392909216916370a08231916024808201926020929091908290030181600087803b15801561343257600080fd5b505af1158015613446573d6000803e3d6000fd5b505050506040513d602081101561345c57600080fd5b5051600160a060020a03871660009081526010602052604090206001015491900391508110806134a65750600160a060020a03851660009081526010602052604090206002015481105b156134b457600091506134b9565b600191505b509392505050565b600f8054829081106134cf57fe5b60009182526020909120600e90910201805460018201546002830154600384015460088501546009860154600d909601546001606060020a03861697506c01000000000000000000000000909504600160a060020a031695939460ff9384169492939192911688565b600054600160a060020a0316331461354f57600080fd5b80600a836001606060020a031681548110151561356857fe5b90600052602060002090600b0201600701906004613587929190615790565b505050565b600054600160a060020a031633146135a357600080fd5b80600a836001606060020a03168154811015156135bc57fe5b90600052602060002090600b0201600501819055505050565b600054600160a060020a031633146135ec57600080fd5b80600a836001606060020a031681548110151561360557fe5b90600052602060002090600b0201600401819055505050565b60008085600180600f80548490811061363357fe5b600091825260209091206002600e90920201015460ff16600481111561365557fe5b1461365f57600080fd5b600f80548990811061366d57fe5b60009182526020909120600e90910201935084151561368b57600080fd5b600092505b858310156138595760048401805433919060001981019081106136af57fe5b9060005260206000200188888681811015156136c757fe5b905060200201358154811015156136da57fe5b6000918252602090912060049091020154600160a060020a031614613749576040805160e560020a62461bcd02815260206004820152601f60248201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604482015290519081900360640190fd5b60048401805460009190600019810190811061376157fe5b90600052602060002001888886818110151561377957fe5b9050602002013581548110151561378c57fe5b6000918252602090912060016004909202010154146137f5576040805160e560020a62461bcd02815260206004820152601c60248201527f416c726561647920636f6d6d6974746564207468697320766f74652e00000000604482015290519081900360640190fd5b600484018054869190600019810190811061380c57fe5b90600052602060002001888886818110151561382457fe5b9050602002013581548110151561383757fe5b6000918252602090912060016004909202018101919091559290920191613690565b5050506009018054909201909155505050565b60065481565b600254600160a060020a031681565b600054600160a060020a0316331461389857600080fd5b83600160a060020a03168383836040518083838082843782019150509250505060006040518083038185875af19250505015156138d457600080fd5b50505050565b600054600160a060020a031633146138f157600080fd5b600755565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b61392533838361502e565b151561393057600080fd5b5050565b60008082600480600f80548490811061394957fe5b600091825260209091206002600e90920201015460ff16600481111561396b57fe5b1461397557600080fd5b600f80548690811061398357fe5b60009182526020909120600e90910201600d81015490945060ff16156139f3576040805160e560020a62461bcd02815260206004820152601860248201527f52756c696e6720616c72656164792065786563757465642e0000000000000000604482015290519081900360640190fd5b600d8401805460ff191660011790556005840180546000198101908110613a1657fe5b600091825260209091206002600390920201015460ff16613a5c576005840180546000198101908110613a4557fe5b906000526020600020906003020160000154613a5f565b60005b8454604080517f311a6c56000000000000000000000000000000000000000000000000000000008152600481018990526024810184905290519295506c01000000000000000000000000909104600160a060020a03169163311a6c569160448082019260009290919082900301818387803b158015613add57600080fd5b505af1158015613af1573d6000803e3d6000fd5b505050505050505050565b6000806000806000600f88815481101515613b1357fe5b90600052602060002090600e020160040187815481101515613b3157fe5b9060005260206000200186815481101515613b4857fe5b60009182526020909120600490910201805460018201546002830154600390930154600160a060020a039092169b909a5091985060ff169650945050505050565b600054600160a060020a03163314613ba057600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905560016002805460a060020a900460ff1690811115613be257fe5b1415613c6f57600143016005819055600254604080517f7b9c34e0000000000000000000000000000000000000000000000000000000008152600481019390935251600160a060020a0390911691637b9c34e091602480830192600092919082900301818387803b158015613c5657600080fd5b505af1158015613c6a573d6000803e3d6000fd5b505050505b50565b600080808080806002805460a060020a900460ff1690811115613c9157fe5b14613c9b57600080fd5b600e54600187600d54010311613cb15785613cbc565b600d54600e54036001015b600d549095508086019450841015613cd357600080fd5b600d5492505b83831015613d5e576000838152600c6020526040902080546001820154919350613d2791600160a060020a0382169160a060020a90046001606060020a0316906001608060020a031661502e565b506000838152600c60205260408120908155600190810180546fffffffffffffffffffffffffffffffff1916905590920191613cd9565b505050600d555050565b600073180eba68d164c3f8c3f6dc354125ebccf4dfcb86637521ccb1600b6001606060020a038516613d9a878761563c565b6040805160e060020a63ffffffff8716028152600481019490945260248401929092526044830152516064808301926020929190829003018186803b158015613de257600080fd5b505af4158015613df6573d6000803e3d6000fd5b505050506040513d6020811015613e0c57600080fd5b50519392505050565b600054600160a060020a03163314613e2c57600080fd5b80600a836001606060020a0316815481101515613e4557fe5b90600052602060002090600b0201600601819055505050565b6000806000600f84815481101515613e7257fe5b60009182526020909120600e9091020190506003600282015460ff166004811115613e9957fe5b1415613ee35760038101548154600a8054929550916001606060020a03909116908110613ec257fe5b60009182526020909120600a600b9092020101546003820154019150613eec565b60009250600091505b50915091565b60025460a060020a900460ff1681565b600481565b600c6020526000908152604090208054600190910154600160a060020a0382169160a060020a90046001606060020a0316906001608060020a031683565b60035481565b60075481565b600d5481565b60008060008084613f6781614e35565b341015613fe4576040805160e560020a62461bcd02815260206004820152602a60248201527f4e6f7420656e6f7567682045544820746f20636f76657220617262697472617460448201527f696f6e20636f7374732e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b613fed8661567b565b600f805492965090945061400490600183016157ce565b9450600f8581548110151561401557fe5b60009182526020909120600e9091020180546bffffffffffffffffffffffff19166001606060020a03868116919091178116336c010000000000000000000000000217808355600183018a905560028301805460ff19169055426003840155600a805493955092911690811061408757fe5b90600052602060002090600b020160050154348115156140a357fe5b60048401805492909104916140bb8260018301615714565b815481106140c557fe5b90600052602060002001816140da9190615738565b50600582018054600191906140f182828501615764565b815481106140fb57fe5b60009182526020909120600390910201600201805460ff19169115159190911790558154600a8054600685019261271092916001606060020a0390911690811061414157fe5b600091825260209091206004600b9092020101548454600a805490916001606060020a031690811061416f57fe5b90600052602060002090600b0201600301540281151561418b57fe5b82546001818101855560009485526020808620949093049390910192909255600785018054808401825590845281842034910155600a85018054808401825590845281842001839055600b85018054808401825590845281842001839055600c85018054808401825590845290832001829055600480549091019055604051339187917f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed9959190a35050505092915050565b6000808080806002806002805460a060020a900460ff169081111561425d57fe5b1461426757600080fd5b87600080600f80548490811061427957fe5b600091825260209091206002600e90920201015460ff16600481111561429b57fe5b146142a557600080fd5b600f80548b9081106142b357fe5b90600052602060002090600e02019750888860080154019650876008015487101515156142df57600080fd5b60048801805460001981019081106142f357fe5b60009182526020909120015487111561432957600488018054600019810190811061431a57fe5b60009182526020909120015496505b876008015495505b868610156145505787546006546040805191825260208083018e90528282018a905281519283900360600183207f88c1d467000000000000000000000000000000000000000000000000000000008452600b60048501526001606060020a03909416602484015260448301939093525161440d9273180eba68d164c3f8c3f6dc354125ebccf4dfcb86926388c1d4679260648083019392829003018186803b1580156143dc57600080fd5b505af41580156143f0573d6000803e3d6000fd5b505050506040513d602081101561440657600080fd5b50516156c9565b60048a0180549297506001606060020a039190911695508691600019810190811061443457fe5b906000526020600020018781548110151561444b57fe5b60009182526020909120600490910201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055600688018054600019810190811061449a57fe5b6000918252602080832090910154600160a060020a03881680845260108352604093849020600201805490920190915560048b01548351600019909101815291820189905282518d9391927f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b92908290030190a360048801805460019190600019810190811061452657fe5b6000918252602090912001540386141561454557600480546000190190555b600190950194614331565b505050505060089290920155505050565b60008054600160a060020a0316331461457957600080fd5b86600a8a6001606060020a031681548110151561459257fe5b90600052602060002090600b02016003015411151515614648576040805160e560020a62461bcd02815260206004820152604760248201527f4120737562636f7572742063616e6e6f742062652061206368696c64206f662060448201527f6120737562636f7572742077697468206120686967686572206d696e696d756d60648201527f207374616b652e00000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b60408051610100810182526001606060020a038b168152815160008152602080820184528201528915158183015260608101899052608080820189905260a0820188905260c082018790528251808201909352600192600a929160e083019190889060049083908390808284375050509190925250508154600180820180855560009485526020948590208451600b9094020180546bffffffffffffffffffffffff19166001606060020a039094169390931783558385015180519195614714938501929101906157fa565b50604082015160028201805460ff191691151591909117905560608201516003820155608082015160048083019190915560a0830151600583015560c0830151600683015560e083015161476d91600784019190615835565b5050604080517f9075789e000000000000000000000000000000000000000000000000000000008152600b6004820152939092036001606060020a038116602485015260448401869052915191935073180eba68d164c3f8c3f6dc354125ebccf4dfcb8692639075789e9260648083019350600092829003018186803b1580156147f657600080fd5b505af415801561480a573d6000803e3d6000fd5b50505050600a896001606060020a031681548110151561482657fe5b600091825260208083206001600b9093020182018054928301815583529091206001606060020a039092169101555050505050505050565b600160a060020a038116600090815260106020908152604091829020805483518184028101840190945280845260609391928391908301828280156148f457602002820191906000526020600020906000905b82829054906101000a90046001606060020a03166001606060020a0316815260200190600c0190602082600b010492830192600103820291508084116148b15790505b5050505050915050919050565b50600192915050565b6010602052600090815260409020600181015460029091015482565b600054600160a060020a0316331461493d57600080fd5b600855565b606080606080606080600080600f8981548110151561495d57fe5b90600052602060002090600e02019150816004018054905060405190808252806020026020018201604052801561499e578160200160208202803883390190505b509750600090505b60048201548110156149ee57600482018054829081106149c257fe5b60009182526020909120015488518990839081106149dc57fe5b602090810290910101526001016149a6565b81600601805480602002602001604051908101604052809291908181526020018280548015614a3c57602002820191906000526020600020905b815481526020019060010190808311614a28575b5050505050965081600701805480602002602001604051908101604052809291908181526020018280548015614a9157602002820191906000526020600020905b815481526020019060010190808311614a7d575b5050505050955081600a01805480602002602001604051908101604052809291908181526020018280548015614ae657602002820191906000526020600020905b815481526020019060010190808311614ad2575b5050505050945081600b01805480602002602001604051908101604052809291908181526020018280548015614b3b57602002820191906000526020600020905b815481526020019060010190808311614b27575b5050505050935081600c01805480602002602001604051908101604052809291908181526020018280548015614b9057602002820191906000526020600020905b815481526020019060010190808311614b7c575b50505050509250505091939550919395565b60006060600080600080600f88815481101515614bbb57fe5b90600052602060002090600e020192508260050187815481101515614bdc57fe5b90600052602060002090600302019150816000015495508260010154600101604051908082528060200260200182016040528015614c24578160200160208202803883390190505b509450600090505b60018301548111614c685760008181526001830160205260409020548551869083908110614c5657fe5b60209081029091010152600101614c2c565b506002015493969295505060ff90921692509050565b600054600160a060020a03163314614c9557600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600381565b6000806000600f85815481101515614cdd57fe5b60009182526020909120600e90910201600481018054919350906000198101908110614d0557fe5b6000918252602090912001548254600a8054929350916001606060020a03909116908110614d2f57fe5b90600052602060002090600b02016006015481101515614de85781546001606060020a03161515614d82577f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9250614de3565b8154600a8054600160028502019282916001606060020a03909116908110614da657fe5b60009182526020909120600b909102015481546001606060020a03909116908110614dcd57fe5b90600052602060002090600b0201600501540292505b614e1e565b8154600a805460016002850201926001606060020a0316908110614e0857fe5b90600052602060002090600b0201600501540292505b505092915050565b50600090565b60095460ff1681565b6000806000614e438461567b565b9150915080600a836001606060020a0316815481101515614e6057fe5b90600052602060002090600b0201600501540292505050919050565b600154600160a060020a031681565b600080600080600080600f88815481101515614ea357fe5b60009182526020909120600e90910201600581018054919550906000198101908110614ecb57fe5b600091825260209091206002600390920201015460ff1615614f7257600a8401805488908110614ef757fe5b906000526020600020015492506000831115614f64578284600c0188815481101515614f1f57fe5b9060005260206000200154811515614f3357fe5b049550828460070188815481101515614f4857fe5b9060005260206000200154811515614f5c57fe5b049450614f6d565b60009550600094505b615023565b6005840180546000198101908110614f8657fe5b90600052602060002090600302016000015491508360050187815481101515614fab57fe5b906000526020600020906003020160010160008381526020019081526020016000205490508084600c0188815481101515614fe257fe5b9060005260206000200154811515614ff657fe5b04955080846007018881548110151561500b57fe5b906000526020600020015481151561501f57fe5b0494505b505050509250929050565b600080600080600080600080600a805490508a6001606060020a031610151561505a576000975061562e565b60006002805460a060020a900460ff169081111561507457fe5b14615164576060604051908101604052808c600160a060020a031681526020018b6001606060020a031681526020018a6001608060020a0316815250600c6000600e60008154600101919050819055815260200190815260200160002060008201518160000160006101000a815481600160a060020a030219169083600160a060020a0316021790555060208201518160000160146101000a8154816001606060020a0302191690836001606060020a0316021790555060408201518160010160006101000a8154816001608060020a0302191690836001608060020a031602179055509050506001975061562e565b6001608060020a03891615806151ac5750886001608060020a0316600a8b6001606060020a031681548110151561519757fe5b90600052602060002090600b02016003015411155b15156151bb576000975061562e565b600160a060020a038b16600090815260106020526040902096506151df8b8b61563c565b604080517f7521ccb1000000000000000000000000000000000000000000000000000000008152600b60048201526001606060020a038d16602482015260448101839052905191975073180eba68d164c3f8c3f6dc354125ebccf4dfcb8691637521ccb191606480820192602092909190829003018186803b15801561526457600080fd5b505af4158015615278573d6000803e3d6000fd5b505050506040513d602081101561528e57600080fd5b505194506001608060020a03891615806152a85750600085115b806152b4575086546004115b15156152c3576000975061562e565b60018701548590036001608060020a038a169081019450158061536557506001546040805160e060020a6370a08231028152600160a060020a038e811660048301529151879392909216916370a08231916024808201926020929091908290030181600087803b15801561533657600080fd5b505af115801561534a573d6000803e3d6000fd5b505050506040513d602081101561536057600080fd5b505110155b1515615374576000975061562e565b600187018490556001608060020a038916151561549157600092505b865483101561548c5786546001606060020a038b16908890859081106153b257fe5b600091825260209091206002820401546001909116600c026101000a90046001606060020a03161415615481578654879060001981019081106153f157fe5b9060005260206000209060029182820401919006600c029054906101000a90046001606060020a0316876000018481548110151561542b57fe5b9060005260206000209060029182820401919006600c026101000a8154816001606060020a0302191690836001606060020a031602179055508660000180548091906001900361547b9190615862565b5061548c565b600190920191615390565b6154d3565b8415156154d3578654600180820189556000898152602090206002830401805491909216600c026101000a6001606060020a0381810219909216918d16021790555b50600090506001606060020a0389165b8115156155cc57604080517f2e25c38a000000000000000000000000000000000000000000000000000000008152600b6004820152602481018390526001608060020a038b16604482015260648101889052905173180eba68d164c3f8c3f6dc354125ebccf4dfcb8691632e25c38a916084808301926000929190829003018186803b15801561557257600080fd5b505af4158015615586573d6000803e3d6000fd5b50505050806000141561559c57600191506155c7565b600a8054829081106155aa57fe5b60009182526020909120600b90910201546001606060020a031690505b6154e3565b604080516001606060020a038c1681526001608060020a038b1660208201528082018690529051600160a060020a038d16917f8f753321c98641397daaca5e8abf8881fff1fd7a7bc229924a012e2cb61763d5919081900360600190a2600197505b505050505050509392505050565b600060405160005b601481101561565f578481600c011a81830153600101615644565b5060145b6020811015613e0c5783811a81830153600101615663565b600080604083511015156156bc57505060208101516040820151600a546001606060020a038316106156ac57600091505b8015156156b7575060035b6156c4565b506000905060035b915091565b60008060405160005b60148110156156ed5784811a81600c840101536001016156d2565b505193915050565b6080604051908101604052806004906020820280388339509192915050565b81548183558181111561358757600083815260209020613587918101908301615896565b8154818355818111156135875760040281600402836000526020600020918201910161358791906158bc565b815481835581811115613587576003028160030283600052602060002091820191016135879190615907565b82600481019282156157be579160200282015b828111156157be5782358255916020019190600101906157a3565b506157ca92915061592d565b5090565b81548183558181111561358757600e0281600e0283600052602060002091820191016135879190615947565b8280548282559060005260206000209081019282156157be579160200282015b828111156157be57825182559160200191906001019061581a565b82600481019282156157be57916020028201828111156157be57825182559160200191906001019061581a565b815481835581811115613587576001016002900481600101600290048360005260206000209182019101613587919061592d565b6158b991905b808211156157ca5760006158b082826159fc565b5060010161589c565b90565b6158b991905b808211156157ca57805473ffffffffffffffffffffffffffffffffffffffff19168155600060018201819055600282015560038101805460ff191690556004016158c2565b6158b991905b808211156157ca576000815560028101805460ff1916905560030161590d565b6158b991905b808211156157ca5760008155600101615933565b6158b991905b808211156157ca5760008082556001820181905560028201805460ff19169055600382018190556159816004830182615a1d565b61598f600583016000615a3b565b61599d600683016000615a5c565b6159ab600783016000615a5c565b60088201600090556009820160009055600a820160006159cb9190615a5c565b6159d9600b83016000615a5c565b6159e7600c83016000615a5c565b50600d8101805460ff19169055600e0161594d565b5080546000825560040290600052602060002090810190613c6f91906158bc565b5080546000825590600052602060002090810190613c6f9190615896565b5080546000825560030290600052602060002090810190613c6f9190615907565b5080546000825590600052602060002090810190613c6f919061592d5600a165627a7a723058209ccfb35b2a6ff0eba1f3ec627c850c4d9e5bc24ee334d8a8e6de0efd8b4d8e230029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000334f12afb7d8740868be0471963961653307523400000000000000000000000098a3a786f2caa319dc234d28fcd6e362a97507090000000000000000000000001738b62e403090666687243e758b1c29edffc90e0000000000000000000000000000000000000000000000000000000000000e100000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000000000000000000000000000000000000000009c40000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000059a600000000000000000000000000000000000000000000000000000000000098ee00000000000000000000000000000000000000000000000000000000000098ee00000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000000006
-----Decoded View---------------
Arg [0] : _governor (address): 0x334F12AfB7D8740868bE04719639616533075234
Arg [1] : _pinakion (address): 0x98a3A786F2cAa319Dc234d28fcd6e362A9750709
Arg [2] : _RNGenerator (address): 0x1738B62E403090666687243e758b1C29eDfFc90e
Arg [3] : _minStakingTime (uint256): 3600
Arg [4] : _maxDrawingTime (uint256): 7200
Arg [5] : _hiddenVotes (bool): False
Arg [6] : _minStake (uint256): 1000000000000000000000
Arg [7] : _alpha (uint256): 2500
Arg [8] : _feeForJuror (uint256): 1000000000000000000
Arg [9] : _jurorsForCourtJump (uint256): 255
Arg [10] : _timesPerPeriod (uint256[4]): 367200,626400,626400,604800
Arg [11] : _sortitionSumTreeK (uint256): 6
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 000000000000000000000000334f12afb7d8740868be04719639616533075234
Arg [1] : 00000000000000000000000098a3a786f2caa319dc234d28fcd6e362a9750709
Arg [2] : 0000000000000000000000001738b62e403090666687243e758b1c29edffc90e
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000e10
Arg [4] : 0000000000000000000000000000000000000000000000000000000000001c20
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 00000000000000000000000000000000000000000000003635c9adc5dea00000
Arg [7] : 00000000000000000000000000000000000000000000000000000000000009c4
Arg [8] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [9] : 00000000000000000000000000000000000000000000000000000000000000ff
Arg [10] : 0000000000000000000000000000000000000000000000000000000000059a60
Arg [11] : 0000000000000000000000000000000000000000000000000000000000098ee0
Arg [12] : 0000000000000000000000000000000000000000000000000000000000098ee0
Arg [13] : 0000000000000000000000000000000000000000000000000000000000093a80
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000006
Swarm Source
bzzr://9ccfb35b2a6ff0eba1f3ec627c850c4d9e5bc24ee334d8a8e6de0efd8b4d8e23
Loading...
Loading
Loading...
Loading
OVERVIEW
Version 1 of the Kleros Court contract, Athena ReleaseLoading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.