kleros-interaction-2
Version:
Smart contracts interacting with Kleros.
1,209 lines • 1.7 MB
JSON
{
"contractName": "MultiPartyInsurableFees",
"abi": [
{
"constant": true,
"inputs": [],
"name": "arbitratorExtraData",
"outputs": [
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "paidFees",
"outputs": [
{
"name": "firstContributionTime",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_disputeID",
"type": "uint256"
},
{
"name": "_ruling",
"type": "uint256"
}
],
"name": "rule",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "stake",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "feeGovernor",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "arbitrator",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "fundDisputeCache",
"outputs": [
{
"name": "cost",
"type": "uint256"
},
{
"name": "appealing",
"type": "bool"
},
{
"name": "appealPeriodStart",
"type": "uint256"
},
{
"name": "appealPeriodEnd",
"type": "uint256"
},
{
"name": "appealPeriodSupported",
"type": "bool"
},
{
"name": "requiredValueForSide",
"type": "uint256"
},
{
"name": "expectedValue",
"type": "uint256"
},
{
"name": "stillRequiredValueForSide",
"type": "uint256"
},
{
"name": "keptValue",
"type": "uint256"
},
{
"name": "refundedValue",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "agreements",
"outputs": [
{
"name": "creator",
"type": "address"
},
{
"name": "numberOfChoices",
"type": "uint256"
},
{
"name": "extraData",
"type": "bytes"
},
{
"name": "arbitrationFeesWaitingTime",
"type": "uint256"
},
{
"name": "arbitrator",
"type": "address"
},
{
"name": "disputeID",
"type": "uint256"
},
{
"name": "disputed",
"type": "bool"
},
{
"name": "appealed",
"type": "bool"
},
{
"name": "ruling",
"type": "uint256"
},
{
"name": "executed",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "uint256"
}
],
"name": "arbitratorAndDisputeIDToAgreementID",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_agreementID",
"type": "bytes32"
}
],
"name": "getAgreementInfo",
"outputs": [
{
"name": "creator",
"type": "address"
},
{
"name": "parties",
"type": "address[]"
},
{
"name": "numberOfChoices",
"type": "uint256"
},
{
"name": "extraData",
"type": "bytes"
},
{
"name": "arbitrationFeesWaitingTime",
"type": "uint256"
},
{
"name": "arbitrator",
"type": "address"
},
{
"name": "disputeID",
"type": "uint256"
},
{
"name": "disputed",
"type": "bool"
},
{
"name": "appealed",
"type": "bool"
},
{
"name": "ruling",
"type": "uint256"
},
{
"name": "executed",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_feeGovernor",
"type": "address"
},
{
"name": "_stake",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_agreementID",
"type": "bytes32"
},
{
"indexed": true,
"name": "_round",
"type": "uint256"
},
{
"indexed": true,
"name": "_contributor",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Contribution",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_agreementID",
"type": "bytes32"
},
{
"indexed": true,
"name": "_round",
"type": "uint256"
},
{
"indexed": true,
"name": "_contributor",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "RewardWithdrawal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_metaEvidenceID",
"type": "uint256"
},
{
"indexed": false,
"name": "_evidence",
"type": "string"
}
],
"name": "MetaEvidence",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_arbitrator",
"type": "address"
},
{
"indexed": true,
"name": "_disputeID",
"type": "uint256"
},
{
"indexed": false,
"name": "_metaEvidenceID",
"type": "uint256"
}
],
"name": "Dispute",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_arbitrator",
"type": "address"
},
{
"indexed": true,
"name": "_disputeID",
"type": "uint256"
},
{
"indexed": true,
"name": "_party",
"type": "address"
},
{
"indexed": false,
"name": "_evidence",
"type": "string"
}
],
"name": "Evidence",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_arbitrator",
"type": "address"
},
{
"indexed": true,
"name": "_disputeID",
"type": "uint256"
},
{
"indexed": false,
"name": "_ruling",
"type": "uint256"
}
],
"name": "Ruling",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_feeGovernor",
"type": "address"
}
],
"name": "changeFeeGovernor",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_stake",
"type": "uint256"
}
],
"name": "changeStake",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_agreementID",
"type": "bytes32"
},
{
"name": "_side",
"type": "uint256"
}
],
"name": "fundDispute",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_agreementID",
"type": "bytes32"
},
{
"name": "_round",
"type": "uint256"
}
],
"name": "withdrawReward",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_agreementID",
"type": "bytes32"
}
],
"name": "getFeesInfo",
"outputs": [
{
"name": "ruling",
"type": "uint256[]"
},
{
"name": "_stake",
"type": "uint256[]"
},
{
"name": "totalValue",
"type": "uint256[]"
},
{
"name": "totalContributedPerSide",
"type": "uint256[2][]"
},
{
"name": "loserFullyFunded",
"type": "bool[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_agreementID",
"type": "bytes32"
},
{
"name": "_round",
"type": "uint256"
},
{
"name": "_contributor",
"type": "address"
}
],
"name": "getContributions",
"outputs": [
{
"name": "contributions",
"type": "uint256[2]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\n\nimport \"../agreement/MultiPartyAgreements.sol\";\n\n/**\n * @title MultiPartyInsurableFees\n * @author Enrique Piqueras - <epiquerass@gmail.com>\n * @dev Fee part of a composed arbitrable contract. Handles crowdinsured arbitration and appeal fees.\n */\ncontract MultiPartyInsurableFees is MultiPartyAgreements {\n /* Structs */\n\n struct PaidFees {\n uint firstContributionTime; // The time the first contribution was made at.\n uint[] ruling; // The ruling for each round.\n uint[] stake; // The stake required for each round.\n uint[] totalValue; // The current held value for each round.\n uint[2][] totalContributedPerSide; // The total amount contributed per side for each round.\n bool[] loserFullyFunded; // Wether the loser fully funded the appeal for each round.\n mapping(address => uint[2])[] contributions; // The contributions for each round.\n }\n struct FundDisputeCache { // Needed to avoid stack depth error in `fundDispute()`.\n uint cost;\n bool appealing;\n uint appealPeriodStart;\n uint appealPeriodEnd;\n bool appealPeriodSupported;\n uint requiredValueForSide;\n uint expectedValue;\n uint stillRequiredValueForSide;\n uint keptValue;\n uint refundedValue;\n }\n\n /* Events */\n\n /** @dev Emitted when a contribution is made.\n * @param _agreementID The ID of the agreement that the contribution was made to.\n * @param _round The round of the agreement that the contribution was made to.\n * @param _contributor The address that sent the contribution.\n * @param _value The value of the contribution.\n */\n event Contribution(bytes32 indexed _agreementID, uint indexed _round, address indexed _contributor, uint _value);\n\n /** @dev Emitted when a contribution reward is withdrawn.\n * @param _agreementID The ID of the agreement that the contribution was made to.\n * @param _round The round of the agreement that the contribution was made to.\n * @param _contributor The address that sent the contribution.\n * @param _value The value of the reward.\n */\n event RewardWithdrawal(bytes32 indexed _agreementID, uint indexed _round, address indexed _contributor, uint _value);\n\n /* Storage */\n\n address public feeGovernor;\n uint public stake;\n mapping(bytes32 => PaidFees) public paidFees;\n FundDisputeCache public fundDisputeCache;\n\n /* Constructor */\n\n /** @dev Constructs the `MultiPartyInsurableFees` contract.\n * @param _feeGovernor The governor of this contract.\n * @param _stake The stake parameter for sharing fees.\n */\n constructor(address _feeGovernor, uint _stake) public {\n feeGovernor = _feeGovernor;\n stake = _stake;\n }\n\n /* Public */\n\n /** @dev Changes the `feeGovernor` storage variable.\n * @param _feeGovernor The new `feeGovernor` storage variable.\n */\n function changeFeeGovernor(address _feeGovernor) public {\n require(msg.sender == feeGovernor, \"The caller is not the fee governor.\");\n feeGovernor = _feeGovernor;\n }\n\n /** @dev Changes the `stake` storage variable.\n * @param _stake The new `stake` storage variable.\n */\n function changeStake(uint _stake) public {\n require(msg.sender == feeGovernor, \"The caller is not the fee governor.\");\n stake = _stake;\n }\n\n /** @dev Funds the specified side of a dispute for the specified agreement or times out the dispute if it is taking too long to fund.\n * @param _agreementID The ID of the agreement.\n * @param _side The side. 0 for the side that lost the previous round, if any, and 1 for the one that won.\n */\n function fundDispute(bytes32 _agreementID, uint _side) public payable {\n Agreement storage agreement = agreements[_agreementID];\n PaidFees storage _paidFees = paidFees[_agreementID];\n require(agreement.creator != address(0), \"The specified agreement does not exist.\");\n require(!agreement.executed, \"You cannot fund disputes for executed agreements.\");\n require(\n !agreement.disputed || agreement.arbitrator.disputeStatus(agreement.disputeID) == Arbitrator.DisputeStatus.Appealable,\n \"The agreement is already disputed and is not appealable.\"\n );\n require(_side <= 1, \"There are only two sides.\");\n require(msg.value > 0, \"The value of the contribution cannot be zero.\");\n\n // Prepare storage for first call.\n if (_paidFees.firstContributionTime == 0) {\n _paidFees.firstContributionTime = now;\n _paidFees.ruling.push(0);\n _paidFees.stake.push(stake);\n _paidFees.totalValue.push(0);\n _paidFees.totalContributedPerSide.push([0, 0]);\n _paidFees.loserFullyFunded.push(false);\n _paidFees.contributions.length++;\n } else { // Reset cache\n fundDisputeCache.cost = 0;\n fundDisputeCache.appealing = false;\n (fundDisputeCache.appealPeriodStart, fundDisputeCache.appealPeriodEnd) = (0, 0);\n fundDisputeCache.appealPeriodSupported = false;\n fundDisputeCache.requiredValueForSide = 0;\n fundDisputeCache.expectedValue = 0;\n fundDisputeCache.stillRequiredValueForSide = 0;\n fundDisputeCache.keptValue = 0;\n fundDisputeCache.refundedValue = 0;\n }\n\n // Check time outs and requirements.\n if (_paidFees.stake.length == 1) { // First round.\n fundDisputeCache.cost = agreement.arbitrator.arbitrationCost(agreement.extraData);\n\n // Arbitration fees time out.\n if (now - _paidFees.firstContributionTime > agreement.arbitrationFeesWaitingTime) {\n executeAgreementRuling(_agreementID, 0);\n return;\n }\n } else { // Appeal.\n fundDisputeCache.cost = agreement.arbitrator.appealCost(agreement.disputeID, agreement.extraData);\n\n fundDisputeCache.appealing = true;\n (fundDisputeCache.appealPeriodStart, fundDisputeCache.appealPeriodEnd) = agreement.arbitrator.appealPeriod(agreement.disputeID);\n fundDisputeCache.appealPeriodSupported = fundDisputeCache.appealPeriodStart != 0 && fundDisputeCache.appealPeriodEnd != 0;\n if (fundDisputeCache.appealPeriodSupported) {\n if (now < fundDisputeCache.appealPeriodStart + ((fundDisputeCache.appealPeriodEnd - fundDisputeCache.appealPeriodStart) / 2)) // In the first half of the appeal period.\n require(_side == 0, \"It is the losing side's turn to fund the appeal.\");\n else // In the second half of the appeal period.\n require(\n _side == 1 && _paidFees.loserFullyFunded[_paidFees.loserFullyFunded.length - 1],\n \"It is the winning side's turn to fund the appeal, only if the losing side already fully funded it.\"\n );\n } else require(msg.value >= fundDisputeCache.cost, \"Fees must be paid in full if the arbitrator does not support `appealPeriod`.\");\n }\n\n // Compute required value.\n if (!fundDisputeCache.appealing) // First round.\n fundDisputeCache.requiredValueForSide = fundDisputeCache.cost / 2;\n else { // Appeal.\n if (!fundDisputeCache.appealPeriodSupported)\n fundDisputeCache.requiredValueForSide = fundDisputeCache.cost;\n else if (_side == 0) // Losing side.\n fundDisputeCache.requiredValueForSide = fundDisputeCache.cost + (2 * _paidFees.stake[_paidFees.stake.length - 1]);\n else { // Winning side.\n fundDisputeCache.expectedValue = _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][0] - _paidFees.stake[_paidFees.stake.length - 1];\n fundDisputeCache.requiredValueForSide = fundDisputeCache.cost > _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][0] + fundDisputeCache.expectedValue ? fundDisputeCache.cost - _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][0] : fundDisputeCache.expectedValue;\n }\n }\n\n // Take contribution.\n if (_paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side] >= fundDisputeCache.requiredValueForSide)\n fundDisputeCache.stillRequiredValueForSide = 0;\n else \n fundDisputeCache.stillRequiredValueForSide = fundDisputeCache.requiredValueForSide - _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side];\n fundDisputeCache.keptValue = fundDisputeCache.stillRequiredValueForSide >= msg.value ?\n msg.value : fundDisputeCache.stillRequiredValueForSide;\n fundDisputeCache.refundedValue = msg.value - fundDisputeCache.keptValue;\n if (fundDisputeCache.keptValue > 0) {\n _paidFees.totalValue[_paidFees.totalValue.length - 1] += fundDisputeCache.keptValue;\n _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side] += fundDisputeCache.keptValue;\n _paidFees.contributions[_paidFees.contributions.length - 1][msg.sender][_side] += fundDisputeCache.keptValue;\n }\n if (fundDisputeCache.refundedValue > 0) msg.sender.transfer(fundDisputeCache.refundedValue);\n emit Contribution(_agreementID, _paidFees.stake.length - 1, msg.sender, fundDisputeCache.keptValue);\n\n // Check if enough funds have been gathered and act accordingly.\n if (\n _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side] >= fundDisputeCache.requiredValueForSide ||\n (fundDisputeCache.appealing && !fundDisputeCache.appealPeriodSupported)\n ) {\n if (_side == 0 && (fundDisputeCache.appealing ? fundDisputeCache.appealPeriodSupported : _paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][1] < fundDisputeCache.requiredValueForSide)) { // Losing side and not direct appeal or dispute raise.\n if (!_paidFees.loserFullyFunded[_paidFees.loserFullyFunded.length - 1])\n _paidFees.loserFullyFunded[_paidFees.loserFullyFunded.length - 1] = true;\n } else { // Winning side or direct appeal.\n if (!fundDisputeCache.appealing) { // First round.\n if (_paidFees.totalContributedPerSide[_paidFees.totalContributedPerSide.length - 1][_side == 0 ? 1 : 0] < fundDisputeCache.requiredValueForSide) return;\n agreement.disputeID = agreement.arbitrator.createDispute.value(fundDisputeCache.cost)(agreement.numberOfChoices, agreement.extraData);\n agreement.disputed = true;\n arbitratorAndDisputeIDToAgreementID[agreement.arbitrator][agreement.disputeID] = _agreementID;\n emit Dispute(agreement.arbitrator, agreement.disputeID, uint(_agreementID));\n } else { // Appeal.\n _paidFees.ruling[_paidFees.ruling.length - 1] = agreement.arbitrator.currentRuling(agreement.disputeID);\n agreement.arbitrator.appeal.value(fundDisputeCache.cost)(agreement.disputeID, agreement.extraData);\n if (!agreement.appealed) agreement.appealed = true;\n }\n\n // Update the total value.\n _paidFees.totalValue[_paidFees.totalValue.length - 1] -= fundDisputeCache.cost;\n\n // Prepare for the next round.\n _paidFees.ruling.push(0);\n _paidFees.stake.push(stake);\n _paidFees.totalValue.push(0);\n _paidFees.totalContributedPerSide.push([0, 0]);\n _paidFees.loserFullyFunded.push(false);\n _paidFees.contributions.length++;\n }\n }\n }\n\n /** @dev Withdraws the caller's reward for funding the specified round of the specified agreement.\n * @param _agreementID The ID of the agreement.\n * @param _round The round.\n */\n function withdrawReward(bytes32 _agreementID, uint _round) public {\n Agreement storage agreement = agreements[_agreementID];\n PaidFees storage _paidFees = paidFees[_agreementID];\n require(agreement.creator != address(0), \"The specified agreement does not exist.\");\n require(\n !agreement.disputed || agreement.arbitrator.disputeStatus(agreement.disputeID) == Arbitrator.DisputeStatus.Solved,\n \"The agreement is still disputed.\"\n );\n require(_round < _paidFees.stake.length, \"The specified round of the specified agreement does not exist.\");\n\n uint _reward;\n if (_round == 0 || _round == _paidFees.stake.length - 1) { // First or last round.\n require(_round != 0 || !agreement.disputed, \"There is nothing to withdraw from the first round if the dispute was raised.\");\n _reward = _paidFees.contributions[_round][msg.sender][0] + _paidFees.contributions[_round][msg.sender][1];\n } else { // Appeal.\n uint _winningSide = _paidFees.ruling[_round] != agreement.ruling ? 0 : 1;\n _reward = _paidFees.totalContributedPerSide[_round][_winningSide] == 0 ? 0 : ((_paidFees.totalValue[_round] * _paidFees.contributions[_round][msg.sender][_winningSide]) / _paidFees.totalContributedPerSide[_round][_winningSide]);\n }\n\n _paidFees.contributions[_round][msg.sender] = [0, 0];\n msg.sender.transfer(_reward);\n emit RewardWithdrawal(_agreementID, _round, msg.sender, _reward);\n }\n\n /* External Views */\n\n /** @dev Gets the info on fees paid for the specified agreement.\n * @param _agreementID The ID of the agreement.\n * @return The info.\n */\n function getFeesInfo(\n bytes32 _agreementID\n ) external view returns(\n uint[] ruling,\n uint[] _stake,\n uint[] totalValue,\n uint[2][] totalContributedPerSide,\n bool[] loserFullyFunded\n ) {\n PaidFees storage _paidFees = paidFees[_agreementID];\n ruling = _paidFees.ruling;\n _stake = _paidFees.stake;\n totalValue = _paidFees.totalValue;\n totalContributedPerSide = _paidFees.totalContributedPerSide;\n loserFullyFunded = _paidFees.loserFullyFunded;\n }\n\n /** @dev Gets the contributions by the specified contributor in the specified round of the specified agreement.\n * @param _agreementID The ID of the agreement.\n * @param _round The round.\n * @param _contributor The address of the contributor.\n * @return The contributions.\n */\n function getContributions(bytes32 _agreementID, uint _round, address _contributor) external view returns(uint[2] contributions) {\n contributions = paidFees[_agreementID].contributions[_round][_contributor];\n }\n}\n",
"sourcePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/composed-arbitrable/fee/MultiPartyInsurableFees.sol",
"ast": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/composed-arbitrable/fee/MultiPartyInsurableFees.sol",
"exportedSymbols": {
"MultiPartyInsurableFees": [
13089
]
},
"id": 13090,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 11871,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:39"
},
{
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/composed-arbitrable/agreement/MultiPartyAgreements.sol",
"file": "../agreement/MultiPartyAgreements.sol",
"id": 11872,
"nodeType": "ImportDirective",
"scope": 13090,
"sourceUnit": 11023,
"src": "26:47:39",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 11873,
"name": "MultiPartyAgreements",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11022,
"src": "311:20:39",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MultiPartyAgreements_$11022",
"typeString": "contract MultiPartyAgreements"
}
},
"id": 11874,
"nodeType": "InheritanceSpecifier",
"src": "311:20:39"
}
],
"contractDependencies": [
595,
11022
],
"contractKind": "contract",
"documentation": " @title MultiPartyInsurableFees\n @author Enrique Piqueras - <epiquerass@gmail.com>\n @dev Fee part of a composed arbitrable contract. Handles crowdinsured arbitration and appeal fees.",
"fullyImplemented": false,
"id": 13089,
"linearizedBaseContracts": [
13089,
11022,
595
],
"name": "MultiPartyInsurableFees",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "MultiPartyInsurableFees.PaidFees",
"id": 11901,
"members": [
{
"constant": false,
"id": 11876,
"name": "firstContributionTime",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "383:26:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11875,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "383:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11879,
"name": "ruling",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "467:13:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 11877,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "467:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11878,
"length": null,
"nodeType": "ArrayTypeName",
"src": "467:6:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11882,
"name": "stake",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "520:12:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 11880,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "520:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11881,
"length": null,
"nodeType": "ArrayTypeName",
"src": "520:6:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11885,
"name": "totalValue",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "580:17:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 11883,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "580:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11884,
"length": null,
"nodeType": "ArrayTypeName",
"src": "580:6:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11890,
"name": "totalContributedPerSide",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "649:33:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$dyn_storage_ptr",
"typeString": "uint256[2][]"
},
"typeName": {
"baseType": {
"baseType": {
"id": 11886,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "649:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11888,
"length": {
"argumentTypes": null,
"hexValue": "32",
"id": 11887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "654:1:39",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
},
"value": "2"
},
"nodeType": "ArrayTypeName",
"src": "649:7:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
"typeString": "uint256[2]"
}
},
"id": 11889,
"length": null,
"nodeType": "ArrayTypeName",
"src": "649:9:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$dyn_storage_ptr",
"typeString": "uint256[2][]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11893,
"name": "loserFullyFunded",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "749:23:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr",
"typeString": "bool[]"
},
"typeName": {
"baseType": {
"id": 11891,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "749:4:39",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 11892,
"length": null,
"nodeType": "ArrayTypeName",
"src": "749:6:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr",
"typeString": "bool[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11900,
"name": "contributions",
"nodeType": "VariableDeclaration",
"scope": 11901,
"src": "842:43:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_mapping$_t_address_$_t_array$_t_uint256_$2_storage_$_$dyn_storage_ptr",
"typeString": "mapping(address => uint256[2])[]"
},
"typeName": {
"baseType": {
"id": 11898,
"keyType": {
"id": 11894,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "850:7:39",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "842:27:39",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_uint256_$2_storage_$",
"typeString": "mapping(address => uint256[2])"
},
"valueType": {
"baseType": {
"id": 11895,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "861:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 11897,
"length": {
"argumentTypes": null,
"hexValue": "32",
"id": 11896,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "866:1:39",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
},
"value": "2"
},
"nodeType": "ArrayTypeName",
"src": "861:7:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
"typeString": "uint256[2]"
}
}
},
"id": 11899,
"length": null,
"nodeType": "ArrayTypeName",
"src": "842:29:39",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_mapping$_t_address_$_t_array$_t_uint256_$2_storage_$_$dyn_storage_ptr",
"typeString": "mapping(address => uint256[2])[]"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "PaidFees",
"nodeType": "StructDefinition",
"scope": 13089,
"src": "357:572:39",
"visibility": "public"
},
{
"canonicalName": "MultiPartyInsurableFees.FundDisputeCache",
"id": 11922,
"members": [
{
"constant": false,
"id": 11903,
"name": "cost",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1025:9:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11902,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1025:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11905,
"name": "appealing",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1044:14:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 11904,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1044:4:39",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11907,
"name": "appealPeriodStart",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1068:22:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11906,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1068:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11909,
"name": "appealPeriodEnd",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1100:20:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11908,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1100:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11911,
"name": "appealPeriodSupported",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1130:26:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 11910,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1130:4:39",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11913,
"name": "requiredValueForSide",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1166:25:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11912,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1166:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11915,
"name": "expectedValue",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1201:18:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11914,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1201:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11917,
"name": "stillRequiredValueForSide",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1229:30:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11916,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1229:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11919,
"name": "keptValue",
"nodeType": "VariableDeclaration",
"scope": 11922,
"src": "1269:14:39",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 11918,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1269:4:39",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id