{
  "contractName": "ECDSA",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d TODO Remove this library once solidity supports passing a signature to ecrecover. See https://github.com/ethereum/solidity/issues/864\",\"methods\":{},\"title\":\"Elliptic curve signature operations\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/cryptography/ECDSA.sol\":\"ECDSA\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/cryptography/ECDSA.sol\":{\"keccak256\":\"0xb48974d92a87053dc1d6c5389f3d1b2ad522dec23afcb508eaa935d98dfdc0b6\",\"urls\":[\"bzzr://e665a84309432c27a26e622665dd97ff29d4d6ad7ad655d6e2c50226a5e99b56\"]}},\"version\":1}",
  "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582003713ecd248669e536ceb1e1c8ea5ca07048e58eed4222c0916daf419ce1ed5f0029",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582003713ecd248669e536ceb1e1c8ea5ca07048e58eed4222c0916daf419ce1ed5f0029",
  "sourceMap": "299:1753:85:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
  "deployedSourceMap": "299:1753:85:-;;;;;;;;",
  "source": "pragma solidity ^0.5.0;\n\n/**\n * @title Elliptic curve signature operations\n * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d\n * TODO Remove this library once solidity supports passing a signature to ecrecover.\n * See https://github.com/ethereum/solidity/issues/864\n */\n\nlibrary ECDSA {\n    /**\n     * @dev Recover signer address from a message by using their signature\n     * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n     * @param signature bytes signature, the signature is generated using web3.eth.sign()\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        bytes32 r;\n        bytes32 s;\n        uint8 v;\n\n        // Check the signature length\n        if (signature.length != 65) {\n            return (address(0));\n        }\n\n        // Divide the signature in r, s and v variables\n        // ecrecover takes the signature parameters, and the only way to get them\n        // currently is to use assembly.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            r := mload(add(signature, 0x20))\n            s := mload(add(signature, 0x40))\n            v := byte(0, mload(add(signature, 0x60)))\n        }\n\n        // Version of signature should be 27 or 28, but 0 and 1 are also possible versions\n        if (v < 27) {\n            v += 27;\n        }\n\n        // If the version is correct return the signer address\n        if (v != 27 && v != 28) {\n            return (address(0));\n        } else {\n            return ecrecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * toEthSignedMessageHash\n     * @dev prefix a bytes32 value with \"\\x19Ethereum Signed Message:\"\n     * and hash the result\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n}\n",
  "sourcePath": "openzeppelin-solidity/contracts/cryptography/ECDSA.sol",
  "ast": {
    "absolutePath": "openzeppelin-solidity/contracts/cryptography/ECDSA.sol",
    "exportedSymbols": {
      "ECDSA": [
        22790
      ]
    },
    "id": 22791,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 22711,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:85"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@title Elliptic curve signature operations\n@dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d\nTODO Remove this library once solidity supports passing a signature to ecrecover.\nSee https://github.com/ethereum/solidity/issues/864",
        "fullyImplemented": true,
        "id": 22790,
        "linearizedBaseContracts": [
          22790
        ],
        "name": "ECDSA",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 22772,
              "nodeType": "Block",
              "src": "696:939:85",
              "statements": [
                {
                  "assignments": [
                    22721
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 22721,
                      "name": "r",
                      "nodeType": "VariableDeclaration",
                      "scope": 22772,
                      "src": "706:9:85",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 22720,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "706:7:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 22722,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "706:9:85"
                },
                {
                  "assignments": [
                    22724
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 22724,
                      "name": "s",
                      "nodeType": "VariableDeclaration",
                      "scope": 22772,
                      "src": "725:9:85",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 22723,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "725:7:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 22725,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "725:9:85"
                },
                {
                  "assignments": [
                    22727
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 22727,
                      "name": "v",
                      "nodeType": "VariableDeclaration",
                      "scope": 22772,
                      "src": "744:7:85",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 22726,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "744:5:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 22728,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "744:7:85"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 22732,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 22729,
                        "name": "signature",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22715,
                        "src": "804:9:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 22730,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "804:16:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3635",
                      "id": 22731,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "824:2:85",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_65_by_1",
                        "typeString": "int_const 65"
                      },
                      "value": "65"
                    },
                    "src": "804:22:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 22739,
                  "nodeType": "IfStatement",
                  "src": "800:72:85",
                  "trueBody": {
                    "id": 22738,
                    "nodeType": "Block",
                    "src": "828:44:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 22734,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "858:1:85",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 22733,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "850:7:85",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 22735,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "850:10:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "id": 22736,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "849:12:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "functionReturnParameters": 22719,
                        "id": 22737,
                        "nodeType": "Return",
                        "src": "842:19:85"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "r": {
                        "declaration": 22721,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1140:1:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "signature": {
                        "declaration": 22715,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1155:9:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "v": {
                        "declaration": 22727,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1230:1:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "s": {
                        "declaration": 22724,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1185:1:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "signature": {
                        "declaration": 22715,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1200:9:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "signature": {
                        "declaration": 22715,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1253:9:85",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 22740,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    r := mload(add(signature, 0x20))\n    s := mload(add(signature, 0x40))\n    v := byte(0, mload(add(signature, 0x60)))\n}",
                  "src": "1117:267:85"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 22743,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 22741,
                      "name": "v",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 22727,
                      "src": "1386:1:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3237",
                      "id": 22742,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1390:2:85",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_27_by_1",
                        "typeString": "int_const 27"
                      },
                      "value": "27"
                    },
                    "src": "1386:6:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 22749,
                  "nodeType": "IfStatement",
                  "src": "1382:44:85",
                  "trueBody": {
                    "id": 22748,
                    "nodeType": "Block",
                    "src": "1394:32:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 22746,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 22744,
                            "name": "v",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22727,
                            "src": "1408:1:85",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3237",
                            "id": 22745,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1413:2:85",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_27_by_1",
                              "typeString": "int_const 27"
                            },
                            "value": "27"
                          },
                          "src": "1408:7:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 22747,
                        "nodeType": "ExpressionStatement",
                        "src": "1408:7:85"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 22756,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 22752,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 22750,
                        "name": "v",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22727,
                        "src": "1503:1:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3237",
                        "id": 22751,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1508:2:85",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_27_by_1",
                          "typeString": "int_const 27"
                        },
                        "value": "27"
                      },
                      "src": "1503:7:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 22755,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 22753,
                        "name": "v",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22727,
                        "src": "1514:1:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3238",
                        "id": 22754,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1519:2:85",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_28_by_1",
                          "typeString": "int_const 28"
                        },
                        "value": "28"
                      },
                      "src": "1514:7:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1503:18:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 22770,
                    "nodeType": "Block",
                    "src": "1573:56:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 22764,
                              "name": "hash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22713,
                              "src": "1604:4:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 22765,
                              "name": "v",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22727,
                              "src": "1610:1:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 22766,
                              "name": "r",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22721,
                              "src": "1613:1:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 22767,
                              "name": "s",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22724,
                              "src": "1616:1:85",
                              "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": 22763,
                            "name": "ecrecover",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 23682,
                            "src": "1594:9:85",
                            "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": 22768,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1594:24:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 22719,
                        "id": 22769,
                        "nodeType": "Return",
                        "src": "1587:31:85"
                      }
                    ]
                  },
                  "id": 22771,
                  "nodeType": "IfStatement",
                  "src": "1499:130:85",
                  "trueBody": {
                    "id": 22762,
                    "nodeType": "Block",
                    "src": "1523:44:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 22758,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1553:1:85",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 22757,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1545:7:85",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 22759,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1545:10:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "id": 22760,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1544:12:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "functionReturnParameters": 22719,
                        "id": 22761,
                        "nodeType": "Return",
                        "src": "1537:19:85"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Recover signer address from a message by using their signature\n@param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n@param signature bytes signature, the signature is generated using web3.eth.sign()",
            "id": 22773,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "recover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 22716,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22713,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 22773,
                  "src": "626:12:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 22712,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "626:7:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 22715,
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "scope": 22773,
                  "src": "640:22:85",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 22714,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "640:5:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "625:38:85"
            },
            "returnParameters": {
              "id": 22719,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22718,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 22773,
                  "src": "687:7:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 22717,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "687:7:85",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "686:9:85"
            },
            "scope": 22790,
            "src": "609:1026:85",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 22788,
              "nodeType": "Block",
              "src": "1863:187:85",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
                            "id": 22783,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "string",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2001:34:85",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                              "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
                            },
                            "value": "\u0019Ethereum Signed Message:\n32"
                          },
                          {
                            "argumentTypes": null,
                            "id": 22784,
                            "name": "hash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22775,
                            "src": "2037:4:85",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                              "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
                            },
                            {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 22781,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 23677,
                            "src": "1984:3:85",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 22782,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1984:16:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 22785,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1984:58:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 22780,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 23684,
                      "src": "1974:9:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 22786,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:69:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 22779,
                  "id": 22787,
                  "nodeType": "Return",
                  "src": "1967:76:85"
                }
              ]
            },
            "documentation": "toEthSignedMessageHash\n@dev prefix a bytes32 value with \"\\x19Ethereum Signed Message:\"\nand hash the result",
            "id": 22789,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toEthSignedMessageHash",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 22776,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22775,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 22789,
                  "src": "1817:12:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 22774,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1817:7:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1816:14:85"
            },
            "returnParameters": {
              "id": 22779,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22778,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 22789,
                  "src": "1854:7:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 22777,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1854:7:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1853:9:85"
            },
            "scope": 22790,
            "src": "1785:265:85",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 22791,
        "src": "299:1753:85"
      }
    ],
    "src": "0:2053:85"
  },
  "legacyAST": {
    "absolutePath": "openzeppelin-solidity/contracts/cryptography/ECDSA.sol",
    "exportedSymbols": {
      "ECDSA": [
        22790
      ]
    },
    "id": 22791,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 22711,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:85"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@title Elliptic curve signature operations\n@dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d\nTODO Remove this library once solidity supports passing a signature to ecrecover.\nSee https://github.com/ethereum/solidity/issues/864",
        "fullyImplemented": true,
        "id": 22790,
        "linearizedBaseContracts": [
          22790
        ],
        "name": "ECDSA",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 22772,
              "nodeType": "Block",
              "src": "696:939:85",
              "statements": [
                {
                  "assignments": [
                    22721
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 22721,
                      "name": "r",
                      "nodeType": "VariableDeclaration",
                      "scope": 22772,
                      "src": "706:9:85",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 22720,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "706:7:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 22722,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "706:9:85"
                },
                {
                  "assignments": [
                    22724
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 22724,
                      "name": "s",
                      "nodeType": "VariableDeclaration",
                      "scope": 22772,
                      "src": "725:9:85",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 22723,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "725:7:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 22725,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "725:9:85"
                },
                {
                  "assignments": [
                    22727
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 22727,
                      "name": "v",
                      "nodeType": "VariableDeclaration",
                      "scope": 22772,
                      "src": "744:7:85",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 22726,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "744:5:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 22728,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "744:7:85"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 22732,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 22729,
                        "name": "signature",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22715,
                        "src": "804:9:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 22730,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "804:16:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3635",
                      "id": 22731,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "824:2:85",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_65_by_1",
                        "typeString": "int_const 65"
                      },
                      "value": "65"
                    },
                    "src": "804:22:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 22739,
                  "nodeType": "IfStatement",
                  "src": "800:72:85",
                  "trueBody": {
                    "id": 22738,
                    "nodeType": "Block",
                    "src": "828:44:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 22734,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "858:1:85",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 22733,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "850:7:85",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 22735,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "850:10:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "id": 22736,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "849:12:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "functionReturnParameters": 22719,
                        "id": 22737,
                        "nodeType": "Return",
                        "src": "842:19:85"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "r": {
                        "declaration": 22721,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1140:1:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "signature": {
                        "declaration": 22715,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1155:9:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "v": {
                        "declaration": 22727,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1230:1:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "s": {
                        "declaration": 22724,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1185:1:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "signature": {
                        "declaration": 22715,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1200:9:85",
                        "valueSize": 1
                      }
                    },
                    {
                      "signature": {
                        "declaration": 22715,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1253:9:85",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 22740,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    r := mload(add(signature, 0x20))\n    s := mload(add(signature, 0x40))\n    v := byte(0, mload(add(signature, 0x60)))\n}",
                  "src": "1117:267:85"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 22743,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 22741,
                      "name": "v",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 22727,
                      "src": "1386:1:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3237",
                      "id": 22742,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1390:2:85",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_27_by_1",
                        "typeString": "int_const 27"
                      },
                      "value": "27"
                    },
                    "src": "1386:6:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 22749,
                  "nodeType": "IfStatement",
                  "src": "1382:44:85",
                  "trueBody": {
                    "id": 22748,
                    "nodeType": "Block",
                    "src": "1394:32:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 22746,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 22744,
                            "name": "v",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22727,
                            "src": "1408:1:85",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3237",
                            "id": 22745,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1413:2:85",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_27_by_1",
                              "typeString": "int_const 27"
                            },
                            "value": "27"
                          },
                          "src": "1408:7:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 22747,
                        "nodeType": "ExpressionStatement",
                        "src": "1408:7:85"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 22756,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 22752,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 22750,
                        "name": "v",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22727,
                        "src": "1503:1:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3237",
                        "id": 22751,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1508:2:85",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_27_by_1",
                          "typeString": "int_const 27"
                        },
                        "value": "27"
                      },
                      "src": "1503:7:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 22755,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 22753,
                        "name": "v",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22727,
                        "src": "1514:1:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3238",
                        "id": 22754,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1519:2:85",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_28_by_1",
                          "typeString": "int_const 28"
                        },
                        "value": "28"
                      },
                      "src": "1514:7:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1503:18:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 22770,
                    "nodeType": "Block",
                    "src": "1573:56:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 22764,
                              "name": "hash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22713,
                              "src": "1604:4:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 22765,
                              "name": "v",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22727,
                              "src": "1610:1:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 22766,
                              "name": "r",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22721,
                              "src": "1613:1:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 22767,
                              "name": "s",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22724,
                              "src": "1616:1:85",
                              "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": 22763,
                            "name": "ecrecover",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 23682,
                            "src": "1594:9:85",
                            "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": 22768,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1594:24:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 22719,
                        "id": 22769,
                        "nodeType": "Return",
                        "src": "1587:31:85"
                      }
                    ]
                  },
                  "id": 22771,
                  "nodeType": "IfStatement",
                  "src": "1499:130:85",
                  "trueBody": {
                    "id": 22762,
                    "nodeType": "Block",
                    "src": "1523:44:85",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 22758,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1553:1:85",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 22757,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1545:7:85",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 22759,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1545:10:85",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "id": 22760,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1544:12:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "functionReturnParameters": 22719,
                        "id": 22761,
                        "nodeType": "Return",
                        "src": "1537:19:85"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Recover signer address from a message by using their signature\n@param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n@param signature bytes signature, the signature is generated using web3.eth.sign()",
            "id": 22773,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "recover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 22716,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22713,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 22773,
                  "src": "626:12:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 22712,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "626:7:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 22715,
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "scope": 22773,
                  "src": "640:22:85",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 22714,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "640:5:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "625:38:85"
            },
            "returnParameters": {
              "id": 22719,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22718,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 22773,
                  "src": "687:7:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 22717,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "687:7:85",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "686:9:85"
            },
            "scope": 22790,
            "src": "609:1026:85",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 22788,
              "nodeType": "Block",
              "src": "1863:187:85",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
                            "id": 22783,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "string",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2001:34:85",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                              "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
                            },
                            "value": "\u0019Ethereum Signed Message:\n32"
                          },
                          {
                            "argumentTypes": null,
                            "id": 22784,
                            "name": "hash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22775,
                            "src": "2037:4:85",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                              "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
                            },
                            {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 22781,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 23677,
                            "src": "1984:3:85",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 22782,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1984:16:85",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 22785,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1984:58:85",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 22780,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 23684,
                      "src": "1974:9:85",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 22786,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:69:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 22779,
                  "id": 22787,
                  "nodeType": "Return",
                  "src": "1967:76:85"
                }
              ]
            },
            "documentation": "toEthSignedMessageHash\n@dev prefix a bytes32 value with \"\\x19Ethereum Signed Message:\"\nand hash the result",
            "id": 22789,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toEthSignedMessageHash",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 22776,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22775,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 22789,
                  "src": "1817:12:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 22774,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1817:7:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1816:14:85"
            },
            "returnParameters": {
              "id": 22779,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 22778,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 22789,
                  "src": "1854:7:85",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 22777,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1854:7:85",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1853:9:85"
            },
            "scope": 22790,
            "src": "1785:265:85",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 22791,
        "src": "299:1753:85"
      }
    ],
    "src": "0:2053:85"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.4+commit.9549d8ff.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.9",
  "updatedAt": "2019-05-28T21:12:52.509Z",
  "devdoc": {
    "details": "Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d TODO Remove this library once solidity supports passing a signature to ecrecover. See https://github.com/ethereum/solidity/issues/864",
    "methods": {},
    "title": "Elliptic curve signature operations"
  },
  "userdoc": {
    "methods": {}
  }
}