secretstore-contracts
Version:
Secret Store permissioning and service contracts collection and toolkit.
1,165 lines • 46.2 kB
JSON
{
"contractName": "PermissioningStatic",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "user",
"type": "address"
},
{
"name": "document",
"type": "bytes32"
}
],
"name": "checkPermissions",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x60806040527f45ce99addb0f8385bd24f30da619ddcc0cadadab73e2a4ffb7801083086b3fc260005560018054600160a060020a0319908116733144de21da6de18061f818836fa3db8f3d6b69891790915560028054909116736c4b8b199a41b721e0a95df9860cf0a18732e76d17905534801561007c57600080fd5b506101148061008c6000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b36a9a7c81146043575b600080fd5b348015604e57600080fd5b50607173ffffffffffffffffffffffffffffffffffffffff600435166024356085565b604080519115158252519081900360200190f35b600080548214801560d3575060015473ffffffffffffffffffffffffffffffffffffffff8481169116148060d3575060025473ffffffffffffffffffffffffffffffffffffffff8481169116145b1560de5750600160e2565b5060005b929150505600a165627a7a72305820d91f612b8355375ae76c739d0c3668f9f01113c02de6aac5ac5145822ed72a4d0029",
"deployedBytecode": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b36a9a7c81146043575b600080fd5b348015604e57600080fd5b50607173ffffffffffffffffffffffffffffffffffffffff600435166024356085565b604080519115158252519081900360200190f35b600080548214801560d3575060015473ffffffffffffffffffffffffffffffffffffffff8481169116148060d3575060025473ffffffffffffffffffffffffffffffffffffffff8481169116145b1560de5750600160e2565b5060005b929150505600a165627a7a72305820d91f612b8355375ae76c739d0c3668f9f01113c02de6aac5ac5145822ed72a4d0029",
"sourceMap": "277:564:11:-;;;365:66;341:90;;;437:58;;-1:-1:-1;;;;;;437:58:11;;;453:42;437:58;;;;501:56;;;;;;515:42;501:56;;;277:564;5:2:-1;;;;30:1;27;20:12;5:2;277:564:11;;;;;;;",
"deployedSourceMap": "277:564:11:-;;;;;;;;;;;;;;;;;;;;;;;625:214;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;625:214:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;704:4;736:13;;724:25;;:59;;;;-1:-1:-1;762:5:11;;;754:13;;;762:5;;754:13;;:28;;-1:-1:-1;779:3:11;;;771:11;;;779:3;;771:11;754:28;720:89;;;-1:-1:-1;805:4:11;798:11;;720:89;-1:-1:-1;826:5:11;625:214;;;;;:::o",
"source": "pragma solidity ^0.4.21;\n\nimport \"../interfaces/ISecretStorePermissioning.sol\";\n\n\n// Needed if you want burned-in values that cannot be changed afterwards\n// and have a closed set of users/doc keys. Feel free to replace or add new fields.\n// Note: this is not really life-like\ncontract PermissioningStatic is ISecretStorePermissioning {\n bytes32 documentKeyId = 0x45ce99addb0f8385bd24f30da619ddcc0cadadab73e2a4ffb7801083086b3fc2;\n address alice = 0x3144de21dA6De18061f818836Fa3db8F3D6b6989;\n address bob = 0x6C4B8B199A41B721e0a95dF9860CF0A18732e76D;\n\n /// Both Alice and Bob can access the specified document\n function checkPermissions(address user, bytes32 document) public view returns (bool) {\n if (document == documentKeyId && (user == alice || user == bob) )\n return true;\n return false; \n }\n}",
"sourcePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningStatic.sol",
"ast": {
"absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningStatic.sol",
"exportedSymbols": {
"PermissioningStatic": [
2297
]
},
"id": 2298,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2257,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "0:24:11"
},
{
"absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol",
"file": "../interfaces/ISecretStorePermissioning.sol",
"id": 2258,
"nodeType": "ImportDirective",
"scope": 2298,
"sourceUnit": 725,
"src": "26:53:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 2259,
"name": "ISecretStorePermissioning",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 724,
"src": "309:25:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISecretStorePermissioning_$724",
"typeString": "contract ISecretStorePermissioning"
}
},
"id": 2260,
"nodeType": "InheritanceSpecifier",
"src": "309:25:11"
}
],
"contractDependencies": [
724
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 2297,
"linearizedBaseContracts": [
2297,
724
],
"name": "PermissioningStatic",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 2263,
"name": "documentKeyId",
"nodeType": "VariableDeclaration",
"scope": 2297,
"src": "341:90:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2261,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "341:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307834356365393961646462306638333835626432346633306461363139646463633063616461646162373365326134666662373830313038333038366233666332",
"id": 2262,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "365:66:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_31574617701921334208853801044560300933033761682839795696453088735805647306690_by_1",
"typeString": "int_const 3157...(69 digits omitted)...6690"
},
"value": "0x45ce99addb0f8385bd24f30da619ddcc0cadadab73e2a4ffb7801083086b3fc2"
},
"visibility": "internal"
},
{
"constant": false,
"id": 2266,
"name": "alice",
"nodeType": "VariableDeclaration",
"scope": 2297,
"src": "437:58:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2264,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "437:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307833313434646532316441364465313830363166383138383336466133646238463344366236393839",
"id": 2265,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "453:42:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0x3144de21dA6De18061f818836Fa3db8F3D6b6989"
},
"visibility": "internal"
},
{
"constant": false,
"id": 2269,
"name": "bob",
"nodeType": "VariableDeclaration",
"scope": 2297,
"src": "501:56:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2267,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "501:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307836433442384231393941343142373231653061393564463938363043463041313837333265373644",
"id": 2268,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "515:42:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0x6C4B8B199A41B721e0a95dF9860CF0A18732e76D"
},
"visibility": "internal"
},
{
"body": {
"id": 2295,
"nodeType": "Block",
"src": "710:129:11",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"id": 2280,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2278,
"name": "document",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "724:8:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2279,
"name": "documentKeyId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2263,
"src": "736:13:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "724:25:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2287,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2281,
"name": "user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2271,
"src": "754:4:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2282,
"name": "alice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2266,
"src": "762:5:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "754:13:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2284,
"name": "user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2271,
"src": "771:4:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2285,
"name": "bob",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2269,
"src": "779:3:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "771:11:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "754:28:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 2288,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "753:30:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "724:59:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2292,
"nodeType": "IfStatement",
"src": "720:89:11",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2290,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "805:4:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2277,
"id": 2291,
"nodeType": "Return",
"src": "798:11:11"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2293,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "826:5:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2277,
"id": 2294,
"nodeType": "Return",
"src": "819:12:11"
}
]
},
"documentation": "Both Alice and Bob can access the specified document",
"id": 2296,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "checkPermissions",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2274,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2271,
"name": "user",
"nodeType": "VariableDeclaration",
"scope": 2296,
"src": "651:12:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2270,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "651:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2273,
"name": "document",
"nodeType": "VariableDeclaration",
"scope": 2296,
"src": "665:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2272,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "665:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "650:32:11"
},
"payable": false,
"returnParameters": {
"id": 2277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2276,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2296,
"src": "704:4:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2275,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "704:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "703:6:11"
},
"scope": 2297,
"src": "625:214:11",
"stateMutability": "view",
"superFunction": 723,
"visibility": "public"
}
],
"scope": 2298,
"src": "277:564:11"
}
],
"src": "0:841:11"
},
"legacyAST": {
"absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningStatic.sol",
"exportedSymbols": {
"PermissioningStatic": [
2297
]
},
"id": 2298,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2257,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "0:24:11"
},
{
"absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol",
"file": "../interfaces/ISecretStorePermissioning.sol",
"id": 2258,
"nodeType": "ImportDirective",
"scope": 2298,
"sourceUnit": 725,
"src": "26:53:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 2259,
"name": "ISecretStorePermissioning",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 724,
"src": "309:25:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISecretStorePermissioning_$724",
"typeString": "contract ISecretStorePermissioning"
}
},
"id": 2260,
"nodeType": "InheritanceSpecifier",
"src": "309:25:11"
}
],
"contractDependencies": [
724
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 2297,
"linearizedBaseContracts": [
2297,
724
],
"name": "PermissioningStatic",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 2263,
"name": "documentKeyId",
"nodeType": "VariableDeclaration",
"scope": 2297,
"src": "341:90:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2261,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "341:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307834356365393961646462306638333835626432346633306461363139646463633063616461646162373365326134666662373830313038333038366233666332",
"id": 2262,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "365:66:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_31574617701921334208853801044560300933033761682839795696453088735805647306690_by_1",
"typeString": "int_const 3157...(69 digits omitted)...6690"
},
"value": "0x45ce99addb0f8385bd24f30da619ddcc0cadadab73e2a4ffb7801083086b3fc2"
},
"visibility": "internal"
},
{
"constant": false,
"id": 2266,
"name": "alice",
"nodeType": "VariableDeclaration",
"scope": 2297,
"src": "437:58:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2264,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "437:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307833313434646532316441364465313830363166383138383336466133646238463344366236393839",
"id": 2265,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "453:42:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0x3144de21dA6De18061f818836Fa3db8F3D6b6989"
},
"visibility": "internal"
},
{
"constant": false,
"id": 2269,
"name": "bob",
"nodeType": "VariableDeclaration",
"scope": 2297,
"src": "501:56:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2267,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "501:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"hexValue": "307836433442384231393941343142373231653061393564463938363043463041313837333265373644",
"id": 2268,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "515:42:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0x6C4B8B199A41B721e0a95dF9860CF0A18732e76D"
},
"visibility": "internal"
},
{
"body": {
"id": 2295,
"nodeType": "Block",
"src": "710:129:11",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"id": 2280,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2278,
"name": "document",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2273,
"src": "724:8:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2279,
"name": "documentKeyId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2263,
"src": "736:13:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "724:25:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2287,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2281,
"name": "user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2271,
"src": "754:4:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2282,
"name": "alice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2266,
"src": "762:5:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "754:13:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2284,
"name": "user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2271,
"src": "771:4:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2285,
"name": "bob",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2269,
"src": "779:3:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "771:11:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "754:28:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 2288,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "753:30:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "724:59:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2292,
"nodeType": "IfStatement",
"src": "720:89:11",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2290,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "805:4:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2277,
"id": 2291,
"nodeType": "Return",
"src": "798:11:11"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2293,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "826:5:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2277,
"id": 2294,
"nodeType": "Return",
"src": "819:12:11"
}
]
},
"documentation": "Both Alice and Bob can access the specified document",
"id": 2296,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "checkPermissions",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2274,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2271,
"name": "user",
"nodeType": "VariableDeclaration",
"scope": 2296,
"src": "651:12:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2270,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "651:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2273,
"name": "document",
"nodeType": "VariableDeclaration",
"scope": 2296,
"src": "665:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2272,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "665:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "650:32:11"
},
"payable": false,
"returnParameters": {
"id": 2277,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2276,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2296,
"src": "704:4:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2275,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "704:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "703:6:11"
},
"scope": 2297,
"src": "625:214:11",
"stateMutability": "view",
"superFunction": 723,
"visibility": "public"
}
],
"scope": 2298,
"src": "277:564:11"
}
],
"src": "0:841:11"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2019-01-21T13:35:51.069Z"
}