kleros-interaction-2
Version:
Smart contracts interacting with Kleros.
1,292 lines (1,291 loc) • 61.8 kB
JSON
{
"contractName": "PermissionList",
"abi": [
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"name": "_blacklist",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
}
],
"name": "OwnershipRenounced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_value",
"type": "bytes32"
}
],
"name": "add",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_value",
"type": "bytes32"
}
],
"name": "remove",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_value",
"type": "bytes32"
}
],
"name": "isPermitted",
"outputs": [
{
"name": "allowed",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50604051602080610371833981016040525160008054911515740100000000000000000000000000000000000000000260a060020a60ff0219600160a060020a0319909316331792909216919091179055610301806100706000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663446bffba811461007c578063715018a6146100965780638da5cb5b146100ab57806395bc2673146100dc578063beabdb7b146100f4578063f2fde38b14610120575b600080fd5b34801561008857600080fd5b50610094600435610141565b005b3480156100a257600080fd5b50610094610176565b3480156100b757600080fd5b506100c06101e2565b60408051600160a060020a039092168252519081900360200190f35b3480156100e857600080fd5b506100946004356101f1565b34801561010057600080fd5b5061010c600435610220565b604080519115158252519081900360200190f35b34801561012c57600080fd5b50610094600160a060020a0360043516610235565b600054600160a060020a0316331461015857600080fd5b6000908152600160208190526040909120805460ff19169091179055565b600054600160a060020a0316331461018d57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a0316331461020857600080fd5b6000908152600160205260409020805460ff19169055565b60009081526001602052604090205460ff1690565b600054600160a060020a0316331461024c57600080fd5b61025581610258565b50565b600160a060020a038116151561026d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058208e5a2c9b43e49270ecc568f5c1e9f237d4286858dfa6c196afc0430e08cfc42b0029",
"deployedBytecode": "0x6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663446bffba811461007c578063715018a6146100965780638da5cb5b146100ab57806395bc2673146100dc578063beabdb7b146100f4578063f2fde38b14610120575b600080fd5b34801561008857600080fd5b50610094600435610141565b005b3480156100a257600080fd5b50610094610176565b3480156100b757600080fd5b506100c06101e2565b60408051600160a060020a039092168252519081900360200190f35b3480156100e857600080fd5b506100946004356101f1565b34801561010057600080fd5b5061010c600435610220565b604080519115158252519081900360200190f35b34801561012c57600080fd5b50610094600160a060020a0360043516610235565b600054600160a060020a0316331461015857600080fd5b6000908152600160208190526040909120805460ff19169091179055565b600054600160a060020a0316331461018d57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a0316331461020857600080fd5b6000908152600160205260409020805460ff19169055565b60009081526001602052604090205460ff1690565b600054600160a060020a0316331461024c57600080fd5b61025581610258565b50565b600160a060020a038116151561026d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058208e5a2c9b43e49270ecc568f5c1e9f237d4286858dfa6c196afc0430e08cfc42b0029",
"sourceMap": "337:1090:48:-;;;827:75;8:9:-1;5:2;;;30:1;27;20:12;5:2;827:75:48;;;;;;;;;;;;;567:5:62;:18;;873:22:48;;;;;-1:-1:-1;;;;;;;;;;;;567:18:62;;;575:10;567:18;873:22:48;;;;;;;;;;337:1090;;;;;;",
"deployedSourceMap": "337:1090:48:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;926:82;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;926:82:48;;;;;;;1001:111:62;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:62;;;;238:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:62;;;;;;;;-1:-1:-1;;;;;238:20:62;;;;;;;;;;;;;;1014:86:48;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1014:86:48;;;;;1317:108;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1317:108:48;;;;;;;;;;;;;;;;;;;;;;;1274:103:62;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:62;-1:-1:-1;;;;;1274:103:62;;;;;926:82:48;719:5:62;;-1:-1:-1;;;;;719:5:62;705:10;:19;697:28;;;;;;982:12:48;;;;997:4;982:12;;;;;;;;:19;;-1:-1:-1;;982:19:48;;;;;;926:82::o;1001:111:62:-;719:5;;-1:-1:-1;;;;;719:5:62;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:62;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:62;;;1001:111::o;238:20::-;;;-1:-1:-1;;;;;238:20:62;;:::o;1014:86:48:-;719:5:62;;-1:-1:-1;;;;;719:5:62;705:10;:19;697:28;;;;;;1088:5:48;1073:12;;;:4;:12;;;;;:20;;-1:-1:-1;;1073:20:48;;;1014:86::o;1317:108::-;1375:12;1406;;;:4;:12;;;;;;;;;1317:108::o;1274:103:62:-;719:5;;-1:-1:-1;;;;;719:5:62;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;1512:171::-;-1:-1:-1;;;;;1582:23:62;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:62;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:62;-1:-1:-1;;;;;1661:17:62;;;;;;;;;;1512:171::o",
"source": "/**\n * @title Permission List\n * @author Enrique Piqueras - <enrique@kleros.io>\n */\n\npragma solidity ^0.4.15;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"./PermissionInterface.sol\";\n\n/**\n * @title Permission List\n * This is a permission list for arbitrary values. The owner can add or remove values.\n */\ncontract PermissionList is Ownable, PermissionInterface {\n /* Storage */\n\n bool blacklist; // True if the list should function as a blacklist, false if it should function as a whitelist.\n mapping(bytes32 => bool) list; // True if the value is registered.\n\n /* Constructor */\n\n /**\n * @dev Constructs the permission list and sets the type.\n * @param _blacklist True if the list should function as a blacklist, false if it should function as a whitelist.\n */\n constructor(bool _blacklist) public {\n blacklist = _blacklist;\n }\n\n /* Public */\n\n function add(bytes32 _value) public onlyOwner {\n list[_value] = true;\n }\n\n function remove(bytes32 _value) public onlyOwner {\n list[_value] = false;\n }\n\n /* Public Views */\n\n /**\n * @dev Return true if the value is allowed.\n * @param _value The value we want to check.\n * @return allowed True if the value is allowed, false otherwise.\n */\n function isPermitted(bytes32 _value) public view returns (bool allowed) {\n return list[_value];\n }\n}\n",
"sourcePath": "/private/tmp/kleros-interaction/contracts/standard/permission/PermissionList.sol",
"ast": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/permission/PermissionList.sol",
"exportedSymbols": {
"PermissionList": [
17591
]
},
"id": 17592,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 17528,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "87:24:48"
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"id": 17529,
"nodeType": "ImportDirective",
"scope": 17592,
"sourceUnit": 19933,
"src": "113:63:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/permission/PermissionInterface.sol",
"file": "./PermissionInterface.sol",
"id": 17530,
"nodeType": "ImportDirective",
"scope": 17592,
"sourceUnit": 17527,
"src": "177:35:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 17531,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 19932,
"src": "364:7:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$19932",
"typeString": "contract Ownable"
}
},
"id": 17532,
"nodeType": "InheritanceSpecifier",
"src": "364:7:48"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 17533,
"name": "PermissionInterface",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 17526,
"src": "373:19:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_PermissionInterface_$17526",
"typeString": "contract PermissionInterface"
}
},
"id": 17534,
"nodeType": "InheritanceSpecifier",
"src": "373:19:48"
}
],
"contractDependencies": [
17526,
19932
],
"contractKind": "contract",
"documentation": " @title Permission List\n This is a permission list for arbitrary values. The owner can add or remove values.",
"fullyImplemented": true,
"id": 17591,
"linearizedBaseContracts": [
17591,
17526,
19932
],
"name": "PermissionList",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 17536,
"name": "blacklist",
"nodeType": "VariableDeclaration",
"scope": 17591,
"src": "418:14:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 17535,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "418:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 17540,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 17591,
"src": "534:29:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
"id": 17539,
"keyType": {
"id": 17537,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "542:7:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "534:24:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
"id": 17538,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "553:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 17549,
"nodeType": "Block",
"src": "863:39:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 17547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 17545,
"name": "blacklist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17536,
"src": "873:9:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 17546,
"name": "_blacklist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17542,
"src": "885:10:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "873:22:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 17548,
"nodeType": "ExpressionStatement",
"src": "873:22:48"
}
]
},
"documentation": " @dev Constructs the permission list and sets the type.\n @param _blacklist True if the list should function as a blacklist, false if it should function as a whitelist.",
"id": 17550,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17543,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17542,
"name": "_blacklist",
"nodeType": "VariableDeclaration",
"scope": 17550,
"src": "839:15:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 17541,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "839:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "838:17:48"
},
"payable": false,
"returnParameters": {
"id": 17544,
"nodeType": "ParameterList",
"parameters": [],
"src": "863:0:48"
},
"scope": 17591,
"src": "827:75:48",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 17563,
"nodeType": "Block",
"src": "972:36:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 17561,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 17557,
"name": "list",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17540,
"src": "982:4:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 17559,
"indexExpression": {
"argumentTypes": null,
"id": 17558,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17552,
"src": "987:6:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "982:12:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 17560,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "997:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "982:19:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 17562,
"nodeType": "ExpressionStatement",
"src": "982:19:48"
}
]
},
"documentation": null,
"id": 17564,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 17555,
"modifierName": {
"argumentTypes": null,
"id": 17554,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19880,
"src": "962:9:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "962:9:48"
}
],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17553,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17552,
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 17564,
"src": "939:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17551,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "939:7:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "938:16:48"
},
"payable": false,
"returnParameters": {
"id": 17556,
"nodeType": "ParameterList",
"parameters": [],
"src": "972:0:48"
},
"scope": 17591,
"src": "926:82:48",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 17577,
"nodeType": "Block",
"src": "1063:37:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 17575,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 17571,
"name": "list",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17540,
"src": "1073:4:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 17573,
"indexExpression": {
"argumentTypes": null,
"id": 17572,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17566,
"src": "1078:6:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1073:12:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 17574,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1088:5:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "1073:20:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 17576,
"nodeType": "ExpressionStatement",
"src": "1073:20:48"
}
]
},
"documentation": null,
"id": 17578,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 17569,
"modifierName": {
"argumentTypes": null,
"id": 17568,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19880,
"src": "1053:9:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1053:9:48"
}
],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17567,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17566,
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 17578,
"src": "1030:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17565,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1030:7:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1029:16:48"
},
"payable": false,
"returnParameters": {
"id": 17570,
"nodeType": "ParameterList",
"parameters": [],
"src": "1063:0:48"
},
"scope": 17591,
"src": "1014:86:48",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 17589,
"nodeType": "Block",
"src": "1389:36:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 17585,
"name": "list",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17540,
"src": "1406:4:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 17587,
"indexExpression": {
"argumentTypes": null,
"id": 17586,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17580,
"src": "1411:6:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1406:12:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 17584,
"id": 17588,
"nodeType": "Return",
"src": "1399:19:48"
}
]
},
"documentation": " @dev Return true if the value is allowed.\n @param _value The value we want to check.\n @return allowed True if the value is allowed, false otherwise.",
"id": 17590,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "isPermitted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17581,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17580,
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 17590,
"src": "1338:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17579,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1338:7:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1337:16:48"
},
"payable": false,
"returnParameters": {
"id": 17584,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17583,
"name": "allowed",
"nodeType": "VariableDeclaration",
"scope": 17590,
"src": "1375:12:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 17582,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1375:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1374:14:48"
},
"scope": 17591,
"src": "1317:108:48",
"stateMutability": "view",
"superFunction": 17525,
"visibility": "public"
}
],
"scope": 17592,
"src": "337:1090:48"
}
],
"src": "87:1341:48"
},
"legacyAST": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/permission/PermissionList.sol",
"exportedSymbols": {
"PermissionList": [
17591
]
},
"id": 17592,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 17528,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "87:24:48"
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"id": 17529,
"nodeType": "ImportDirective",
"scope": 17592,
"sourceUnit": 19933,
"src": "113:63:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/permission/PermissionInterface.sol",
"file": "./PermissionInterface.sol",
"id": 17530,
"nodeType": "ImportDirective",
"scope": 17592,
"sourceUnit": 17527,
"src": "177:35:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 17531,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 19932,
"src": "364:7:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$19932",
"typeString": "contract Ownable"
}
},
"id": 17532,
"nodeType": "InheritanceSpecifier",
"src": "364:7:48"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 17533,
"name": "PermissionInterface",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 17526,
"src": "373:19:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_PermissionInterface_$17526",
"typeString": "contract PermissionInterface"
}
},
"id": 17534,
"nodeType": "InheritanceSpecifier",
"src": "373:19:48"
}
],
"contractDependencies": [
17526,
19932
],
"contractKind": "contract",
"documentation": " @title Permission List\n This is a permission list for arbitrary values. The owner can add or remove values.",
"fullyImplemented": true,
"id": 17591,
"linearizedBaseContracts": [
17591,
17526,
19932
],
"name": "PermissionList",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 17536,
"name": "blacklist",
"nodeType": "VariableDeclaration",
"scope": 17591,
"src": "418:14:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 17535,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "418:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 17540,
"name": "list",
"nodeType": "VariableDeclaration",
"scope": 17591,
"src": "534:29:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
"id": 17539,
"keyType": {
"id": 17537,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "542:7:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "534:24:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
"id": 17538,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "553:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 17549,
"nodeType": "Block",
"src": "863:39:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 17547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 17545,
"name": "blacklist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17536,
"src": "873:9:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 17546,
"name": "_blacklist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17542,
"src": "885:10:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "873:22:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 17548,
"nodeType": "ExpressionStatement",
"src": "873:22:48"
}
]
},
"documentation": " @dev Constructs the permission list and sets the type.\n @param _blacklist True if the list should function as a blacklist, false if it should function as a whitelist.",
"id": 17550,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17543,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17542,
"name": "_blacklist",
"nodeType": "VariableDeclaration",
"scope": 17550,
"src": "839:15:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 17541,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "839:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "838:17:48"
},
"payable": false,
"returnParameters": {
"id": 17544,
"nodeType": "ParameterList",
"parameters": [],
"src": "863:0:48"
},
"scope": 17591,
"src": "827:75:48",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 17563,
"nodeType": "Block",
"src": "972:36:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 17561,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 17557,
"name": "list",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17540,
"src": "982:4:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 17559,
"indexExpression": {
"argumentTypes": null,
"id": 17558,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17552,
"src": "987:6:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "982:12:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 17560,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "997:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "982:19:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 17562,
"nodeType": "ExpressionStatement",
"src": "982:19:48"
}
]
},
"documentation": null,
"id": 17564,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 17555,
"modifierName": {
"argumentTypes": null,
"id": 17554,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19880,
"src": "962:9:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "962:9:48"
}
],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17553,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17552,
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 17564,
"src": "939:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17551,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "939:7:48",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},