UNPKG

@aragon/apps-payroll

Version:

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

1,321 lines 92.3 kB
{ "contractName": "ScriptHelpers", "abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058206ecd9ca1299724a28a36f794767abdec7400e163f65beb6ac93b5bbbcd8555870029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058206ecd9ca1299724a28a36f794767abdec7400e163f65beb6ac93b5bbbcd8555870029", "sourceMap": "71:1409:45:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", "deployedSourceMap": "71:1409:45:-;;;;;;;;", "source": "/*\n * SPDX-License-Identitifer: MIT\n */\n\npragma solidity ^0.4.24;\n\n\nlibrary ScriptHelpers {\n function getSpecId(bytes _script) internal pure returns (uint32) {\n return uint32At(_script, 0);\n }\n\n function uint256At(bytes _data, uint256 _location) internal pure returns (uint256 result) {\n assembly {\n result := mload(add(_data, add(0x20, _location)))\n }\n }\n\n function addressAt(bytes _data, uint256 _location) internal pure returns (address result) {\n uint256 word = uint256At(_data, _location);\n\n assembly {\n result := div(and(word, 0xffffffffffffffffffffffffffffffffffffffff000000000000000000000000),\n 0x1000000000000000000000000)\n }\n }\n\n function uint32At(bytes _data, uint256 _location) internal pure returns (uint32 result) {\n uint256 word = uint256At(_data, _location);\n\n assembly {\n result := div(and(word, 0xffffffff00000000000000000000000000000000000000000000000000000000),\n 0x100000000000000000000000000000000000000000000000000000000)\n }\n }\n\n function locationOf(bytes _data, uint256 _location) internal pure returns (uint256 result) {\n assembly {\n result := add(_data, add(0x20, _location))\n }\n }\n\n function toBytes(bytes4 _sig) internal pure returns (bytes) {\n bytes memory payload = new bytes(4);\n assembly { mstore(add(payload, 0x20), _sig) }\n return payload;\n }\n}\n", "sourcePath": "@aragon/os/contracts/evmscript/ScriptHelpers.sol", "ast": { "absolutePath": "@aragon/os/contracts/evmscript/ScriptHelpers.sol", "exportedSymbols": { "ScriptHelpers": [ 11962 ] }, "id": 11963, "nodeType": "SourceUnit", "nodes": [ { "id": 11872, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "44:24:45" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 11962, "linearizedBaseContracts": [ 11962 ], "name": "ScriptHelpers", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 11884, "nodeType": "Block", "src": "164:44:45", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11880, "name": "_script", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11874, "src": "190:7:45", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "hexValue": "30", "id": 11881, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "199:1:45", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 11879, "name": "uint32At", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11932, "src": "181:8:45", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$", "typeString": "function (bytes memory,uint256) pure returns (uint32)" } }, "id": 11882, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "181:20:45", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "functionReturnParameters": 11878, "id": 11883, "nodeType": "Return", "src": "174:27:45" } ] }, "documentation": null, "id": 11885, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "getSpecId", "nodeType": "FunctionDefinition", "parameters": { "id": 11875, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11874, "name": "_script", "nodeType": "VariableDeclaration", "scope": 11885, "src": "118:13:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11873, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "118:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "117:15:45" }, "payable": false, "returnParameters": { "id": 11878, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11877, "name": "", "nodeType": "VariableDeclaration", "scope": 11885, "src": "156:6:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 11876, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "156:6:45", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": null, "visibility": "internal" } ], "src": "155:8:45" }, "scope": 11962, "src": "99:109:45", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 11895, "nodeType": "Block", "src": "304:98:45", "statements": [ { "externalReferences": [ { "result": { "declaration": 11892, "isOffset": false, "isSlot": false, "src": "337:6:45", "valueSize": 1 } }, { "_data": { "declaration": 11887, "isOffset": false, "isSlot": false, "src": "357:5:45", "valueSize": 1 } }, { "_location": { "declaration": 11889, "isOffset": false, "isSlot": false, "src": "374:9:45", "valueSize": 1 } } ], "id": 11894, "nodeType": "InlineAssembly", "operations": "{\n result := mload(add(_data, add(0x20, _location)))\n}", "src": "314:88:45" } ] }, "documentation": null, "id": 11896, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "uint256At", "nodeType": "FunctionDefinition", "parameters": { "id": 11890, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11887, "name": "_data", "nodeType": "VariableDeclaration", "scope": 11896, "src": "233:11:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11886, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "233:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11889, "name": "_location", "nodeType": "VariableDeclaration", "scope": 11896, "src": "246:17:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11888, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "246:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "232:32:45" }, "payable": false, "returnParameters": { "id": 11893, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11892, "name": "result", "nodeType": "VariableDeclaration", "scope": 11896, "src": "288:14:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11891, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "288:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "287:16:45" }, "scope": 11962, "src": "214:188:45", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 11913, "nodeType": "Block", "src": "498:235:45", "statements": [ { "assignments": [ 11906 ], "declarations": [ { "constant": false, "id": 11906, "name": "word", "nodeType": "VariableDeclaration", "scope": 11914, "src": "508:12:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11905, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "508:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 11911, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11908, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11898, "src": "533:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 11909, "name": "_location", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11900, "src": "540:9:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 11907, "name": "uint256At", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11896, "src": "523:9:45", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (bytes memory,uint256) pure returns (uint256)" } }, "id": 11910, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "523:27:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "508:42:45" }, { "externalReferences": [ { "result": { "declaration": 11903, "isOffset": false, "isSlot": false, "src": "584:6:45", "valueSize": 1 } }, { "word": { "declaration": 11906, "isOffset": false, "isSlot": false, "src": "602:4:45", "valueSize": 1 } } ], "id": 11912, "nodeType": "InlineAssembly", "operations": "{\n result := div(and(word, 0xffffffffffffffffffffffffffffffffffffffff000000000000000000000000), 0x1000000000000000000000000)\n}", "src": "561:172:45" } ] }, "documentation": null, "id": 11914, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "addressAt", "nodeType": "FunctionDefinition", "parameters": { "id": 11901, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11898, "name": "_data", "nodeType": "VariableDeclaration", "scope": 11914, "src": "427:11:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11897, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "427:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11900, "name": "_location", "nodeType": "VariableDeclaration", "scope": 11914, "src": "440:17:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11899, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "440:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "426:32:45" }, "payable": false, "returnParameters": { "id": 11904, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11903, "name": "result", "nodeType": "VariableDeclaration", "scope": 11914, "src": "482:14:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 11902, "name": "address", "nodeType": "ElementaryTypeName", "src": "482:7:45", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "481:16:45" }, "scope": 11962, "src": "408:325:45", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 11931, "nodeType": "Block", "src": "827:267:45", "statements": [ { "assignments": [ 11924 ], "declarations": [ { "constant": false, "id": 11924, "name": "word", "nodeType": "VariableDeclaration", "scope": 11932, "src": "837:12:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11923, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "837:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 11929, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11926, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11916, "src": "862:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 11927, "name": "_location", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11918, "src": "869:9:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 11925, "name": "uint256At", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11896, "src": "852:9:45", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (bytes memory,uint256) pure returns (uint256)" } }, "id": 11928, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "852:27:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "837:42:45" }, { "externalReferences": [ { "result": { "declaration": 11921, "isOffset": false, "isSlot": false, "src": "913:6:45", "valueSize": 1 } }, { "word": { "declaration": 11924, "isOffset": false, "isSlot": false, "src": "931:4:45", "valueSize": 1 } } ], "id": 11930, "nodeType": "InlineAssembly", "operations": "{\n result := div(and(word, 0xffffffff00000000000000000000000000000000000000000000000000000000), 0x100000000000000000000000000000000000000000000000000000000)\n}", "src": "890:204:45" } ] }, "documentation": null, "id": 11932, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "uint32At", "nodeType": "FunctionDefinition", "parameters": { "id": 11919, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11916, "name": "_data", "nodeType": "VariableDeclaration", "scope": 11932, "src": "757:11:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11915, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "757:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11918, "name": "_location", "nodeType": "VariableDeclaration", "scope": 11932, "src": "770:17:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11917, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "770:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "756:32:45" }, "payable": false, "returnParameters": { "id": 11922, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11921, "name": "result", "nodeType": "VariableDeclaration", "scope": 11932, "src": "812:13:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 11920, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "812:6:45", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": null, "visibility": "internal" } ], "src": "811:15:45" }, "scope": 11962, "src": "739:355:45", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 11942, "nodeType": "Block", "src": "1191:91:45", "statements": [ { "externalReferences": [ { "result": { "declaration": 11939, "isOffset": false, "isSlot": false, "src": "1224:6:45", "valueSize": 1 } }, { "_data": { "declaration": 11934, "isOffset": false, "isSlot": false, "src": "1238:5:45", "valueSize": 1 } }, { "_location": { "declaration": 11936, "isOffset": false, "isSlot": false, "src": "1255:9:45", "valueSize": 1 } } ], "id": 11941, "nodeType": "InlineAssembly", "operations": "{\n result := add(_data, add(0x20, _location))\n}", "src": "1201:81:45" } ] }, "documentation": null, "id": 11943, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "locationOf", "nodeType": "FunctionDefinition", "parameters": { "id": 11937, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11934, "name": "_data", "nodeType": "VariableDeclaration", "scope": 11943, "src": "1120:11:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11933, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1120:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11936, "name": "_location", "nodeType": "VariableDeclaration", "scope": 11943, "src": "1133:17:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11935, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1133:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1119:32:45" }, "payable": false, "returnParameters": { "id": 11940, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11939, "name": "result", "nodeType": "VariableDeclaration", "scope": 11943, "src": "1175:14:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 11938, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1175:7:45", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1174:16:45" }, "scope": 11962, "src": "1100:182:45", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 11960, "nodeType": "Block", "src": "1348:130:45", "statements": [ { "assignments": [ 11951 ], "declarations": [ { "constant": false, "id": 11951, "name": "payload", "nodeType": "VariableDeclaration", "scope": 11961, "src": "1358:20:45", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11950, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1358:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 11956, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "34", "id": 11954, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1391:1:45", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", "typeString": "int_const 4" }, "value": "4" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_4_by_1", "typeString": "int_const 4" } ], "id": 11953, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "1381:9:45", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_$", "typeString": "function (uint256) pure returns (bytes memory)" }, "typeName": { "id": 11952, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1385:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } } }, "id": 11955, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1381:12:45", "typeDescriptions": { "typeIdentifier": "t_bytes_memory", "typeString": "bytes memory" } }, "nodeType": "VariableDeclarationStatement", "src": "1358:35:45" }, { "externalReferences": [ { "_sig": { "declaration": 11945, "isOffset": false, "isSlot": false, "src": "1441:4:45", "valueSize": 1 } }, { "payload": { "declaration": 11951, "isOffset": false, "isSlot": false, "src": "1425:7:45", "valueSize": 1 } } ], "id": 11957, "nodeType": "InlineAssembly", "operations": "{\n mstore(add(payload, 0x20), _sig)\n}", "src": "1403:60:45" }, { "expression": { "argumentTypes": null, "id": 11958, "name": "payload", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11951, "src": "1464:7:45", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "functionReturnParameters": 11949, "id": 11959, "nodeType": "Return", "src": "1457:14:45" } ] }, "documentation": null, "id": 11961, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "toBytes", "nodeType": "FunctionDefinition", "parameters": { "id": 11946, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11945, "name": "_sig", "nodeType": "VariableDeclaration", "scope": 11961, "src": "1305:11:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 11944, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1305:6:45", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "1304:13:45" }, "payable": false, "returnParameters": { "id": 11949, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 11948, "name": "", "nodeType": "VariableDeclaration", "scope": 11961, "src": "1341:5:45", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 11947, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1341:5:45", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "1340:7:45" }, "scope": 11962, "src": "1288:190:45", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], "scope": 11963, "src": "71:1409:45" } ], "src": "44:1437:45" }, "legacyAST": { "absolutePath": "@aragon/os/contracts/evmscript/ScriptHelpers.sol", "exportedSymbols": { "ScriptHelpers": [ 11962 ] }, "id": 11963, "nodeType": "SourceUnit", "nodes": [ { "id": 11872, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "44:24:45" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 11962, "linearizedBaseContracts": [ 11962 ], "name": "ScriptHelpers", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 11884, "nodeType": "Block", "src": "164:44:45", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 11880, "name": "_script", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11874, "src": "190:7:45", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "hexValue": "30", "id": 11881, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "199:1:45", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier":