realitytoken-contracts
Version:
realitytoken basic contracts
1,118 lines (1,117 loc) • 217 kB
JSON
{
"contractName": "ArbitratorData",
"abi": [
{
"constant": true,
"inputs": [],
"name": "realityArbitrationCost",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "hashid",
"type": "bytes32"
},
{
"indexed": false,
"name": "answer",
"type": "bytes32"
}
],
"name": "Answer",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "cost_",
"type": "uint256"
}
],
"name": "setArbitrationCost",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "hashid_",
"type": "bytes32[]"
},
{
"name": "answer_",
"type": "bytes32[]"
},
{
"name": "answerConfidence_",
"type": "uint8[]"
}
],
"name": "addAnswer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "hashid_",
"type": "bytes32"
}
],
"name": "getAnswer",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "hashid_",
"type": "bytes32"
}
],
"name": "isAnswerSet",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "hashid_",
"type": "bytes32"
},
{
"name": "timethreshold",
"type": "uint256"
}
],
"name": "getAnswerBefore",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "hashid_",
"type": "bytes32"
},
{
"name": "timethreshold",
"type": "uint256"
}
],
"name": "isAnswerSetBefore",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x6060604052341561000f57600080fd5b60038054600160a060020a03191633600160a060020a03161790556104fd806100396000396000f30060606040526004361061008d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303849575811461009257806304b4922d146100b75780631d77b92c146100e15780631e646a1e146100f957806375d88d84146101125780638a4599c71461012b5780638da5cb5b14610141578063cf9db03c1461017d575b600080fd5b341561009d57600080fd5b6100a561024c565b60405190815260200160405180910390f35b34156100c257600080fd5b6100cd600435610252565b604051901515815260200160405180910390f35b34156100ec57600080fd5b6100f760043561027a565b005b341561010457600080fd5b6100a56004356024356102a7565b341561011d57600080fd5b6100cd6004356024356102f4565b341561013657600080fd5b6100a560043561031a565b341561014c57600080fd5b610154610348565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b341561018857600080fd5b6100f76004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061036495505050505050565b60045481565b6000818152600160205260408120548190111561027157506001610275565b5060005b919050565b6003543373ffffffffffffffffffffffffffffffffffffffff9081169116146102a257600080fd5b600455565b6000828152600160205260408120548190116102c257600080fd5b6000838152600160205260409020548210156102dd57600080fd5b506000828152602081905260409020545b92915050565b600082815260016020526040812054829011610312575060016102ee565b5060006102ee565b60008181526001602052604081205481901161033557600080fd5b5060009081526020819052604090205490565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6003546000903373ffffffffffffffffffffffffffffffffffffffff90811691161461038f57600080fd5b5060005b83518110156104cb578281815181106103a857fe5b906020019060200201516000808684815181106103c157fe5b906020019060200201518152602081019190915260400160009081209190915542906001908684815181106103f257fe5b90602001906020020151815260208101919091526040016000205581818151811061041957fe5b906020019060200201516002600086848151811061043357fe5b9060200190602002015181526020810191909152604001600020805460ff191660ff929092169190911790557f6e1f2815bf754d6c59e5aa051cc910adccda683adf44f41294b13ec8e8215d6c84828151811061048c57fe5b906020019060200201518483815181106104a257fe5b9060200190602002015160405191825260208201526040908101905180910390a1600101610393565b505050505600a165627a7a723058208e821fbee03438d1ecb6f427d1167edceb6f19157b54090fb020e65db5d3928b0029",
"deployedBytecode": "0x60606040526004361061008d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303849575811461009257806304b4922d146100b75780631d77b92c146100e15780631e646a1e146100f957806375d88d84146101125780638a4599c71461012b5780638da5cb5b14610141578063cf9db03c1461017d575b600080fd5b341561009d57600080fd5b6100a561024c565b60405190815260200160405180910390f35b34156100c257600080fd5b6100cd600435610252565b604051901515815260200160405180910390f35b34156100ec57600080fd5b6100f760043561027a565b005b341561010457600080fd5b6100a56004356024356102a7565b341561011d57600080fd5b6100cd6004356024356102f4565b341561013657600080fd5b6100a560043561031a565b341561014c57600080fd5b610154610348565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b341561018857600080fd5b6100f76004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061036495505050505050565b60045481565b6000818152600160205260408120548190111561027157506001610275565b5060005b919050565b6003543373ffffffffffffffffffffffffffffffffffffffff9081169116146102a257600080fd5b600455565b6000828152600160205260408120548190116102c257600080fd5b6000838152600160205260409020548210156102dd57600080fd5b506000828152602081905260409020545b92915050565b600082815260016020526040812054829011610312575060016102ee565b5060006102ee565b60008181526001602052604081205481901161033557600080fd5b5060009081526020819052604090205490565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6003546000903373ffffffffffffffffffffffffffffffffffffffff90811691161461038f57600080fd5b5060005b83518110156104cb578281815181106103a857fe5b906020019060200201516000808684815181106103c157fe5b906020019060200201518152602081019190915260400160009081209190915542906001908684815181106103f257fe5b90602001906020020151815260208101919091526040016000205581818151811061041957fe5b906020019060200201516002600086848151811061043357fe5b9060200190602002015181526020810191909152604001600020805460ff191660ff929092169190911790557f6e1f2815bf754d6c59e5aa051cc910adccda683adf44f41294b13ec8e8215d6c84828151811061048c57fe5b906020019060200201518483815181106104a257fe5b9060200190602002015160405191825260208201526040908101905180910390a1600101610393565b505050505600a165627a7a723058208e821fbee03438d1ecb6f427d1167edceb6f19157b54090fb020e65db5d3928b0029",
"sourceMap": "26:2516:0:-;;;657:67;;;;;;;;700:5;:18;;-1:-1:-1;;;;;;700:18:0;708:10;-1:-1:-1;;;;;700:18:0;;;;26:2516;;;-1:-1:-1;26:2516:0;;",
"deployedSourceMap": "26:2516:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;261:34;;;;;;;;;;;;;;;;;;;;;;;;;;;1694:161;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;870:112;;;;;;;;;;;;;;;;2107:227;;;;;;;;;;;;;;;;2339:201;;;;;;;;;;;;;;;;1540:149;;;;;;;;;;;;;;236:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1071:369;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1071:369:0;;-1:-1:-1;1071:369:0;;-1:-1:-1;;;;;;1071:369:0;261:34;;;;:::o;1694:161::-;1757:4;1772:19;;;:10;:19;;;;;;:23;;;1769:80;;;-1:-1:-1;1812:4:0;1805:11;;1769:80;-1:-1:-1;1844:5:0;1769:80;1694:161;;;:::o;870:112::-;405:5;;391:10;405:5;391:19;;;405:5;;391:19;383:28;;;;;;946:22;:30;870:112::o;2107:227::-;2194:7;2217:19;;;:10;:19;;;;;;:23;;;2209:32;;;;;;2273:19;;;;:10;:19;;;;;;2256:36;;;2248:45;;;;;;-1:-1:-1;2307:12:0;:21;;;;;;;;;;;2107:227;;;;;:::o;2339:201::-;2429:4;2444:19;;;:10;:19;;;;;;:36;;;2441:93;;-1:-1:-1;2497:4:0;2490:11;;2441:93;-1:-1:-1;2529:5:0;2522:12;;1540:149;1601:7;1624:19;;;:10;:19;;;;;;:23;;;1616:32;;;;;;-1:-1:-1;1662:12:0;:21;;;;;;;;;;;;1540:149::o;236:20::-;;;;;;:::o;1071:369::-;405:5;;1199:6;;391:10;405:5;391:19;;;405:5;;391:19;383:28;;;;;;-1:-1:-1;1206:1:0;1195:239;1212:7;:14;1208:1;:18;1195:239;;;1269:7;1277:1;1269:10;;;;;;;;;;;;;;;;1242:12;:24;1255:7;1263:1;1255:10;;;;;;;;;;;;;;;;1242:24;;;;;;;;;;;;;;;:37;;;;1314:3;;1289:10;;1300:7;1308:1;1300:7;:10;;;;;;;;;;;;;;;1289:22;;;;;;;;;;;;;:28;1358:17;1376:1;1358:17;:20;;;;;;;;;;;;;;;1327:16;:28;1344:7;1352:1;1344:10;;;;;;;;;;;;;;;;1327:28;;;;;;;;;;;-1:-1:-1;1327:28:0;:51;;-1:-1:-1;;1327:51:0;;;;;;;;;;;;1395:30;1402:7;1410:1;1402:7;:10;;;;;;;;;;;;;;;1414:7;1422:1;1414:10;;;;;;;;;;;;;;;;1395:30;;;;;;;;;;;;;;;;;;;;1228:3;;1195:239;;;1071:369;;;;:::o",
"source": "pragma solidity ^0.4.15;\n\ncontract ArbitratorData{\n mapping(bytes32 => bytes32) answersBytes;\n mapping(bytes32 => uint256) answerTime;\n mapping(bytes32 => uint8) answerConfidence; // 0 is high confidence - 7 is low confidence\n\n address public owner;\n uint public realityArbitrationCost; \n \n event Answer(bytes32 hashid, bytes32 answer);\n \n modifier isOwner(){\n require(msg.sender == owner);\n _;\n }\n\n //Constructor sets the owner of the DataContract\n //@param additionalSupportedDapps adds a additional Dapps to the list of supported Dapps\n //@param noLongerSupportedDapps list of dapps, which should no longer supported\n function ArbitratorData()\n public {\n owner = msg.sender;\n }\n\n\n // allows to set a new setArbitrationCost\n // @param cost_ the cost for all future arbitration costs needed to pay before arbitration.\n function setArbitrationCost(uint cost_)\n isOwner()\n public \n {\n realityArbitrationCost = cost_;\n }\n\n\n //@dev all answeres needs to be submitted here. Timestamp of answer is stored. \n function addAnswer(bytes32[] hashid_, bytes32[] answer_, uint8[] answerConfidence_)\n isOwner()\n public\n {\n for(uint i=0;i < hashid_.length; i++){\n answersBytes[hashid_[i]] = answer_[i];\n answerTime[hashid_[i]] = now;\n answerConfidence[hashid_[i]] = answerConfidence_[i]; \n emit Answer(hashid_[i], answer_[i]);\n }\n }\n\n //@dev gives the answer of the arbitrator \n //@param hashid_ is the hash id of the answer\n function getAnswer(bytes32 hashid_) constant public returns (bytes32){\n require(answerTime[hashid_] > 0);\n return answersBytes[hashid_];\n }\n\n function isAnswerSet(bytes32 hashid_) constant public returns (bool){\n if(answerTime[hashid_] > 0)\n return true;\n else \n return false;\n }\n //@dev gives the answer of the arbitrator, if the arbitrator submitted it before a certain time. \n //@param hashid_ is the hash id of the answer\n //@param timethreshold is the threshold until when answers were trustworthy of the arbitrator.\n function getAnswerBefore(bytes32 hashid_, uint timethreshold) constant public returns (bytes32){\n require(answerTime[hashid_] > 0);\n require(timethreshold >= answerTime[hashid_]);\n return answersBytes[hashid_];\n }\n\n function isAnswerSetBefore(bytes32 hashid_, uint timethreshold) constant public returns (bool){\n if(answerTime[hashid_] <= timethreshold)\n return true;\n else \n return false;\n }\n}",
"sourcePath": "/home/josojo/reality/subjectivocracy/contracts/ArbitratorData.sol",
"ast": {
"absolutePath": "/home/josojo/reality/subjectivocracy/contracts/ArbitratorData.sol",
"exportedSymbols": {
"ArbitratorData": [
209
]
},
"id": 210,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "0:24:0"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 209,
"linearizedBaseContracts": [
209
],
"name": "ArbitratorData",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 5,
"name": "answersBytes",
"nodeType": "VariableDeclaration",
"scope": 209,
"src": "54:40:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
"typeString": "mapping(bytes32 => bytes32)"
},
"typeName": {
"id": 4,
"keyType": {
"id": 2,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "62:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "54:27:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
"typeString": "mapping(bytes32 => bytes32)"
},
"valueType": {
"id": 3,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "73:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 9,
"name": "answerTime",
"nodeType": "VariableDeclaration",
"scope": 209,
"src": "99:38:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"typeName": {
"id": 8,
"keyType": {
"id": 6,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "107:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "99:27:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
},
"valueType": {
"id": 7,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "118:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 13,
"name": "answerConfidence",
"nodeType": "VariableDeclaration",
"scope": 209,
"src": "142:42:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint8_$",
"typeString": "mapping(bytes32 => uint8)"
},
"typeName": {
"id": 12,
"keyType": {
"id": 10,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "150:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "142:25:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint8_$",
"typeString": "mapping(bytes32 => uint8)"
},
"valueType": {
"id": 11,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "161:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 209,
"src": "236:20:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 14,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "236:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 17,
"name": "realityArbitrationCost",
"nodeType": "VariableDeclaration",
"scope": 209,
"src": "261:34:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 16,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "261:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 23,
"name": "Answer",
"nodeType": "EventDefinition",
"parameters": {
"id": 22,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 19,
"indexed": false,
"name": "hashid",
"nodeType": "VariableDeclaration",
"scope": 23,
"src": "319:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 18,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "319:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 21,
"indexed": false,
"name": "answer",
"nodeType": "VariableDeclaration",
"scope": 23,
"src": "335:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "335:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "318:32:0"
},
"src": "306:45:0"
},
{
"body": {
"id": 33,
"nodeType": "Block",
"src": "377:47:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 29,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 26,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1067,
"src": "391:3:0",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 27,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "391:10:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 28,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15,
"src": "405:5:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "391:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 25,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1070,
"src": "383:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 30,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "383:28:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 31,
"nodeType": "ExpressionStatement",
"src": "383:28:0"
},
{
"id": 32,
"nodeType": "PlaceholderStatement",
"src": "417:1:0"
}
]
},
"documentation": null,
"id": 34,
"name": "isOwner",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 24,
"nodeType": "ParameterList",
"parameters": [],
"src": "375:2:0"
},
"src": "359:65:0",
"visibility": "internal"
},
{
"body": {
"id": 42,
"nodeType": "Block",
"src": "693:31:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 40,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 37,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 15,
"src": "700:5:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 38,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1067,
"src": "708:3:0",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 39,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "708:10:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "700:18:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 41,
"nodeType": "ExpressionStatement",
"src": "700:18:0"
}
]
},
"documentation": null,
"id": 43,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "ArbitratorData",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 35,
"nodeType": "ParameterList",
"parameters": [],
"src": "680:2:0"
},
"payable": false,
"returnParameters": {
"id": 36,
"nodeType": "ParameterList",
"parameters": [],
"src": "693:0:0"
},
"scope": 209,
"src": "657:67:0",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 54,
"nodeType": "Block",
"src": "938:44:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 52,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 50,
"name": "realityArbitrationCost",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17,
"src": "946:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 51,
"name": "cost_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45,
"src": "971:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "946:30:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 53,
"nodeType": "ExpressionStatement",
"src": "946:30:0"
}
]
},
"documentation": null,
"id": 55,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [],
"id": 48,
"modifierName": {
"argumentTypes": null,
"id": 47,
"name": "isOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 34,
"src": "914:7:0",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "914:9:0"
}
],
"name": "setArbitrationCost",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 46,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45,
"name": "cost_",
"nodeType": "VariableDeclaration",
"scope": 55,
"src": "898:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 44,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "898:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "897:12:0"
},
"payable": false,
"returnParameters": {
"id": 49,
"nodeType": "ParameterList",
"parameters": [],
"src": "938:0:0"
},
"scope": 209,
"src": "870:112:0",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 119,
"nodeType": "Block",
"src": "1187:253:0",
"statements": [
{
"body": {
"id": 117,
"nodeType": "Block",
"src": "1232:202:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 88,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 80,
"name": "answersBytes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1242:12:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
"typeString": "mapping(bytes32 => bytes32)"
}
},
"id": 84,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 81,
"name": "hashid_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 58,
"src": "1255:7:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
"typeString": "bytes32[] memory"
}
},
"id": 83,
"indexExpression": {
"argumentTypes": null,
"id": 82,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 70,
"src": "1263:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1255:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1242:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 85,
"name": "answer_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 61,
"src": "1269:7:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
"typeString": "bytes32[] memory"
}
},
"id": 87,
"indexExpression": {
"argumentTypes": null,
"id": 86,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 70,
"src": "1277:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1269:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "1242:37:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 89,
"nodeType": "ExpressionStatement",
"src": "1242:37:0"
},
{
"expression": {
"argumentTypes": null,
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 90,
"name": "answerTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "1289:10:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
"typeString": "mapping(bytes32 => uint256)"
}
},
"id": 94,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 91,
"name": "hashid_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 58,
"src": "1300:7:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
"typeString": "bytes32[] memory"
}
},
"id": 93,
"indexExpression": {
"argumentTypes": null,
"id": 92,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 70,
"src": "1308:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1300:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1289:22:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 95,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1069,
"src": "1314:3:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1289:28:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 97,
"nodeType": "ExpressionStatement",
"src": "1289:28:0"
},
{
"expression": {
"argumentTypes": null,
"id": 106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 98,
"name": "answerConfidence",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "1327:16:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint8_$",
"typeString": "mapping(bytes32 => uint8)"
}
},
"id": 102,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 99,
"name": "hashid_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 58,
"src": "1344:7:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
"typeString": "bytes32[] memory"
}
},
"id": 101,
"indexExpression": {
"argumentTypes": null,
"id": 100,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 70,
"src": "1352:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,