UNPKG

@daostack/access_control

Version:

Capability-based access control for Ethereum smart contracts.

551 lines 14.3 kB
{ "contractName": "ERC1480Storage", "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": true, "inputs": [ { "name": "", "type": "bytes32" }, { "name": "", "type": "address" } ], "name": "keys", "outputs": [ { "name": "exists", "type": "bool" }, { "name": "assignable", "type": "bool" }, { "name": "start", "type": "uint256" }, { "name": "expiration", "type": "uint256" }, { "name": "uses", "type": "uint256" } ], "payable": false, "stateMutability": "view", "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 \"./ERC1480.sol\";\n\n\n/// @title ERC1480Storage - Access Control, RECOMMENDED data structure\ncontract ERC1480Storage is ERC1480 {\n mapping(bytes32 => mapping(address => Key)) public keys;\n}\n", "sourcePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480Storage.sol", "ast": { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480Storage.sol", "exportedSymbols": { "ERC1480Storage": [ 138 ] }, "id": 139, "nodeType": "SourceUnit", "nodes": [ { "id": 128, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:2" }, { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480.sol", "file": "./ERC1480.sol", "id": 129, "nodeType": "ImportDirective", "scope": 139, "sourceUnit": 49, "src": "26:23:2", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 130, "name": "ERC1480", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 48, "src": "150:7:2", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC1480_$48", "typeString": "contract ERC1480" } }, "id": 131, "nodeType": "InheritanceSpecifier", "src": "150:7:2" } ], "contractDependencies": [ 48, 126, 1353 ], "contractKind": "contract", "documentation": "@title ERC1480Storage - Access Control, RECOMMENDED data structure", "fullyImplemented": false, "id": 138, "linearizedBaseContracts": [ 138, 48, 126, 1353 ], "name": "ERC1480Storage", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 137, "name": "keys", "nodeType": "VariableDeclaration", "scope": 138, "src": "164:55:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_struct$_Key_$18_storage_$_$", "typeString": "mapping(bytes32 => mapping(address => struct ERC1480.Key))" }, "typeName": { "id": 136, "keyType": { "id": 132, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "172:7:2", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "164:43:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_struct$_Key_$18_storage_$_$", "typeString": "mapping(bytes32 => mapping(address => struct ERC1480.Key))" }, "valueType": { "id": 135, "keyType": { "id": 133, "name": "address", "nodeType": "ElementaryTypeName", "src": "191:7:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "183:23:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Key_$18_storage_$", "typeString": "mapping(address => struct ERC1480.Key)" }, "valueType": { "contractScope": null, "id": 134, "name": "Key", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 18, "src": "202:3:2", "typeDescriptions": { "typeIdentifier": "t_struct$_Key_$18_storage_ptr", "typeString": "struct ERC1480.Key" } } } }, "value": null, "visibility": "public" } ], "scope": 139, "src": "123:99:2" } ], "src": "0:223:2" }, "legacyAST": { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480Storage.sol", "exportedSymbols": { "ERC1480Storage": [ 138 ] }, "id": 139, "nodeType": "SourceUnit", "nodes": [ { "id": 128, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:2" }, { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/ERC1480.sol", "file": "./ERC1480.sol", "id": 129, "nodeType": "ImportDirective", "scope": 139, "sourceUnit": 49, "src": "26:23:2", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 130, "name": "ERC1480", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 48, "src": "150:7:2", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC1480_$48", "typeString": "contract ERC1480" } }, "id": 131, "nodeType": "InheritanceSpecifier", "src": "150:7:2" } ], "contractDependencies": [ 48, 126, 1353 ], "contractKind": "contract", "documentation": "@title ERC1480Storage - Access Control, RECOMMENDED data structure", "fullyImplemented": false, "id": 138, "linearizedBaseContracts": [ 138, 48, 126, 1353 ], "name": "ERC1480Storage", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 137, "name": "keys", "nodeType": "VariableDeclaration", "scope": 138, "src": "164:55:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_struct$_Key_$18_storage_$_$", "typeString": "mapping(bytes32 => mapping(address => struct ERC1480.Key))" }, "typeName": { "id": 136, "keyType": { "id": 132, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "172:7:2", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "164:43:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_struct$_Key_$18_storage_$_$", "typeString": "mapping(bytes32 => mapping(address => struct ERC1480.Key))" }, "valueType": { "id": 135, "keyType": { "id": 133, "name": "address", "nodeType": "ElementaryTypeName", "src": "191:7:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "183:23:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Key_$18_storage_$", "typeString": "mapping(address => struct ERC1480.Key)" }, "valueType": { "contractScope": null, "id": 134, "name": "Key", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 18, "src": "202:3:2", "typeDescriptions": { "typeIdentifier": "t_struct$_Key_$18_storage_ptr", "typeString": "struct ERC1480.Key" } } } }, "value": null, "visibility": "public" } ], "scope": 139, "src": "123:99:2" } ], "src": "0:223:2" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-10-30T22:33:40.607Z" }