UNPKG

@aragon/apps-payroll

Version:

_**Code in Github:**_ [aragon-apps/apps/payroll](https://github.com/aragon/aragon-apps/tree/master/future-apps/payroll)

884 lines 32.6 kB
{ "contractName": "Petrifiable", "abi": [ { "constant": true, "inputs": [], "name": "hasInitialized", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getInitializationBlock", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isPetrified", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5061017e806100206000396000f3006080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac0811461005b5780638b3dd74914610084578063de4796ed146100ab575b600080fd5b34801561006757600080fd5b506100706100c0565b604080519115158252519081900360200190f35b34801561009057600080fd5b506100996100e9565b60408051918252519081900360200190f35b3480156100b757600080fd5b50610070610119565b6000806100cb6100e9565b905080158015906100e35750806100e061014a565b10155b91505090565b60006101147febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e61014e565b905090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101446100e9565b14905090565b4390565b54905600a165627a7a7230582051784d708e1c6689ec919590dae8b6c44ade25abd6a291e32fea48260a5db10f0029", "deployedBytecode": "0x6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac0811461005b5780638b3dd74914610084578063de4796ed146100ab575b600080fd5b34801561006757600080fd5b506100706100c0565b604080519115158252519081900360200190f35b34801561009057600080fd5b506100996100e9565b60408051918252519081900360200190f35b3480156100b757600080fd5b50610070610119565b6000806100cb6100e9565b905080158015906100e35750806100e061014a565b10155b91505090565b60006101147febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e61014e565b905090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101446100e9565b14905090565b4390565b54905600a165627a7a7230582051784d708e1c6689ec919590dae8b6c44ade25abd6a291e32fea48260a5db10f0029", "sourceMap": "102:574:34:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;102:574:34;;;;;;;", "deployedSourceMap": "102:574:34:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1128:208:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1128:208:32;;;;;;;;;;;;;;;;;;;;;;881:137;;8:9:-1;5:2;;;30:1;27;20:12;5:2;881:137:32;;;;;;;;;;;;;;;;;;;;287:117:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;287:117:34;;;;1128:208:32;1175:4;1191:27;1221:24;:22;:24::i;:::-;1191:54;-1:-1:-1;1262:24:32;;;;;:67;;;1310:19;1290:16;:14;:16::i;:::-;:39;;1262:67;1255:74;;1128:208;;:::o;881:137::-;936:7;962:49;345:66;962:47;:49::i;:::-;955:56;;881:137;:::o;287:117:34:-;331:4;277:2;354:24;:22;:24::i;:::-;:43;347:50;;287:117;:::o;347:94:37:-;422:12;347:94;:::o;519:134:39:-;630:15;;620:27::o", "source": "/*\n * SPDX-License-Identitifer: MIT\n */\n\npragma solidity ^0.4.24;\n\nimport \"./Initializable.sol\";\n\n\ncontract Petrifiable is Initializable {\n // Use block UINT256_MAX (which should be never) as the initializable date\n uint256 internal constant PETRIFIED_BLOCK = uint256(-1);\n\n function isPetrified() public view returns (bool) {\n return getInitializationBlock() == PETRIFIED_BLOCK;\n }\n\n /**\n * @dev Function to be called by top level contract to prevent being initialized.\n * Useful for freezing base contracts when they're used behind proxies.\n */\n function petrify() internal onlyInit {\n initializedAt(PETRIFIED_BLOCK);\n }\n}\n", "sourcePath": "@aragon/os/contracts/common/Petrifiable.sol", "ast": { "absolutePath": "@aragon/os/contracts/common/Petrifiable.sol", "exportedSymbols": { "Petrifiable": [ 10871 ] }, "id": 10872, "nodeType": "SourceUnit", "nodes": [ { "id": 10840, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "44:24:34" }, { "absolutePath": "@aragon/os/contracts/common/Initializable.sol", "file": "./Initializable.sol", "id": 10841, "nodeType": "ImportDirective", "scope": 10872, "sourceUnit": 10811, "src": "70:29:34", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 10842, "name": "Initializable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 10810, "src": "126:13:34", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$10810", "typeString": "contract Initializable" } }, "id": 10843, "nodeType": "InheritanceSpecifier", "src": "126:13:34" } ], "contractDependencies": [ 10810, 11200 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 10871, "linearizedBaseContracts": [ 10871, 10810, 11200 ], "name": "Petrifiable", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 10849, "name": "PETRIFIED_BLOCK", "nodeType": "VariableDeclaration", "scope": 10871, "src": "225:55:34", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 10844, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "225:7:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 10847, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "277:2:34", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 10846, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "278:1:34", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_-1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_-1_by_1", "typeString": "int_const -1" } ], "id": 10845, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "269:7:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, "id": 10848, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "269:11:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "body": { "id": 10859, "nodeType": "Block", "src": "337:67:34", "statements": [ { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 10857, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 10854, "name": "getInitializationBlock", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10762, "src": "354:22:34", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 10855, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "354:24:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 10856, "name": "PETRIFIED_BLOCK", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10849, "src": "382:15:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "354:43:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 10853, "id": 10858, "nodeType": "Return", "src": "347:50:34" } ] }, "documentation": null, "id": 10860, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "isPetrified", "nodeType": "FunctionDefinition", "parameters": { "id": 10850, "nodeType": "ParameterList", "parameters": [], "src": "307:2:34" }, "payable": false, "returnParameters": { "id": 10853, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 10852, "name": "", "nodeType": "VariableDeclaration", "scope": 10860, "src": "331:4:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 10851, "name": "bool", "nodeType": "ElementaryTypeName", "src": "331:4:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "330:6:34" }, "scope": 10871, "src": "287:117:34", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 10869, "nodeType": "Block", "src": "627:47:34", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 10866, "name": "PETRIFIED_BLOCK", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10849, "src": "651:15:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 10865, "name": "initializedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10809, "src": "637:13:34", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 10867, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "637:30:34", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 10868, "nodeType": "ExpressionStatement", "src": "637:30:34" } ] }, "documentation": "@dev Function to be called by top level contract to prevent being initialized.\n Useful for freezing base contracts when they're used behind proxies.", "id": 10870, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 10863, "modifierName": { "argumentTypes": null, "id": 10862, "name": "onlyInit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10742, "src": "618:8:34", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "618:8:34" } ], "name": "petrify", "nodeType": "FunctionDefinition", "parameters": { "id": 10861, "nodeType": "ParameterList", "parameters": [], "src": "606:2:34" }, "payable": false, "returnParameters": { "id": 10864, "nodeType": "ParameterList", "parameters": [], "src": "627:0:34" }, "scope": 10871, "src": "590:84:34", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 10872, "src": "102:574:34" } ], "src": "44:633:34" }, "legacyAST": { "absolutePath": "@aragon/os/contracts/common/Petrifiable.sol", "exportedSymbols": { "Petrifiable": [ 10871 ] }, "id": 10872, "nodeType": "SourceUnit", "nodes": [ { "id": 10840, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "44:24:34" }, { "absolutePath": "@aragon/os/contracts/common/Initializable.sol", "file": "./Initializable.sol", "id": 10841, "nodeType": "ImportDirective", "scope": 10872, "sourceUnit": 10811, "src": "70:29:34", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 10842, "name": "Initializable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 10810, "src": "126:13:34", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$10810", "typeString": "contract Initializable" } }, "id": 10843, "nodeType": "InheritanceSpecifier", "src": "126:13:34" } ], "contractDependencies": [ 10810, 11200 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 10871, "linearizedBaseContracts": [ 10871, 10810, 11200 ], "name": "Petrifiable", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 10849, "name": "PETRIFIED_BLOCK", "nodeType": "VariableDeclaration", "scope": 10871, "src": "225:55:34", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 10844, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "225:7:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 10847, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "277:2:34", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 10846, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "278:1:34", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_-1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_-1_by_1", "typeString": "int_const -1" } ], "id": 10845, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "269:7:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, "id": 10848, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "269:11:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "body": { "id": 10859, "nodeType": "Block", "src": "337:67:34", "statements": [ { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 10857, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 10854, "name": "getInitializationBlock", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10762, "src": "354:22:34", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 10855, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "354:24:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 10856, "name": "PETRIFIED_BLOCK", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10849, "src": "382:15:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "354:43:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 10853, "id": 10858, "nodeType": "Return", "src": "347:50:34" } ] }, "documentation": null, "id": 10860, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "isPetrified", "nodeType": "FunctionDefinition", "parameters": { "id": 10850, "nodeType": "ParameterList", "parameters": [], "src": "307:2:34" }, "payable": false, "returnParameters": { "id": 10853, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 10852, "name": "", "nodeType": "VariableDeclaration", "scope": 10860, "src": "331:4:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 10851, "name": "bool", "nodeType": "ElementaryTypeName", "src": "331:4:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "330:6:34" }, "scope": 10871, "src": "287:117:34", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 10869, "nodeType": "Block", "src": "627:47:34", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 10866, "name": "PETRIFIED_BLOCK", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10849, "src": "651:15:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 10865, "name": "initializedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10809, "src": "637:13:34", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 10867, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "637:30:34", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 10868, "nodeType": "ExpressionStatement", "src": "637:30:34" } ] }, "documentation": "@dev Function to be called by top level contract to prevent being initialized.\n Useful for freezing base contracts when they're used behind proxies.", "id": 10870, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 10863, "modifierName": { "argumentTypes": null, "id": 10862, "name": "onlyInit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10742, "src": "618:8:34", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "618:8:34" } ], "name": "petrify", "nodeType": "FunctionDefinition", "parameters": { "id": 10861, "nodeType": "ParameterList", "parameters": [], "src": "606:2:34" }, "payable": false, "returnParameters": { "id": 10864, "nodeType": "ParameterList", "parameters": [], "src": "627:0:34" }, "scope": 10871, "src": "590:84:34", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 10872, "src": "102:574:34" } ], "src": "44:633:34" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2019-09-04T11:02:55.761Z" }