UNPKG

@daostack/access_control

Version:

Capability-based access control for Ethereum smart contracts.

1,418 lines 46.9 kB
{ "contractName": "ERC1480", "abi": [ { "constant": true, "inputs": [ { "name": "_interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_id", "type": "bytes32" }, { "name": "_to", "type": "address" } ], "name": "assignFullKey", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_id", "type": "bytes32" } ], "name": "revokeKey", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_id", "type": "bytes32" }, { "name": "_owner", "type": "address" } ], "name": "unlockable", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_id", "type": "bytes32" }, { "name": "_owner", "type": "address" } ], "name": "getKey", "outputs": [ { "name": "", "type": "bool" }, { "name": "", "type": "bool" }, { "name": "", "type": "uint256" }, { "name": "", "type": "uint256" }, { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_id", "type": "bytes32" }, { "name": "_to", "type": "address" }, { "name": "_assignable", "type": "bool" }, { "name": "_start", "type": "uint256" }, { "name": "_expiration", "type": "uint256" }, { "name": "_uses", "type": "uint256" } ], "name": "assignKey", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "_id", "type": "bytes32" }, { "indexed": true, "name": "_from", "type": "address" }, { "indexed": true, "name": "_to", "type": "address" }, { "indexed": false, "name": "_assignable", "type": "bool" }, { "indexed": false, "name": "_start", "type": "uint256" }, { "indexed": false, "name": "_expiration", "type": "uint256" }, { "indexed": false, "name": "_uses", "type": "uint256" } ], "name": "AssignKey", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "_id", "type": "bytes32" }, { "indexed": true, "name": "_owner", "type": "address" } ], "name": "RevokeKey", "type": "event" } ], "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.4.24;\n\nimport \"openzeppelin-solidity/contracts/introspection/ERC165.sol\";\nimport \"./ERC1480Interface.sol\";\n\n\n/// @title ERC1480 - Access Control Interface\n/// @dev contract for access control mechanism\ncontract ERC1480 is ERC165, ERC1480Interface {\n struct Key {\n bool exists;\n bool assignable;\n uint start;\n uint expiration;\n uint uses;\n }\n\n /// @dev Grant capabilities to account (overwrites existing key)\n /// @param _id lock id\n /// @param _to recipient\n /// @param _assignable can the recipient further assignKey his capabilities to other accounts?\n /// @param _start the key's start time (block timestamp)\n /// @param _expiration the key's expiration time (block timestamp)\n /// @param _uses number of times this key can be used (in `unlock(..)`)\n function grantKey(\n bytes32 _id, \n address _to, \n bool _assignable, \n uint _start, \n uint _expiration, \n uint _uses\n ) internal;\n\n /// @dev Grant full capabilities to account (assignable, no start time, no expiration, infinite uses)\n /// @param _id lock id\n /// @param _to recipient\n function grantFullKey(bytes32 _id, address _to) internal;\n\n /// @dev unlock a lock if sender has a valid key.\n /// @param _id lock id\n function unlock(bytes32 _id) internal returns (bool);\n}\n", "sourcePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480.sol", "ast": { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480.sol", "exportedSymbols": { "ERC1480": [ 48 ] }, "id": 49, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "absolutePath": "openzeppelin-solidity/contracts/introspection/ERC165.sol", "file": "openzeppelin-solidity/contracts/introspection/ERC165.sol", "id": 2, "nodeType": "ImportDirective", "scope": 49, "sourceUnit": 1354, "src": "26:66:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480Interface.sol", "file": "./ERC1480Interface.sol", "id": 3, "nodeType": "ImportDirective", "scope": 49, "sourceUnit": 127, "src": "93:32:0", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 4, "name": "ERC165", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1353, "src": "241:6:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC165_$1353", "typeString": "contract ERC165" } }, "id": 5, "nodeType": "InheritanceSpecifier", "src": "241:6:0" }, { "arguments": null, "baseName": { "contractScope": null, "id": 6, "name": "ERC1480Interface", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 126, "src": "249:16:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC1480Interface_$126", "typeString": "contract ERC1480Interface" } }, "id": 7, "nodeType": "InheritanceSpecifier", "src": "249:16:0" } ], "contractDependencies": [ 126, 1353 ], "contractKind": "contract", "documentation": "@title ERC1480 - Access Control Interface\n @dev contract for access control mechanism", "fullyImplemented": false, "id": 48, "linearizedBaseContracts": [ 48, 126, 1353 ], "name": "ERC1480", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "ERC1480.Key", "id": 18, "members": [ { "constant": false, "id": 9, "name": "exists", "nodeType": "VariableDeclaration", "scope": 18, "src": "293:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8, "name": "bool", "nodeType": "ElementaryTypeName", "src": "293:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11, "name": "assignable", "nodeType": "VariableDeclaration", "scope": 18, "src": "314:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 10, "name": "bool", "nodeType": "ElementaryTypeName", "src": "314:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 13, "name": "start", "nodeType": "VariableDeclaration", "scope": 18, "src": "339:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 12, "name": "uint", "nodeType": "ElementaryTypeName", "src": "339:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 15, "name": "expiration", "nodeType": "VariableDeclaration", "scope": 18, "src": "359:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14, "name": "uint", "nodeType": "ElementaryTypeName", "src": "359:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 17, "name": "uses", "nodeType": "VariableDeclaration", "scope": 18, "src": "384:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 16, "name": "uint", "nodeType": "ElementaryTypeName", "src": "384:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "name": "Key", "nodeType": "StructDefinition", "scope": 48, "src": "272:128:0", "visibility": "public" }, { "body": null, "documentation": "@dev Grant capabilities to account (overwrites existing key)\n @param _id lock id\n @param _to recipient\n @param _assignable can the recipient further assignKey his capabilities to other accounts?\n @param _start the key's start time (block timestamp)\n @param _expiration the key's expiration time (block timestamp)\n @param _uses number of times this key can be used (in `unlock(..)`)", "id": 33, "implemented": false, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "grantKey", "nodeType": "FunctionDefinition", "parameters": { "id": 31, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 20, "name": "_id", "nodeType": "VariableDeclaration", "scope": 33, "src": "865:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 19, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "865:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 22, "name": "_to", "nodeType": "VariableDeclaration", "scope": 33, "src": "887:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 21, "name": "address", "nodeType": "ElementaryTypeName", "src": "887:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 24, "name": "_assignable", "nodeType": "VariableDeclaration", "scope": 33, "src": "909:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 23, "name": "bool", "nodeType": "ElementaryTypeName", "src": "909:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 26, "name": "_start", "nodeType": "VariableDeclaration", "scope": 33, "src": "936:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25, "name": "uint", "nodeType": "ElementaryTypeName", "src": "936:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 28, "name": "_expiration", "nodeType": "VariableDeclaration", "scope": 33, "src": "958:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 27, "name": "uint", "nodeType": "ElementaryTypeName", "src": "958:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 30, "name": "_uses", "nodeType": "VariableDeclaration", "scope": 33, "src": "985:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 29, "name": "uint", "nodeType": "ElementaryTypeName", "src": "985:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "855:150:0" }, "payable": false, "returnParameters": { "id": 32, "nodeType": "ParameterList", "parameters": [], "src": "1014:0:0" }, "scope": 48, "src": "838:177:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": "@dev Grant full capabilities to account (assignable, no start time, no expiration, infinite uses)\n @param _id lock id\n @param _to recipient", "id": 40, "implemented": false, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "grantFullKey", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 35, "name": "_id", "nodeType": "VariableDeclaration", "scope": 40, "src": "1205:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 34, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1205:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 37, "name": "_to", "nodeType": "VariableDeclaration", "scope": 40, "src": "1218:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1218:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1204:26:0" }, "payable": false, "returnParameters": { "id": 39, "nodeType": "ParameterList", "parameters": [], "src": "1239:0:0" }, "scope": 48, "src": "1183:57:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": "@dev unlock a lock if sender has a valid key.\n @param _id lock id", "id": 47, "implemented": false, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "unlock", "nodeType": "FunctionDefinition", "parameters": { "id": 43, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 42, "name": "_id", "nodeType": "VariableDeclaration", "scope": 47, "src": "1343:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 41, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1343:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "1342:13:0" }, "payable": false, "returnParameters": { "id": 46, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45, "name": "", "nodeType": "VariableDeclaration", "scope": 47, "src": "1374:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 44, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1374:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1373:6:0" }, "scope": 48, "src": "1327:53:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 49, "src": "221:1161:0" } ], "src": "0:1383:0" }, "legacyAST": { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480.sol", "exportedSymbols": { "ERC1480": [ 48 ] }, "id": 49, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "absolutePath": "openzeppelin-solidity/contracts/introspection/ERC165.sol", "file": "openzeppelin-solidity/contracts/introspection/ERC165.sol", "id": 2, "nodeType": "ImportDirective", "scope": 49, "sourceUnit": 1354, "src": "26:66:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480Interface.sol", "file": "./ERC1480Interface.sol", "id": 3, "nodeType": "ImportDirective", "scope": 49, "sourceUnit": 127, "src": "93:32:0", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 4, "name": "ERC165", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1353, "src": "241:6:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC165_$1353", "typeString": "contract ERC165" } }, "id": 5, "nodeType": "InheritanceSpecifier", "src": "241:6:0" }, { "arguments": null, "baseName": { "contractScope": null, "id": 6, "name": "ERC1480Interface", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 126, "src": "249:16:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC1480Interface_$126", "typeString": "contract ERC1480Interface" } }, "id": 7, "nodeType": "InheritanceSpecifier", "src": "249:16:0" } ], "contractDependencies": [ 126, 1353 ], "contractKind": "contract", "documentation": "@title ERC1480 - Access Control Interface\n @dev contract for access control mechanism", "fullyImplemented": false, "id": 48, "linearizedBaseContracts": [ 48, 126, 1353 ], "name": "ERC1480", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "ERC1480.Key", "id": 18, "members": [ { "constant": false, "id": 9, "name": "exists", "nodeType": "VariableDeclaration", "scope": 18, "src": "293:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8, "name": "bool", "nodeType": "ElementaryTypeName", "src": "293:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11, "name": "assignable", "nodeType": "VariableDeclaration", "scope": 18, "src": "314:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 10, "name": "bool", "nodeType": "ElementaryTypeName", "src": "314:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 13, "name": "start", "nodeType": "VariableDeclaration", "scope": 18, "src": "339:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 12, "name": "uint", "nodeType": "ElementaryTypeName", "src": "339:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 15, "name": "expiration", "nodeType": "VariableDeclaration", "scope": 18, "src": "359:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14, "name": "uint", "nodeType": "ElementaryTypeName", "src": "359:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 17, "name": "uses", "nodeType": "VariableDeclaration", "scope": 18, "src": "384:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 16, "name": "uint", "nodeType": "ElementaryTypeName", "src": "384:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "name": "Key", "nodeType": "StructDefinition", "scope": 48, "src": "272:128:0", "visibility": "public" }, { "body": null, "documentation": "@dev Grant capabilities to account (overwrites existing key)\n @param _id lock id\n @param _to recipient\n @param _assignable can the recipient further assignKey his capabilities to other accounts?\n @param _start the key's start time (block timestamp)\n @param _expiration the key's expiration time (block timestamp)\n @param _uses number of times this key can be used (in `unlock(..)`)", "id": 33, "implemented": false, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "grantKey", "nodeType": "FunctionDefinition", "parameters": { "id": 31, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 20, "name": "_id", "nodeType": "VariableDeclaration", "scope": 33, "src": "865:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 19, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "865:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 22, "name": "_to", "nodeType": "VariableDeclaration", "scope": 33, "src": "887:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 21, "name": "address", "nodeType": "ElementaryTypeName", "src": "887:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 24, "name": "_assignable", "nodeType": "VariableDeclaration", "scope": 33, "src": "909:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 23, "name": "bool", "nodeType": "ElementaryTypeName", "src": "909:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 26, "name": "_start", "nodeType": "VariableDeclaration", "scope": 33, "src": "936:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25, "name": "uint", "nodeType": "ElementaryTypeName", "src": "936:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 28, "name": "_expiration", "nodeType": "VariableDeclaration", "scope": 33, "src": "958:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 27, "name": "uint", "nodeType": "ElementaryTypeName", "src": "958:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 30, "name": "_uses", "nodeType": "VariableDeclaration", "scope": 33, "src": "985:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 29, "name": "uint", "nodeType": "ElementaryTypeName", "src": "985:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "855:150:0" }, "payable": false, "returnParameters": { "id": 32, "nodeType": "ParameterList", "parameters": [], "src": "1014:0:0" }, "scope": 48, "src": "838:177:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": "@dev Grant full capabilities to account (assignable, no start time, no expiration, infinite uses)\n @param _id lock id\n @param _to recipient", "id": 40, "implemented": false, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "grantFullKey", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 35, "name": "_id", "nodeType": "VariableDeclaration", "scope": 40, "src": "1205:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 34, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1205:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 37, "name": "_to", "nodeType": "VariableDeclaration", "scope": 40, "src": "1218:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1218:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1204:26:0" }, "payable": false, "returnParameters": { "id": 39, "nodeType": "ParameterList", "parameters": [], "src": "1239:0:0" }, "scope": 48, "src": "1183:57:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": "@dev unlock a lock if sender has a valid key.\n @param _id lock id", "id": 47, "implemented": false, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "unlock", "nodeType": "FunctionDefinition", "parameters": { "id": 43, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 42, "name": "_id", "nodeType": "VariableDeclaration", "scope": 47, "src": "1343:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 41, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1343:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "1342:13:0" }, "payable": false, "returnParameters": { "id": 46, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45, "name": "", "nodeType": "VariableDeclaration", "scope": 47, "src": "1374:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 44, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1374:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1373:6:0" }, "scope": 48, "src": "1327:53:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 49, "src": "221:1161:0" } ], "src": "0:1383:0" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-10-30T22:33:40.606Z" }