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