1620 lines
65 KiB
JSON
1620 lines
65 KiB
JSON
|
{
|
||
|
"contractName": "SignatureValidator",
|
||
|
"abi": [
|
||
|
{
|
||
|
"constant": true,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "txHash",
|
||
|
"type": "bytes32"
|
||
|
},
|
||
|
{
|
||
|
"name": "messageSignature",
|
||
|
"type": "bytes"
|
||
|
},
|
||
|
{
|
||
|
"name": "pos",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "recoverKey",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "pure",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": true,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "signatures",
|
||
|
"type": "bytes"
|
||
|
},
|
||
|
{
|
||
|
"name": "pos",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "signatureSplit",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "v",
|
||
|
"type": "uint8"
|
||
|
},
|
||
|
{
|
||
|
"name": "r",
|
||
|
"type": "bytes32"
|
||
|
},
|
||
|
{
|
||
|
"name": "s",
|
||
|
"type": "bytes32"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "pure",
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"bytecode": "0x608060405234801561001057600080fd5b506102c1806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806363f44b5914610051578063b817dcc214610112575b600080fd5b34801561005d57600080fd5b506100d06004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001909291905050506101bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011e57600080fd5b50610183600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080359060200190929190505050610266565b604051808460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001935050505060405180910390f35b6000806000806101cd8686610266565b809350819450829550505050600187848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af1158015610250573d6000803e3d6000fd5b5050506020604051035193505050509392505050565b60008060008360410260208101860151925060408101860151915060ff604182018701511693505092509250925600a165627a7a72305820008feaa8b6dd7fe4a001ab0d8cd464ff26f4fbcfab9beb4d5b9d08e0da44c46c0029",
|
||
|
"deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806363f44b5914610051578063b817dcc214610112575b600080fd5b34801561005d57600080fd5b506100d06004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001909291905050506101bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011e57600080fd5b50610183600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080359060200190929190505050610266565b604051808460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001935050505060405180910390f35b6000806000806101cd8686610266565b809350819450829550505050600187848484604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af1158015610250573d6000803e3d6000fd5b5050506020604051035193505050509392505050565b60008060008360410260208101860151925060408101860151915060ff604182018701511693505092509250925600a165627a7a72305820008feaa8b6dd7fe4a001ab0d8cd464ff26f4fbcfab9beb4d5b9d08e0da44c46c0029",
|
||
|
"sourceMap": "221:1675:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;221:1675:9;;;;;;;",
|
||
|
"deployedSourceMap": "221:1675:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;477:328;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:328:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;982:912;;8:9:-1;5:2;;;30:1;27;20:12;5:2;982:912:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;477:328;627:7;651;668:9;687;718:37;733:16;751:3;718:14;:37::i;:::-;706:49;;;;;;;;;;;;772:26;782:6;790:1;793;796;772:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;772:26:9;;;;;;;;765:33;;477:328;;;;;;;;:::o;982:912::-;1082:7;1091:9;1102;1402:3;1396:4;1392:14;1464:4;1450:12;1446:23;1434:10;1430:40;1424:47;1419:52;;1529:4;1515:12;1511:23;1499:10;1495:40;1489:47;1484:52;;1873:4;1864;1850:12;1846:23;1834:10;1830:40;1824:47;1820:58;1815:63;;1358:530;;;;;;:::o",
|
||
|
"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 public\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 public\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": [
|
||
|
1505
|
||
|
]
|
||
|
},
|
||
|
"id": 1506,
|
||
|
"nodeType": "SourceUnit",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 1451,
|
||
|
"literals": [
|
||
|
"solidity",
|
||
|
"0.4",
|
||
|
".24"
|
||
|
],
|
||
|
"nodeType": "PragmaDirective",
|
||
|
"src": "0:23:9"
|
||
|
},
|
||
|
{
|
||
|
"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": 1505,
|
||
|
"linearizedBaseContracts": [
|
||
|
1505
|
||
|
],
|
||
|
"name": "SignatureValidator",
|
||
|
"nodeType": "ContractDefinition",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 1488,
|
||
|
"nodeType": "Block",
|
||
|
"src": "641:164:9",
|
||
|
"statements": [
|
||
|
{
|
||
|
"assignments": [],
|
||
|
"declarations": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1463,
|
||
|
"name": "v",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "651:7:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1462,
|
||
|
"name": "uint8",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "651:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"id": 1464,
|
||
|
"initialValue": null,
|
||
|
"nodeType": "VariableDeclarationStatement",
|
||
|
"src": "651:7:9"
|
||
|
},
|
||
|
{
|
||
|
"assignments": [],
|
||
|
"declarations": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1466,
|
||
|
"name": "r",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "668:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1465,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "668:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"id": 1467,
|
||
|
"initialValue": null,
|
||
|
"nodeType": "VariableDeclarationStatement",
|
||
|
"src": "668:9:9"
|
||
|
},
|
||
|
{
|
||
|
"assignments": [],
|
||
|
"declarations": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1469,
|
||
|
"name": "s",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "687:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1468,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "687:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"id": 1470,
|
||
|
"initialValue": null,
|
||
|
"nodeType": "VariableDeclarationStatement",
|
||
|
"src": "687:9:9"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1479,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"components": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1471,
|
||
|
"name": "v",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1463,
|
||
|
"src": "707:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1472,
|
||
|
"name": "r",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1466,
|
||
|
"src": "710:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1473,
|
||
|
"name": "s",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1469,
|
||
|
"src": "713:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"id": 1474,
|
||
|
"isConstant": false,
|
||
|
"isInlineArray": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "TupleExpression",
|
||
|
"src": "706:9:9",
|
||
|
"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": 1476,
|
||
|
"name": "messageSignature",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1455,
|
||
|
"src": "733:16:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1477,
|
||
|
"name": "pos",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1457,
|
||
|
"src": "751:3:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 1475,
|
||
|
"name": "signatureSplit",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1504,
|
||
|
"src": "718:14:9",
|
||
|
"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": 1478,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "718:37:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
|
||
|
"typeString": "tuple(uint8,bytes32,bytes32)"
|
||
|
}
|
||
|
},
|
||
|
"src": "706:49:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 1480,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "706:49:9"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1482,
|
||
|
"name": "txHash",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1453,
|
||
|
"src": "782:6:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1483,
|
||
|
"name": "v",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1463,
|
||
|
"src": "790:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1484,
|
||
|
"name": "r",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1466,
|
||
|
"src": "793:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1485,
|
||
|
"name": "s",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1469,
|
||
|
"src": "796:1:9",
|
||
|
"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": 1481,
|
||
|
"name": "ecrecover",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1765,
|
||
|
"src": "772:9:9",
|
||
|
"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": 1486,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "772:26:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 1461,
|
||
|
"id": 1487,
|
||
|
"nodeType": "Return",
|
||
|
"src": "765:33:9"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"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": 1489,
|
||
|
"implemented": true,
|
||
|
"isConstructor": false,
|
||
|
"isDeclaredConst": true,
|
||
|
"modifiers": [],
|
||
|
"name": "recoverKey",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1458,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1453,
|
||
|
"name": "txHash",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "507:14:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1452,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "507:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1455,
|
||
|
"name": "messageSignature",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "532:22:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1454,
|
||
|
"name": "bytes",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "532:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_storage_ptr",
|
||
|
"typeString": "bytes"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1457,
|
||
|
"name": "pos",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "564:11:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1456,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "564:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "497:84:9"
|
||
|
},
|
||
|
"payable": false,
|
||
|
"returnParameters": {
|
||
|
"id": 1461,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1460,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "627:7:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1459,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "627:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "626:9:9"
|
||
|
},
|
||
|
"scope": 1505,
|
||
|
"src": "477:328:9",
|
||
|
"stateMutability": "pure",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 1503,
|
||
|
"nodeType": "Block",
|
||
|
"src": "1117:777:9",
|
||
|
"statements": [
|
||
|
{
|
||
|
"externalReferences": [
|
||
|
{
|
||
|
"r": {
|
||
|
"declaration": 1498,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1419:1:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"pos": {
|
||
|
"declaration": 1493,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1402:3:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"signatures": {
|
||
|
"declaration": 1491,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1434:10:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"s": {
|
||
|
"declaration": 1500,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1484:1:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"signatures": {
|
||
|
"declaration": 1491,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1499:10:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"v": {
|
||
|
"declaration": 1496,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1815:1:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"signatures": {
|
||
|
"declaration": 1491,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1834:10:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"id": 1502,
|
||
|
"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": "1349:545:9"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"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": 1504,
|
||
|
"implemented": true,
|
||
|
"isConstructor": false,
|
||
|
"isDeclaredConst": true,
|
||
|
"modifiers": [],
|
||
|
"name": "signatureSplit",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1494,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1491,
|
||
|
"name": "signatures",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1006:16:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1490,
|
||
|
"name": "bytes",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1006:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_storage_ptr",
|
||
|
"typeString": "bytes"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1493,
|
||
|
"name": "pos",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1024:11:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1492,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1024:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1005:31:9"
|
||
|
},
|
||
|
"payable": false,
|
||
|
"returnParameters": {
|
||
|
"id": 1501,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1496,
|
||
|
"name": "v",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1082:7:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1495,
|
||
|
"name": "uint8",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1082:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1498,
|
||
|
"name": "r",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1091:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1497,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1091:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1500,
|
||
|
"name": "s",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1102:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1499,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1102:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1081:31:9"
|
||
|
},
|
||
|
"scope": 1505,
|
||
|
"src": "982:912:9",
|
||
|
"stateMutability": "pure",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
}
|
||
|
],
|
||
|
"scope": 1506,
|
||
|
"src": "221:1675:9"
|
||
|
}
|
||
|
],
|
||
|
"src": "0:1897:9"
|
||
|
},
|
||
|
"legacyAST": {
|
||
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SignatureValidator.sol",
|
||
|
"exportedSymbols": {
|
||
|
"SignatureValidator": [
|
||
|
1505
|
||
|
]
|
||
|
},
|
||
|
"id": 1506,
|
||
|
"nodeType": "SourceUnit",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 1451,
|
||
|
"literals": [
|
||
|
"solidity",
|
||
|
"0.4",
|
||
|
".24"
|
||
|
],
|
||
|
"nodeType": "PragmaDirective",
|
||
|
"src": "0:23:9"
|
||
|
},
|
||
|
{
|
||
|
"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": 1505,
|
||
|
"linearizedBaseContracts": [
|
||
|
1505
|
||
|
],
|
||
|
"name": "SignatureValidator",
|
||
|
"nodeType": "ContractDefinition",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 1488,
|
||
|
"nodeType": "Block",
|
||
|
"src": "641:164:9",
|
||
|
"statements": [
|
||
|
{
|
||
|
"assignments": [],
|
||
|
"declarations": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1463,
|
||
|
"name": "v",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "651:7:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1462,
|
||
|
"name": "uint8",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "651:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"id": 1464,
|
||
|
"initialValue": null,
|
||
|
"nodeType": "VariableDeclarationStatement",
|
||
|
"src": "651:7:9"
|
||
|
},
|
||
|
{
|
||
|
"assignments": [],
|
||
|
"declarations": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1466,
|
||
|
"name": "r",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "668:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1465,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "668:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"id": 1467,
|
||
|
"initialValue": null,
|
||
|
"nodeType": "VariableDeclarationStatement",
|
||
|
"src": "668:9:9"
|
||
|
},
|
||
|
{
|
||
|
"assignments": [],
|
||
|
"declarations": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1469,
|
||
|
"name": "s",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "687:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1468,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "687:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"id": 1470,
|
||
|
"initialValue": null,
|
||
|
"nodeType": "VariableDeclarationStatement",
|
||
|
"src": "687:9:9"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1479,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"components": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1471,
|
||
|
"name": "v",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1463,
|
||
|
"src": "707:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1472,
|
||
|
"name": "r",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1466,
|
||
|
"src": "710:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1473,
|
||
|
"name": "s",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1469,
|
||
|
"src": "713:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"id": 1474,
|
||
|
"isConstant": false,
|
||
|
"isInlineArray": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "TupleExpression",
|
||
|
"src": "706:9:9",
|
||
|
"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": 1476,
|
||
|
"name": "messageSignature",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1455,
|
||
|
"src": "733:16:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1477,
|
||
|
"name": "pos",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1457,
|
||
|
"src": "751:3:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 1475,
|
||
|
"name": "signatureSplit",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1504,
|
||
|
"src": "718:14:9",
|
||
|
"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": 1478,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "718:37:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
|
||
|
"typeString": "tuple(uint8,bytes32,bytes32)"
|
||
|
}
|
||
|
},
|
||
|
"src": "706:49:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 1480,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "706:49:9"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1482,
|
||
|
"name": "txHash",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1453,
|
||
|
"src": "782:6:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1483,
|
||
|
"name": "v",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1463,
|
||
|
"src": "790:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1484,
|
||
|
"name": "r",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1466,
|
||
|
"src": "793:1:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1485,
|
||
|
"name": "s",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1469,
|
||
|
"src": "796:1:9",
|
||
|
"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": 1481,
|
||
|
"name": "ecrecover",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1765,
|
||
|
"src": "772:9:9",
|
||
|
"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": 1486,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "772:26:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 1461,
|
||
|
"id": 1487,
|
||
|
"nodeType": "Return",
|
||
|
"src": "765:33:9"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"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": 1489,
|
||
|
"implemented": true,
|
||
|
"isConstructor": false,
|
||
|
"isDeclaredConst": true,
|
||
|
"modifiers": [],
|
||
|
"name": "recoverKey",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1458,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1453,
|
||
|
"name": "txHash",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "507:14:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1452,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "507:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1455,
|
||
|
"name": "messageSignature",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "532:22:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1454,
|
||
|
"name": "bytes",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "532:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_storage_ptr",
|
||
|
"typeString": "bytes"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1457,
|
||
|
"name": "pos",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "564:11:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1456,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "564:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "497:84:9"
|
||
|
},
|
||
|
"payable": false,
|
||
|
"returnParameters": {
|
||
|
"id": 1461,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1460,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1489,
|
||
|
"src": "627:7:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1459,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "627:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "626:9:9"
|
||
|
},
|
||
|
"scope": 1505,
|
||
|
"src": "477:328:9",
|
||
|
"stateMutability": "pure",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 1503,
|
||
|
"nodeType": "Block",
|
||
|
"src": "1117:777:9",
|
||
|
"statements": [
|
||
|
{
|
||
|
"externalReferences": [
|
||
|
{
|
||
|
"r": {
|
||
|
"declaration": 1498,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1419:1:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"pos": {
|
||
|
"declaration": 1493,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1402:3:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"signatures": {
|
||
|
"declaration": 1491,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1434:10:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"s": {
|
||
|
"declaration": 1500,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1484:1:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"signatures": {
|
||
|
"declaration": 1491,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1499:10:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"v": {
|
||
|
"declaration": 1496,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1815:1:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"signatures": {
|
||
|
"declaration": 1491,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "1834:10:9",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"id": 1502,
|
||
|
"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": "1349:545:9"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"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": 1504,
|
||
|
"implemented": true,
|
||
|
"isConstructor": false,
|
||
|
"isDeclaredConst": true,
|
||
|
"modifiers": [],
|
||
|
"name": "signatureSplit",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1494,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1491,
|
||
|
"name": "signatures",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1006:16:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1490,
|
||
|
"name": "bytes",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1006:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_storage_ptr",
|
||
|
"typeString": "bytes"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1493,
|
||
|
"name": "pos",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1024:11:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1492,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1024:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1005:31:9"
|
||
|
},
|
||
|
"payable": false,
|
||
|
"returnParameters": {
|
||
|
"id": 1501,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1496,
|
||
|
"name": "v",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1082:7:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1495,
|
||
|
"name": "uint8",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1082:5:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint8",
|
||
|
"typeString": "uint8"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1498,
|
||
|
"name": "r",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1091:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1497,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1091:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1500,
|
||
|
"name": "s",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1504,
|
||
|
"src": "1102:9:9",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1499,
|
||
|
"name": "bytes32",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1102:7:9",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes32",
|
||
|
"typeString": "bytes32"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1081:31:9"
|
||
|
},
|
||
|
"scope": 1505,
|
||
|
"src": "982:912:9",
|
||
|
"stateMutability": "pure",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
}
|
||
|
],
|
||
|
"scope": 1506,
|
||
|
"src": "221:1675:9"
|
||
|
}
|
||
|
],
|
||
|
"src": "0:1897:9"
|
||
|
},
|
||
|
"compiler": {
|
||
|
"name": "solc",
|
||
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
||
|
},
|
||
|
"networks": {},
|
||
|
"schemaVersion": "2.0.0",
|
||
|
"updatedAt": "2018-06-20T07:57:27.028Z"
|
||
|
}
|