{ "contractName": "SignatureValidator", "abi": [], "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a723058200cdb9454422435d516dbae78d0a22b0e1372e2fd7734828c7dc1343365c85cd50029", "deployedBytecode": "0x6080604052600080fd00a165627a7a723058200cdb9454422435d516dbae78d0a22b0e1372e2fd7734828c7dc1343365c85cd50029", "sourceMap": "221:1679:15:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;221:1679:15;;;;;;;", "deployedSourceMap": "221:1679:15:-;;;;;", "source": "pragma solidity 0.4.24;\n\n\n/// @title SignatureValidator - recovers a sender from a signature \n/// @author Ricardo Guilherme Schmidt (Status Research & Development GmbH) \n/// @author Richard Meissner - \ncontract SignatureValidator {\n \n /// @dev Recovers address who signed the message \n /// @param txHash operation ethereum signed message hash\n /// @param messageSignature message `txHash` signature\n /// @param pos which signature to read\n function recoverKey (\n bytes32 txHash, \n bytes messageSignature,\n uint256 pos\n )\n pure\n internal\n returns (address) \n {\n uint8 v;\n bytes32 r;\n bytes32 s;\n (v, r, s) = signatureSplit(messageSignature, pos);\n return ecrecover(txHash, v, r, s);\n }\n\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`\n /// @param pos which signature to read\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes signatures, uint256 pos)\n pure\n internal\n returns (uint8 v, bytes32 r, bytes32 s)\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}\n", "sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SignatureValidator.sol", "ast": { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SignatureValidator.sol", "exportedSymbols": { "SignatureValidator": [ 1744 ] }, "id": 1745, "nodeType": "SourceUnit", "nodes": [ { "id": 1690, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:23:15" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title SignatureValidator - recovers a sender from a signature \n @author Ricardo Guilherme Schmidt (Status Research & Development GmbH) \n @author Richard Meissner - ", "fullyImplemented": true, "id": 1744, "linearizedBaseContracts": [ 1744 ], "name": "SignatureValidator", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1727, "nodeType": "Block", "src": "643:164:15", "statements": [ { "assignments": [], "declarations": [ { "constant": false, "id": 1702, "name": "v", "nodeType": "VariableDeclaration", "scope": 1728, "src": "653:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 1701, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "653:5:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "id": 1703, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "653:7:15" }, { "assignments": [], "declarations": [ { "constant": false, "id": 1705, "name": "r", "nodeType": "VariableDeclaration", "scope": 1728, "src": "670:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1704, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "670:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "id": 1706, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "670:9:15" }, { "assignments": [], "declarations": [ { "constant": false, "id": 1708, "name": "s", "nodeType": "VariableDeclaration", "scope": 1728, "src": "689:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1707, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "689:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "id": 1709, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "689:9:15" }, { "expression": { "argumentTypes": null, "id": 1718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 1710, "name": "v", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1702, "src": "709:1:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { "argumentTypes": null, "id": 1711, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1705, "src": "712:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 1712, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1708, "src": "715:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "id": 1713, "isConstant": false, "isInlineArray": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "TupleExpression", "src": "708:9:15", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$", "typeString": "tuple(uint8,bytes32,bytes32)" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1715, "name": "messageSignature", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "735:16:15", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 1716, "name": "pos", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "753:3:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1714, "name": "signatureSplit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1743, "src": "720:14:15", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$_t_bytes32_$_t_bytes32_$", "typeString": "function (bytes memory,uint256) pure returns (uint8,bytes32,bytes32)" } }, "id": 1717, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "720:37:15", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$", "typeString": "tuple(uint8,bytes32,bytes32)" } }, "src": "708:49:15", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1719, "nodeType": "ExpressionStatement", "src": "708:49:15" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1721, "name": "txHash", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "784:6:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 1722, "name": "v", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1702, "src": "792:1:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { "argumentTypes": null, "id": 1723, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1705, "src": "795:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 1724, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1708, "src": "798:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_uint8", "typeString": "uint8" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 1720, "name": "ecrecover", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2651, "src": "774:9:15", "typeDescriptions": { "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" } }, "id": 1725, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "774:26:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 1700, "id": 1726, "nodeType": "Return", "src": "767:33:15" } ] }, "documentation": "@dev Recovers address who signed the message \n @param txHash operation ethereum signed message hash\n @param messageSignature message `txHash` signature\n @param pos which signature to read", "id": 1728, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "recoverKey", "nodeType": "FunctionDefinition", "parameters": { "id": 1697, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1692, "name": "txHash", "nodeType": "VariableDeclaration", "scope": 1728, "src": "507:14:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1691, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "507:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1694, "name": "messageSignature", "nodeType": "VariableDeclaration", "scope": 1728, "src": "532:22:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1693, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "532:5:15", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1696, "name": "pos", "nodeType": "VariableDeclaration", "scope": 1728, "src": "564:11:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1695, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "564:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "497:84:15" }, "payable": false, "returnParameters": { "id": 1700, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1699, "name": "", "nodeType": "VariableDeclaration", "scope": 1728, "src": "629:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1698, "name": "address", "nodeType": "ElementaryTypeName", "src": "629:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "628:9:15" }, "scope": 1744, "src": "477:330:15", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1742, "nodeType": "Block", "src": "1121:777:15", "statements": [ { "externalReferences": [ { "r": { "declaration": 1737, "isOffset": false, "isSlot": false, "src": "1423:1:15", "valueSize": 1 } }, { "pos": { "declaration": 1732, "isOffset": false, "isSlot": false, "src": "1406:3:15", "valueSize": 1 } }, { "signatures": { "declaration": 1730, "isOffset": false, "isSlot": false, "src": "1438:10:15", "valueSize": 1 } }, { "s": { "declaration": 1739, "isOffset": false, "isSlot": false, "src": "1488:1:15", "valueSize": 1 } }, { "signatures": { "declaration": 1730, "isOffset": false, "isSlot": false, "src": "1503:10:15", "valueSize": 1 } }, { "v": { "declaration": 1735, "isOffset": false, "isSlot": false, "src": "1819:1:15", "valueSize": 1 } }, { "signatures": { "declaration": 1730, "isOffset": false, "isSlot": false, "src": "1838:10:15", "valueSize": 1 } } ], "id": 1741, "nodeType": "InlineAssembly", "operations": "{\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n}", "src": "1353:545:15" } ] }, "documentation": "@dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`\n @param pos which signature to read\n @param signatures concatenated rsv signatures", "id": 1743, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "signatureSplit", "nodeType": "FunctionDefinition", "parameters": { "id": 1733, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1730, "name": "signatures", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1008:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1729, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1008:5:15", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1732, "name": "pos", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1026:11:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1731, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1026:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1007:31:15" }, "payable": false, "returnParameters": { "id": 1740, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1735, "name": "v", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1086:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 1734, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1086:5:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1737, "name": "r", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1095:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1736, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1095:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1739, "name": "s", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1106:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1738, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1106:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "1085:31:15" }, "scope": 1744, "src": "984:914:15", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], "scope": 1745, "src": "221:1679:15" } ], "src": "0:1901:15" }, "legacyAST": { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SignatureValidator.sol", "exportedSymbols": { "SignatureValidator": [ 1744 ] }, "id": 1745, "nodeType": "SourceUnit", "nodes": [ { "id": 1690, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:23:15" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title SignatureValidator - recovers a sender from a signature \n @author Ricardo Guilherme Schmidt (Status Research & Development GmbH) \n @author Richard Meissner - ", "fullyImplemented": true, "id": 1744, "linearizedBaseContracts": [ 1744 ], "name": "SignatureValidator", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1727, "nodeType": "Block", "src": "643:164:15", "statements": [ { "assignments": [], "declarations": [ { "constant": false, "id": 1702, "name": "v", "nodeType": "VariableDeclaration", "scope": 1728, "src": "653:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 1701, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "653:5:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "id": 1703, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "653:7:15" }, { "assignments": [], "declarations": [ { "constant": false, "id": 1705, "name": "r", "nodeType": "VariableDeclaration", "scope": 1728, "src": "670:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1704, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "670:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "id": 1706, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "670:9:15" }, { "assignments": [], "declarations": [ { "constant": false, "id": 1708, "name": "s", "nodeType": "VariableDeclaration", "scope": 1728, "src": "689:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1707, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "689:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "id": 1709, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "689:9:15" }, { "expression": { "argumentTypes": null, "id": 1718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 1710, "name": "v", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1702, "src": "709:1:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { "argumentTypes": null, "id": 1711, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1705, "src": "712:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 1712, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1708, "src": "715:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "id": 1713, "isConstant": false, "isInlineArray": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "TupleExpression", "src": "708:9:15", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$", "typeString": "tuple(uint8,bytes32,bytes32)" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1715, "name": "messageSignature", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "735:16:15", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 1716, "name": "pos", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "753:3:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1714, "name": "signatureSplit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1743, "src": "720:14:15", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$_t_bytes32_$_t_bytes32_$", "typeString": "function (bytes memory,uint256) pure returns (uint8,bytes32,bytes32)" } }, "id": 1717, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "720:37:15", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$", "typeString": "tuple(uint8,bytes32,bytes32)" } }, "src": "708:49:15", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1719, "nodeType": "ExpressionStatement", "src": "708:49:15" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1721, "name": "txHash", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "784:6:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 1722, "name": "v", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1702, "src": "792:1:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { "argumentTypes": null, "id": 1723, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1705, "src": "795:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 1724, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1708, "src": "798:1:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_uint8", "typeString": "uint8" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 1720, "name": "ecrecover", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2651, "src": "774:9:15", "typeDescriptions": { "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" } }, "id": 1725, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "774:26:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 1700, "id": 1726, "nodeType": "Return", "src": "767:33:15" } ] }, "documentation": "@dev Recovers address who signed the message \n @param txHash operation ethereum signed message hash\n @param messageSignature message `txHash` signature\n @param pos which signature to read", "id": 1728, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "recoverKey", "nodeType": "FunctionDefinition", "parameters": { "id": 1697, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1692, "name": "txHash", "nodeType": "VariableDeclaration", "scope": 1728, "src": "507:14:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1691, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "507:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1694, "name": "messageSignature", "nodeType": "VariableDeclaration", "scope": 1728, "src": "532:22:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1693, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "532:5:15", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1696, "name": "pos", "nodeType": "VariableDeclaration", "scope": 1728, "src": "564:11:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1695, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "564:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "497:84:15" }, "payable": false, "returnParameters": { "id": 1700, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1699, "name": "", "nodeType": "VariableDeclaration", "scope": 1728, "src": "629:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1698, "name": "address", "nodeType": "ElementaryTypeName", "src": "629:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "628:9:15" }, "scope": 1744, "src": "477:330:15", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1742, "nodeType": "Block", "src": "1121:777:15", "statements": [ { "externalReferences": [ { "r": { "declaration": 1737, "isOffset": false, "isSlot": false, "src": "1423:1:15", "valueSize": 1 } }, { "pos": { "declaration": 1732, "isOffset": false, "isSlot": false, "src": "1406:3:15", "valueSize": 1 } }, { "signatures": { "declaration": 1730, "isOffset": false, "isSlot": false, "src": "1438:10:15", "valueSize": 1 } }, { "s": { "declaration": 1739, "isOffset": false, "isSlot": false, "src": "1488:1:15", "valueSize": 1 } }, { "signatures": { "declaration": 1730, "isOffset": false, "isSlot": false, "src": "1503:10:15", "valueSize": 1 } }, { "v": { "declaration": 1735, "isOffset": false, "isSlot": false, "src": "1819:1:15", "valueSize": 1 } }, { "signatures": { "declaration": 1730, "isOffset": false, "isSlot": false, "src": "1838:10:15", "valueSize": 1 } } ], "id": 1741, "nodeType": "InlineAssembly", "operations": "{\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n}", "src": "1353:545:15" } ] }, "documentation": "@dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`\n @param pos which signature to read\n @param signatures concatenated rsv signatures", "id": 1743, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "signatureSplit", "nodeType": "FunctionDefinition", "parameters": { "id": 1733, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1730, "name": "signatures", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1008:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1729, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1008:5:15", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1732, "name": "pos", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1026:11:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1731, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1026:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1007:31:15" }, "payable": false, "returnParameters": { "id": 1740, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1735, "name": "v", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1086:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 1734, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1086:5:15", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1737, "name": "r", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1095:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1736, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1095:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1739, "name": "s", "nodeType": "VariableDeclaration", "scope": 1743, "src": "1106:9:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1738, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1106:7:15", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "1085:31:15" }, "scope": 1744, "src": "984:914:15", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], "scope": 1745, "src": "221:1679:15" } ], "src": "0:1901:15" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-06-28T15:26:56.489Z" }