UNPKG

@daostack/access_control

Version:

Capability-based access control for Ethereum smart contracts.

804 lines 29 kB
{ "contractName": "Dummy", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "name": "_arg0", "type": "uint256" }, { "indexed": false, "name": "_arg1", "type": "uint256" } ], "name": "Funced", "type": "event" }, { "constant": false, "inputs": [ { "name": "_arg0", "type": "uint256" }, { "name": "_arg1", "type": "uint256" } ], "name": "func", "outputs": [ { "name": "", "type": "uint256" }, { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060ea8061001f6000396000f300608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632e72abbb81146043575b600080fd5b348015604e57600080fd5b50605b6004356024356074565b6040805192835260208301919091528051918290030190f35b6000807fcf7cc95d0a9b096ece7bffe5a32c2687181ca415eeac05d6e97a1f57cc3e7a2a8484604051808381526020018281526020019250505060405180910390a15091929091505600a165627a7a723058206f5492aad4421deb3d1f9ddce1bb572262c640e75fe4c4f3f2e3e0d75ffb5faa0029", "deployedBytecode": "0x608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632e72abbb81146043575b600080fd5b348015604e57600080fd5b50605b6004356024356074565b6040805192835260208301919091528051918290030190f35b6000807fcf7cc95d0a9b096ece7bffe5a32c2687181ca415eeac05d6e97a1f57cc3e7a2a8484604051808381526020018281526020019250505060405180910390a15091929091505600a165627a7a723058206f5492aad4421deb3d1f9ddce1bb572262c640e75fe4c4f3f2e3e0d75ffb5faa0029", "sourceMap": "80:204:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;80:204:7;;;;;;;", "deployedSourceMap": "80:204:7:-;;;;;;;;;;;;;;;;;;;;;;;144:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;144:138:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;197:4;203;224:20;231:5;238;224:20;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;262:5:7;;269;;-1:-1:-1;144:138:7:o", "source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title A dummy contract used for testing.\n */\ncontract Dummy {\n event Funced(uint _arg0, uint _arg1);\n\n function func(uint _arg0, uint _arg1) public returns(uint, uint) {\n emit Funced(_arg0, _arg1);\n return (_arg0, _arg1);\n }\n}\n", "sourcePath": "/home/tsuberim/projects/daostack/access_control/contracts/test/Dummy.sol", "ast": { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/test/Dummy.sol", "exportedSymbols": { "Dummy": [ 1274 ] }, "id": 1275, "nodeType": "SourceUnit", "nodes": [ { "id": 1246, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:7" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title A dummy contract used for testing.", "fullyImplemented": true, "id": 1274, "linearizedBaseContracts": [ 1274 ], "name": "Dummy", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 1252, "name": "Funced", "nodeType": "EventDefinition", "parameters": { "id": 1251, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1248, "indexed": false, "name": "_arg0", "nodeType": "VariableDeclaration", "scope": 1252, "src": "114:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1247, "name": "uint", "nodeType": "ElementaryTypeName", "src": "114:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1250, "indexed": false, "name": "_arg1", "nodeType": "VariableDeclaration", "scope": 1252, "src": "126:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1249, "name": "uint", "nodeType": "ElementaryTypeName", "src": "126:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "113:24:7" }, "src": "101:37:7" }, { "body": { "id": 1272, "nodeType": "Block", "src": "209:73:7", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1264, "name": "_arg0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1254, "src": "231:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 1265, "name": "_arg1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1256, "src": "238:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1263, "name": "Funced", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1252, "src": "224:6:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (uint256,uint256)" } }, "id": 1266, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "224:20:7", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1267, "nodeType": "EmitStatement", "src": "219:25:7" }, { "expression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 1268, "name": "_arg0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1254, "src": "262:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 1269, "name": "_arg1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1256, "src": "269:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 1270, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "261:14:7", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "functionReturnParameters": 1262, "id": 1271, "nodeType": "Return", "src": "254:21:7" } ] }, "documentation": null, "id": 1273, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "func", "nodeType": "FunctionDefinition", "parameters": { "id": 1257, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1254, "name": "_arg0", "nodeType": "VariableDeclaration", "scope": 1273, "src": "158:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1253, "name": "uint", "nodeType": "ElementaryTypeName", "src": "158:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1256, "name": "_arg1", "nodeType": "VariableDeclaration", "scope": 1273, "src": "170:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1255, "name": "uint", "nodeType": "ElementaryTypeName", "src": "170:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "157:24:7" }, "payable": false, "returnParameters": { "id": 1262, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1259, "name": "", "nodeType": "VariableDeclaration", "scope": 1273, "src": "197:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1258, "name": "uint", "nodeType": "ElementaryTypeName", "src": "197:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1261, "name": "", "nodeType": "VariableDeclaration", "scope": 1273, "src": "203:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1260, "name": "uint", "nodeType": "ElementaryTypeName", "src": "203:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "196:12:7" }, "scope": 1274, "src": "144:138:7", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 1275, "src": "80:204:7" } ], "src": "0:285:7" }, "legacyAST": { "absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/test/Dummy.sol", "exportedSymbols": { "Dummy": [ 1274 ] }, "id": 1275, "nodeType": "SourceUnit", "nodes": [ { "id": 1246, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:7" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title A dummy contract used for testing.", "fullyImplemented": true, "id": 1274, "linearizedBaseContracts": [ 1274 ], "name": "Dummy", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 1252, "name": "Funced", "nodeType": "EventDefinition", "parameters": { "id": 1251, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1248, "indexed": false, "name": "_arg0", "nodeType": "VariableDeclaration", "scope": 1252, "src": "114:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1247, "name": "uint", "nodeType": "ElementaryTypeName", "src": "114:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1250, "indexed": false, "name": "_arg1", "nodeType": "VariableDeclaration", "scope": 1252, "src": "126:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1249, "name": "uint", "nodeType": "ElementaryTypeName", "src": "126:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "113:24:7" }, "src": "101:37:7" }, { "body": { "id": 1272, "nodeType": "Block", "src": "209:73:7", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1264, "name": "_arg0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1254, "src": "231:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 1265, "name": "_arg1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1256, "src": "238:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1263, "name": "Funced", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1252, "src": "224:6:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (uint256,uint256)" } }, "id": 1266, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "224:20:7", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1267, "nodeType": "EmitStatement", "src": "219:25:7" }, { "expression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 1268, "name": "_arg0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1254, "src": "262:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 1269, "name": "_arg1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1256, "src": "269:5:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 1270, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "261:14:7", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "functionReturnParameters": 1262, "id": 1271, "nodeType": "Return", "src": "254:21:7" } ] }, "documentation": null, "id": 1273, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "func", "nodeType": "FunctionDefinition", "parameters": { "id": 1257, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1254, "name": "_arg0", "nodeType": "VariableDeclaration", "scope": 1273, "src": "158:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1253, "name": "uint", "nodeType": "ElementaryTypeName", "src": "158:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1256, "name": "_arg1", "nodeType": "VariableDeclaration", "scope": 1273, "src": "170:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1255, "name": "uint", "nodeType": "ElementaryTypeName", "src": "170:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "157:24:7" }, "payable": false, "returnParameters": { "id": 1262, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1259, "name": "", "nodeType": "VariableDeclaration", "scope": 1273, "src": "197:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1258, "name": "uint", "nodeType": "ElementaryTypeName", "src": "197:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1261, "name": "", "nodeType": "VariableDeclaration", "scope": 1273, "src": "203:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1260, "name": "uint", "nodeType": "ElementaryTypeName", "src": "203:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "196:12:7" }, "scope": 1274, "src": "144:138:7", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 1275, "src": "80:204:7" } ], "src": "0:285:7" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-10-30T22:33:40.615Z" }