UNPKG

secretstore-contracts

Version:

Secret Store permissioning and service contracts collection and toolkit.

1,242 lines 52.8 kB
{ "contractName": "PermissioningNoDoc", "abi": [ { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "addresses", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "_addresses", "type": "address[]" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [ { "name": "user", "type": "address" }, { "name": "document", "type": "bytes32" } ], "name": "checkPermissions", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060405161028c38038061028c83398101604052805101805161003a906000906020840190610041565b50506100cd565b828054828255906000526020600020908101928215610096579160200282015b828111156100965782518254600160a060020a031916600160a060020a03909116178255602090920191600190910190610061565b506100a29291506100a6565b5090565b6100ca91905b808211156100a2578054600160a060020a03191681556001016100ac565b90565b6101b0806100dc6000396000f30060806040526004361061004b5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b36a9a7c8114610050578063edf26d9b14610095575b600080fd5b34801561005c57600080fd5b5061008173ffffffffffffffffffffffffffffffffffffffff600435166024356100d6565b604080519115158252519081900360200190f35b3480156100a157600080fd5b506100ad60043561014f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6000805b600054811015610143578373ffffffffffffffffffffffffffffffffffffffff1660008281548110151561010a57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561013b5760019150610148565b6001016100da565b600091505b5092915050565b600080548290811061015d57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050815600a165627a7a72305820cfd8bcd2e689475086b8a93b03e4103018198982b0a39d0126c1e5ae2354606f0029", "deployedBytecode": "0x60806040526004361061004b5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b36a9a7c8114610050578063edf26d9b14610095575b600080fd5b34801561005c57600080fd5b5061008173ffffffffffffffffffffffffffffffffffffffff600435166024356100d6565b604080519115158252519081900360200190f35b3480156100a157600080fd5b506100ad60043561014f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6000805b600054811015610143578373ffffffffffffffffffffffffffffffffffffffff1660008281548110151561010a57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561013b5760019150610148565b6001016100da565b600091505b5092915050565b600080548290811061015d57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050815600a165627a7a72305820cfd8bcd2e689475086b8a93b03e4103018198982b0a39d0126c1e5ae2354606f0029", "sourceMap": "306:459:10:-;;;402:87;8:9:-1;5:2;;;30:1;27;20:12;5:2;402:87:10;;;;;;;;;;;;;;;;;460:22;;;;:9;;:22;;;;;:::i;:::-;;402:87;306:459;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;306:459:10;-1:-1:-1;;;;;306:459:10;;;;;;;;;;;-1:-1:-1;306:459:10;;;;;;;-1:-1:-1;306:459:10;;;-1:-1:-1;306:459:10;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;306:459:10;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "306:459:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;522:241;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;522:241:10;;;;;;;;;;;;;;;;;;;;;;;;;;;369:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;369:26:10;;;;;;;;;;;;;;;;;;;;;;;;522:241;601:4;;617:118;638:9;:16;634:20;;617:118;;;695:4;679:20;;:9;689:1;679:12;;;;;;;;;;;;;;;;;;;;;;:20;675:49;;;720:4;713:11;;;;675:49;656:3;;617:118;;;751:5;744:12;;522:241;;;;;;:::o;369:26::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;369:26:10;:::o", "source": "pragma solidity ^0.4.24;\n\nimport \"../interfaces/ISecretStorePermissioning.sol\";\n\n\n// Another fire-and-forget permissioning contract that gives\n// access to any address specified irrespective of the document key\n// Note: this was used in the original Private Transactions tutorial, but not really life-like\ncontract PermissioningNoDoc is ISecretStorePermissioning {\n address[] public addresses;\n\n constructor(address[] memory _addresses) public {\n addresses = _addresses;\n }\n\n // We only check users\n function checkPermissions(address user, bytes32 document) public view returns (bool) {\n for (uint i = 0; i < addresses.length; i++) {\n if (addresses[i] == user)\n return true;\n }\n return false;\n }\n}\n", "sourcePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningNoDoc.sol", "ast": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningNoDoc.sol", "exportedSymbols": { "PermissioningNoDoc": [ 2255 ] }, "id": 2256, "nodeType": "SourceUnit", "nodes": [ { "id": 2204, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:10" }, { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol", "file": "../interfaces/ISecretStorePermissioning.sol", "id": 2205, "nodeType": "ImportDirective", "scope": 2256, "sourceUnit": 725, "src": "26:53:10", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2206, "name": "ISecretStorePermissioning", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 724, "src": "337:25:10", "typeDescriptions": { "typeIdentifier": "t_contract$_ISecretStorePermissioning_$724", "typeString": "contract ISecretStorePermissioning" } }, "id": 2207, "nodeType": "InheritanceSpecifier", "src": "337:25:10" } ], "contractDependencies": [ 724 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2255, "linearizedBaseContracts": [ 2255, 724 ], "name": "PermissioningNoDoc", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2210, "name": "addresses", "nodeType": "VariableDeclaration", "scope": 2255, "src": "369:26:10", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2208, "name": "address", "nodeType": "ElementaryTypeName", "src": "369:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2209, "length": null, "nodeType": "ArrayTypeName", "src": "369:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "public" }, { "body": { "id": 2220, "nodeType": "Block", "src": "450:39:10", "statements": [ { "expression": { "argumentTypes": null, "id": 2218, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2216, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2210, "src": "460:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2217, "name": "_addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2213, "src": "472:10:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "src": "460:22:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2219, "nodeType": "ExpressionStatement", "src": "460:22:10" } ] }, "documentation": null, "id": 2221, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2214, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2213, "name": "_addresses", "nodeType": "VariableDeclaration", "scope": 2221, "src": "414:27:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2211, "name": "address", "nodeType": "ElementaryTypeName", "src": "414:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2212, "length": null, "nodeType": "ArrayTypeName", "src": "414:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "413:29:10" }, "payable": false, "returnParameters": { "id": 2215, "nodeType": "ParameterList", "parameters": [], "src": "450:0:10" }, "scope": 2255, "src": "402:87:10", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2253, "nodeType": "Block", "src": "607:156:10", "statements": [ { "body": { "id": 2249, "nodeType": "Block", "src": "661:74:10", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2245, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2241, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2210, "src": "679:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2243, "indexExpression": { "argumentTypes": null, "id": 2242, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2231, "src": "689:1:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "679:12:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2244, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2223, "src": "695:4:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "679:20:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2248, "nodeType": "IfStatement", "src": "675:49:10", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 2246, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "720:4:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 2229, "id": 2247, "nodeType": "Return", "src": "713:11:10" } } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2237, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2234, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2231, "src": "634:1:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2235, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2210, "src": "638:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2236, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "638:16:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "634:20:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 2250, "initializationExpression": { "assignments": [ 2231 ], "declarations": [ { "constant": false, "id": 2231, "name": "i", "nodeType": "VariableDeclaration", "scope": 2254, "src": "622:6:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2230, "name": "uint", "nodeType": "ElementaryTypeName", "src": "622:4:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2233, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 2232, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "631:1:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "622:10:10" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 2239, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "656:3:10", "subExpression": { "argumentTypes": null, "id": 2238, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2231, "src": "656:1:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2240, "nodeType": "ExpressionStatement", "src": "656:3:10" }, "nodeType": "ForStatement", "src": "617:118:10" }, { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 2251, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "751:5:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "functionReturnParameters": 2229, "id": 2252, "nodeType": "Return", "src": "744:12:10" } ] }, "documentation": null, "id": 2254, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "checkPermissions", "nodeType": "FunctionDefinition", "parameters": { "id": 2226, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2223, "name": "user", "nodeType": "VariableDeclaration", "scope": 2254, "src": "548:12:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2222, "name": "address", "nodeType": "ElementaryTypeName", "src": "548:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2225, "name": "document", "nodeType": "VariableDeclaration", "scope": 2254, "src": "562:16:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2224, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "562:7:10", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "547:32:10" }, "payable": false, "returnParameters": { "id": 2229, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2228, "name": "", "nodeType": "VariableDeclaration", "scope": 2254, "src": "601:4:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2227, "name": "bool", "nodeType": "ElementaryTypeName", "src": "601:4:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "600:6:10" }, "scope": 2255, "src": "522:241:10", "stateMutability": "view", "superFunction": 723, "visibility": "public" } ], "scope": 2256, "src": "306:459:10" } ], "src": "0:766:10" }, "legacyAST": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningNoDoc.sol", "exportedSymbols": { "PermissioningNoDoc": [ 2255 ] }, "id": 2256, "nodeType": "SourceUnit", "nodes": [ { "id": 2204, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:10" }, { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol", "file": "../interfaces/ISecretStorePermissioning.sol", "id": 2205, "nodeType": "ImportDirective", "scope": 2256, "sourceUnit": 725, "src": "26:53:10", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2206, "name": "ISecretStorePermissioning", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 724, "src": "337:25:10", "typeDescriptions": { "typeIdentifier": "t_contract$_ISecretStorePermissioning_$724", "typeString": "contract ISecretStorePermissioning" } }, "id": 2207, "nodeType": "InheritanceSpecifier", "src": "337:25:10" } ], "contractDependencies": [ 724 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2255, "linearizedBaseContracts": [ 2255, 724 ], "name": "PermissioningNoDoc", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2210, "name": "addresses", "nodeType": "VariableDeclaration", "scope": 2255, "src": "369:26:10", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2208, "name": "address", "nodeType": "ElementaryTypeName", "src": "369:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2209, "length": null, "nodeType": "ArrayTypeName", "src": "369:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "public" }, { "body": { "id": 2220, "nodeType": "Block", "src": "450:39:10", "statements": [ { "expression": { "argumentTypes": null, "id": 2218, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2216, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2210, "src": "460:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2217, "name": "_addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2213, "src": "472:10:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "src": "460:22:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2219, "nodeType": "ExpressionStatement", "src": "460:22:10" } ] }, "documentation": null, "id": 2221, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2214, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2213, "name": "_addresses", "nodeType": "VariableDeclaration", "scope": 2221, "src": "414:27:10", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 2211, "name": "address", "nodeType": "ElementaryTypeName", "src": "414:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2212, "length": null, "nodeType": "ArrayTypeName", "src": "414:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "413:29:10" }, "payable": false, "returnParameters": { "id": 2215, "nodeType": "ParameterList", "parameters": [], "src": "450:0:10" }, "scope": 2255, "src": "402:87:10", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2253, "nodeType": "Block", "src": "607:156:10", "statements": [ { "body": { "id": 2249, "nodeType": "Block", "src": "661:74:10", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2245, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2241, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2210, "src": "679:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2243, "indexExpression": { "argumentTypes": null, "id": 2242, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2231, "src": "689:1:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "679:12:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2244, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2223, "src": "695:4:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "679:20:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2248, "nodeType": "IfStatement", "src": "675:49:10", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 2246, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "720:4:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 2229, "id": 2247, "nodeType": "Return", "src": "713:11:10" } } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2237, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2234, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2231, "src": "634:1:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2235, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2210, "src": "638:9:10", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2236, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "638:16:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "634:20:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 2250, "initializationExpression": { "assignments": [ 2231 ], "declarations": [ { "constant": false, "id": 2231, "name": "i", "nodeType": "VariableDeclaration", "scope": 2254, "src": "622:6:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2230, "name": "uint", "nodeType": "ElementaryTypeName", "src": "622:4:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2233, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 2232, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "631:1:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "622:10:10" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 2239, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "656:3:10", "subExpression": { "argumentTypes": null, "id": 2238, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2231, "src": "656:1:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2240, "nodeType": "ExpressionStatement", "src": "656:3:10" }, "nodeType": "ForStatement", "src": "617:118:10" }, { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 2251, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "751:5:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "functionReturnParameters": 2229, "id": 2252, "nodeType": "Return", "src": "744:12:10" } ] }, "documentation": null, "id": 2254, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "checkPermissions", "nodeType": "FunctionDefinition", "parameters": { "id": 2226, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2223, "name": "user", "nodeType": "VariableDeclaration", "scope": 2254, "src": "548:12:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2222, "name": "address", "nodeType": "ElementaryTypeName", "src": "548:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "addres