safe-react/safe-contracts/build/contracts/SignatureValidator.json

1561 lines
61 KiB
JSON

{
"contractName": "SignatureValidator",
"abi": [],
"bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a723058200cdb9454422435d516dbae78d0a22b0e1372e2fd7734828c7dc1343365c85cd50029",
"deployedBytecode": "0x6080604052600080fd00a165627a7a723058200cdb9454422435d516dbae78d0a22b0e1372e2fd7734828c7dc1343365c85cd50029",
"sourceMap": "221:1679:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;221:1679:17;;;;;;;",
"deployedSourceMap": "221:1679:17:-;;;;;",
"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 - <richard@gnosis.pm>\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": [
3121
]
},
"id": 3122,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3067,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:17"
},
{
"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 - <richard@gnosis.pm>",
"fullyImplemented": true,
"id": 3121,
"linearizedBaseContracts": [
3121
],
"name": "SignatureValidator",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 3104,
"nodeType": "Block",
"src": "643:164:17",
"statements": [
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 3079,
"name": "v",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "653:7:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3078,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "653:5:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3080,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "653:7:17"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 3082,
"name": "r",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "670:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3081,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "670:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3083,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "670:9:17"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 3085,
"name": "s",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "689:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3084,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "689:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3086,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "689:9:17"
},
{
"expression": {
"argumentTypes": null,
"id": 3095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 3087,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3079,
"src": "709:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 3088,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3082,
"src": "712:1:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 3089,
"name": "s",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3085,
"src": "715:1:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"id": 3090,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "708:9:17",
"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": 3092,
"name": "messageSignature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "735:16:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 3093,
"name": "pos",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3073,
"src": "753:3:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3091,
"name": "signatureSplit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3120,
"src": "720:14:17",
"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": 3094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "720:37:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
"typeString": "tuple(uint8,bytes32,bytes32)"
}
},
"src": "708:49:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3096,
"nodeType": "ExpressionStatement",
"src": "708:49:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3098,
"name": "txHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3069,
"src": "784:6:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 3099,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3079,
"src": "792:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 3100,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3082,
"src": "795:1:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 3101,
"name": "s",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3085,
"src": "798:1:17",
"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": 3097,
"name": "ecrecover",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4028,
"src": "774:9:17",
"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": 3102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "774:26:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 3077,
"id": 3103,
"nodeType": "Return",
"src": "767:33:17"
}
]
},
"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": 3105,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "recoverKey",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3074,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3069,
"name": "txHash",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "507:14:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3068,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "507:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3071,
"name": "messageSignature",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "532:22:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3070,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "532:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3073,
"name": "pos",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "564:11:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3072,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "564:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "497:84:17"
},
"payable": false,
"returnParameters": {
"id": 3077,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3076,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "629:7:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3075,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "629:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "628:9:17"
},
"scope": 3121,
"src": "477:330:17",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3119,
"nodeType": "Block",
"src": "1121:777:17",
"statements": [
{
"externalReferences": [
{
"r": {
"declaration": 3114,
"isOffset": false,
"isSlot": false,
"src": "1423:1:17",
"valueSize": 1
}
},
{
"pos": {
"declaration": 3109,
"isOffset": false,
"isSlot": false,
"src": "1406:3:17",
"valueSize": 1
}
},
{
"signatures": {
"declaration": 3107,
"isOffset": false,
"isSlot": false,
"src": "1438:10:17",
"valueSize": 1
}
},
{
"s": {
"declaration": 3116,
"isOffset": false,
"isSlot": false,
"src": "1488:1:17",
"valueSize": 1
}
},
{
"signatures": {
"declaration": 3107,
"isOffset": false,
"isSlot": false,
"src": "1503:10:17",
"valueSize": 1
}
},
{
"v": {
"declaration": 3112,
"isOffset": false,
"isSlot": false,
"src": "1819:1:17",
"valueSize": 1
}
},
{
"signatures": {
"declaration": 3107,
"isOffset": false,
"isSlot": false,
"src": "1838:10:17",
"valueSize": 1
}
}
],
"id": 3118,
"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:17"
}
]
},
"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": 3120,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "signatureSplit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3110,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3107,
"name": "signatures",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1008:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3106,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1008:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3109,
"name": "pos",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1026:11:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3108,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1026:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1007:31:17"
},
"payable": false,
"returnParameters": {
"id": 3117,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3112,
"name": "v",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1086:7:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3111,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1086:5:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3114,
"name": "r",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1095:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3113,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1095:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3116,
"name": "s",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1106:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3115,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1106:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1085:31:17"
},
"scope": 3121,
"src": "984:914:17",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 3122,
"src": "221:1679:17"
}
],
"src": "0:1901:17"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SignatureValidator.sol",
"exportedSymbols": {
"SignatureValidator": [
3121
]
},
"id": 3122,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3067,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:17"
},
{
"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 - <richard@gnosis.pm>",
"fullyImplemented": true,
"id": 3121,
"linearizedBaseContracts": [
3121
],
"name": "SignatureValidator",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 3104,
"nodeType": "Block",
"src": "643:164:17",
"statements": [
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 3079,
"name": "v",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "653:7:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3078,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "653:5:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3080,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "653:7:17"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 3082,
"name": "r",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "670:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3081,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "670:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3083,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "670:9:17"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 3085,
"name": "s",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "689:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3084,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "689:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3086,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "689:9:17"
},
{
"expression": {
"argumentTypes": null,
"id": 3095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 3087,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3079,
"src": "709:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 3088,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3082,
"src": "712:1:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 3089,
"name": "s",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3085,
"src": "715:1:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"id": 3090,
"isConstant": false,
"isInlineArray": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "TupleExpression",
"src": "708:9:17",
"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": 3092,
"name": "messageSignature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "735:16:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 3093,
"name": "pos",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3073,
"src": "753:3:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3091,
"name": "signatureSplit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3120,
"src": "720:14:17",
"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": 3094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "720:37:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
"typeString": "tuple(uint8,bytes32,bytes32)"
}
},
"src": "708:49:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3096,
"nodeType": "ExpressionStatement",
"src": "708:49:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3098,
"name": "txHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3069,
"src": "784:6:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 3099,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3079,
"src": "792:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"argumentTypes": null,
"id": 3100,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3082,
"src": "795:1:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 3101,
"name": "s",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3085,
"src": "798:1:17",
"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": 3097,
"name": "ecrecover",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4028,
"src": "774:9:17",
"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": 3102,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "774:26:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 3077,
"id": 3103,
"nodeType": "Return",
"src": "767:33:17"
}
]
},
"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": 3105,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "recoverKey",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3074,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3069,
"name": "txHash",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "507:14:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3068,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "507:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3071,
"name": "messageSignature",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "532:22:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3070,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "532:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3073,
"name": "pos",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "564:11:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3072,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "564:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "497:84:17"
},
"payable": false,
"returnParameters": {
"id": 3077,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3076,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3105,
"src": "629:7:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3075,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "629:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "628:9:17"
},
"scope": 3121,
"src": "477:330:17",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3119,
"nodeType": "Block",
"src": "1121:777:17",
"statements": [
{
"externalReferences": [
{
"r": {
"declaration": 3114,
"isOffset": false,
"isSlot": false,
"src": "1423:1:17",
"valueSize": 1
}
},
{
"pos": {
"declaration": 3109,
"isOffset": false,
"isSlot": false,
"src": "1406:3:17",
"valueSize": 1
}
},
{
"signatures": {
"declaration": 3107,
"isOffset": false,
"isSlot": false,
"src": "1438:10:17",
"valueSize": 1
}
},
{
"s": {
"declaration": 3116,
"isOffset": false,
"isSlot": false,
"src": "1488:1:17",
"valueSize": 1
}
},
{
"signatures": {
"declaration": 3107,
"isOffset": false,
"isSlot": false,
"src": "1503:10:17",
"valueSize": 1
}
},
{
"v": {
"declaration": 3112,
"isOffset": false,
"isSlot": false,
"src": "1819:1:17",
"valueSize": 1
}
},
{
"signatures": {
"declaration": 3107,
"isOffset": false,
"isSlot": false,
"src": "1838:10:17",
"valueSize": 1
}
}
],
"id": 3118,
"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:17"
}
]
},
"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": 3120,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "signatureSplit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3110,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3107,
"name": "signatures",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1008:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3106,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1008:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3109,
"name": "pos",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1026:11:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3108,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1026:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1007:31:17"
},
"payable": false,
"returnParameters": {
"id": 3117,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3112,
"name": "v",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1086:7:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3111,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1086:5:17",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3114,
"name": "r",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1095:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3113,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1095:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3116,
"name": "s",
"nodeType": "VariableDeclaration",
"scope": 3120,
"src": "1106:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3115,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1106:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1085:31:17"
},
"scope": 3121,
"src": "984:914:17",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 3122,
"src": "221:1679:17"
}
],
"src": "0:1901:17"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.0",
"updatedAt": "2018-06-29T09:01:22.084Z"
}