{
  "contractName": "TypedSignature",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"dYdX * Library to unparse typed signatures\",\"methods\":{},\"title\":\"TypedSignature\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/lib/TypedSignature.sol\":\"TypedSignature\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/lib/TypedSignature.sol\":{\"keccak256\":\"0x4b4eb5fd2869d6c410948f78163773442c11bc82e393307e41359bbdb21577bf\",\"urls\":[\"bzz-raw://9c9c3abae44173086bc08f5479fbc67151d5905f60e1032ec6f9e40f841f3365\",\"dweb:/ipfs/QmbsQRX3gmcpimjFEW5ULJVavHQtViyg7NSQ2Q8Qcu6F6V\"]},\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/protocol/lib/Require.sol\":{\"keccak256\":\"0x05a2a90b41b6a5f42f0a72da63d015fb0b406a9ba2172823352e522e8bf3a606\",\"urls\":[\"bzz-raw://19883f0c6d33266f756ec5c3d17539524aa24b993c46c33f8400801d09373a6c\",\"dweb:/ipfs/QmYX2fwK3vQQDSZLMrc5wMfeb8RWrcC9CGX8XECLty8QDk\"]}},\"version\":1}",
  "bytecode": "0x60636023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea365627a7a723158201968238cf2318432d5c8e7e39b563629e8cafeffc5bde0fb7fe8af76e3fa4fa76c6578706572696d656e74616cf564736f6c63430005100040",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea365627a7a723158201968238cf2318432d5c8e7e39b563629e8cafeffc5bde0fb7fe8af76e3fa4fa76c6578706572696d656e74616cf564736f6c63430005100040",
  "sourceMap": "813:2931:39:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24",
  "deployedSourceMap": "813:2931:39:-;;;;;;;;",
  "source": "/*\n\n    Copyright 2019 dYdX Trading Inc.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n*/\n\npragma solidity ^0.5.7;\npragma experimental ABIEncoderV2;\n\nimport { Require } from \"../../protocol/lib/Require.sol\";\n\n\n/**\n * @title TypedSignature\n * @author dYdX\n *\n * Library to unparse typed signatures\n */\nlibrary TypedSignature {\n\n    // ============ Constants ============\n\n    bytes32 constant private FILE = \"TypedSignature\";\n\n    // prepended message with the length of the signed hash in decimal\n    bytes constant private PREPEND_DEC = \"\\x19Ethereum Signed Message:\\n32\";\n\n    // prepended message with the length of the signed hash in hexadecimal\n    bytes constant private PREPEND_HEX = \"\\x19Ethereum Signed Message:\\n\\x20\";\n\n    // Number of bytes in a typed signature\n    uint256 constant private NUM_SIGNATURE_BYTES = 66;\n\n    // ============ Enums ============\n\n    // Different RPC providers may implement signing methods differently, so we allow different\n    // signature types depending on the string prepended to a hash before it was signed.\n    enum SignatureType {\n        NoPrepend,   // No string was prepended.\n        Decimal,     // PREPEND_DEC was prepended.\n        Hexadecimal, // PREPEND_HEX was prepended.\n        Invalid      // Not a valid type. Used for bound-checking.\n    }\n\n    // ============ Functions ============\n\n    /**\n     * Gives the address of the signer of a hash. Also allows for the commonly prepended string of\n     * '\\x19Ethereum Signed Message:\\n' + message.length\n     *\n     * @param  hash               Hash that was signed (does not include prepended message)\n     * @param  signatureWithType  Type and ECDSA signature with structure: {32:r}{32:s}{1:v}{1:type}\n     * @return                    address of the signer of the hash\n     */\n    function recover(\n        bytes32 hash,\n        bytes memory signatureWithType\n    )\n        internal\n        pure\n        returns (address)\n    {\n        Require.that(\n            signatureWithType.length == NUM_SIGNATURE_BYTES,\n            FILE,\n            \"Invalid signature length\"\n        );\n\n        bytes32 r;\n        bytes32 s;\n        uint8 v;\n        uint8 rawSigType;\n\n        /* solium-disable-next-line security/no-inline-assembly */\n        assembly {\n            r := mload(add(signatureWithType, 0x20))\n            s := mload(add(signatureWithType, 0x40))\n            let lastSlot := mload(add(signatureWithType, 0x60))\n            v := byte(0, lastSlot)\n            rawSigType := byte(1, lastSlot)\n        }\n\n        Require.that(\n            rawSigType < uint8(SignatureType.Invalid),\n            FILE,\n            \"Invalid signature type\"\n        );\n\n        SignatureType sigType = SignatureType(rawSigType);\n\n        bytes32 signedHash;\n        if (sigType == SignatureType.NoPrepend) {\n            signedHash = hash;\n        } else if (sigType == SignatureType.Decimal) {\n            signedHash = keccak256(abi.encodePacked(PREPEND_DEC, hash));\n        } else {\n            assert(sigType == SignatureType.Hexadecimal);\n            signedHash = keccak256(abi.encodePacked(PREPEND_HEX, hash));\n        }\n\n        return ecrecover(\n            signedHash,\n            v,\n            r,\n            s\n        );\n    }\n}\n",
  "sourcePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/lib/TypedSignature.sol",
  "ast": {
    "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/lib/TypedSignature.sol",
    "exportedSymbols": {
      "TypedSignature": [
        6204
      ]
    },
    "id": 6205,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6076,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".7"
        ],
        "nodeType": "PragmaDirective",
        "src": "603:23:39"
      },
      {
        "id": 6077,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "627:33:39"
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/protocol/lib/Require.sol",
        "file": "../../protocol/lib/Require.sol",
        "id": 6079,
        "nodeType": "ImportDirective",
        "scope": 6205,
        "sourceUnit": 28453,
        "src": "662:57:39",
        "symbolAliases": [
          {
            "foreign": 6078,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@title TypedSignature\n@author dYdX\n * Library to unparse typed signatures",
        "fullyImplemented": true,
        "id": 6204,
        "linearizedBaseContracts": [
          6204
        ],
        "name": "TypedSignature",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 6082,
            "name": "FILE",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "887:48:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 6080,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "887:7:39",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "54797065645369676e6174757265",
              "id": 6081,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "919:16:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_32da92ebc86f808a5601596b8b0f1f799e40f65ecd790694e20fa629c06befde",
                "typeString": "literal_string \"TypedSignature\""
              },
              "value": "TypedSignature"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 6085,
            "name": "PREPEND_DEC",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "1013:71:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes_memory",
              "typeString": "bytes"
            },
            "typeName": {
              "id": 6083,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "1013:5:39",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
              "id": 6084,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1050:34:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
              },
              "value": "\u0019Ethereum Signed Message:\n32"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 6088,
            "name": "PREPEND_HEX",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "1166:73:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes_memory",
              "typeString": "bytes"
            },
            "typeName": {
              "id": 6086,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "1166:5:39",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a20",
              "id": 6087,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1203:36:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_db0c25319566d7151361170a8ff7fb553c7c592a3dc686e05c1444deb22accdd",
                "typeString": "literal_string \"\u0019Ethereum Signed Message:\n \""
              },
              "value": "\u0019Ethereum Signed Message:\n "
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 6091,
            "name": "NUM_SIGNATURE_BYTES",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "1290:49:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 6089,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1290:7:39",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "3636",
              "id": 6090,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1337:2:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_66_by_1",
                "typeString": "int_const 66"
              },
              "value": "66"
            },
            "visibility": "private"
          },
          {
            "canonicalName": "TypedSignature.SignatureType",
            "id": 6096,
            "members": [
              {
                "id": 6092,
                "name": "NoPrepend",
                "nodeType": "EnumValue",
                "src": "1600:9:39"
              },
              {
                "id": 6093,
                "name": "Decimal",
                "nodeType": "EnumValue",
                "src": "1649:7:39"
              },
              {
                "id": 6094,
                "name": "Hexadecimal",
                "nodeType": "EnumValue",
                "src": "1700:11:39"
              },
              {
                "id": 6095,
                "name": "Invalid",
                "nodeType": "EnumValue",
                "src": "1751:7:39"
              }
            ],
            "name": "SignatureType",
            "nodeType": "EnumDefinition",
            "src": "1571:244:39"
          },
          {
            "body": {
              "id": 6202,
              "nodeType": "Block",
              "src": "2450:1292:39",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6111,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6108,
                            "name": "signatureWithType",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6100,
                            "src": "2486:17:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 6109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2486:24:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 6110,
                          "name": "NUM_SIGNATURE_BYTES",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6091,
                          "src": "2514:19:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2486:47:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6112,
                        "name": "FILE",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6082,
                        "src": "2547:4:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "496e76616c6964207369676e6174757265206c656e677468",
                        "id": 6113,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2565:26:39",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_d0e57016dfcfa997388e3f3d9ad75ea4d5a67a0f23b0489f2cdbaecf3ef0f78c",
                          "typeString": "literal_string \"Invalid signature length\""
                        },
                        "value": "Invalid signature length"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_d0e57016dfcfa997388e3f3d9ad75ea4d5a67a0f23b0489f2cdbaecf3ef0f78c",
                          "typeString": "literal_string \"Invalid signature length\""
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 6105,
                        "name": "Require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 28452,
                        "src": "2460:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Require_$28452_$",
                          "typeString": "type(library Require)"
                        }
                      },
                      "id": 6107,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "that",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 27816,
                      "src": "2460:12:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes32_$_t_bytes32_$returns$__$",
                        "typeString": "function (bool,bytes32,bytes32) pure"
                      }
                    },
                    "id": 6114,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2460:141:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6115,
                  "nodeType": "ExpressionStatement",
                  "src": "2460:141:39"
                },
                {
                  "assignments": [
                    6117
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6117,
                      "name": "r",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2612:9:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 6116,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "2612:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6118,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2612:9:39"
                },
                {
                  "assignments": [
                    6120
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6120,
                      "name": "s",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2631:9:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 6119,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "2631:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6121,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2631:9:39"
                },
                {
                  "assignments": [
                    6123
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6123,
                      "name": "v",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2650:7:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 6122,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2650:5:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6124,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2650:7:39"
                },
                {
                  "assignments": [
                    6126
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6126,
                      "name": "rawSigType",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2667:16:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 6125,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2667:5:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6127,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2667:16:39"
                },
                {
                  "externalReferences": [
                    {
                      "r": {
                        "declaration": 6117,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2784:1:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "signatureWithType": {
                        "declaration": 6100,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2799:17:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "s": {
                        "declaration": 6120,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2837:1:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "signatureWithType": {
                        "declaration": 6100,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2852:17:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "signatureWithType": {
                        "declaration": 6100,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2916:17:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "v": {
                        "declaration": 6123,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2954:1:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "rawSigType": {
                        "declaration": 6126,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2989:10:39",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 6128,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    r := mload(add(signatureWithType, 0x20))\n    s := mload(add(signatureWithType, 0x40))\n    let lastSlot := mload(add(signatureWithType, 0x60))\n    v := byte(0, lastSlot)\n    rawSigType := byte(1, lastSlot)\n}",
                  "src": "2761:269:39"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "id": 6137,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 6132,
                          "name": "rawSigType",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6126,
                          "src": "3066:10:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 6134,
                                "name": "SignatureType",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6096,
                                "src": "3085:13:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                                  "typeString": "type(enum TypedSignature.SignatureType)"
                                }
                              },
                              "id": 6135,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "Invalid",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "3085:21:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SignatureType_$6096",
                                "typeString": "enum TypedSignature.SignatureType"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_SignatureType_$6096",
                                "typeString": "enum TypedSignature.SignatureType"
                              }
                            ],
                            "id": 6133,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "3079:5:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint8_$",
                              "typeString": "type(uint8)"
                            },
                            "typeName": "uint8"
                          },
                          "id": 6136,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3079:28:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "3066:41:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6138,
                        "name": "FILE",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6082,
                        "src": "3121:4:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "496e76616c6964207369676e61747572652074797065",
                        "id": 6139,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3139:24:39",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_28f12df7f381e785c864bf191dba12625917d5290b5425f4d7cf84a50611f726",
                          "typeString": "literal_string \"Invalid signature type\""
                        },
                        "value": "Invalid signature type"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_28f12df7f381e785c864bf191dba12625917d5290b5425f4d7cf84a50611f726",
                          "typeString": "literal_string \"Invalid signature type\""
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 6129,
                        "name": "Require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 28452,
                        "src": "3040:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Require_$28452_$",
                          "typeString": "type(library Require)"
                        }
                      },
                      "id": 6131,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "that",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 27816,
                      "src": "3040:12:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes32_$_t_bytes32_$returns$__$",
                        "typeString": "function (bool,bytes32,bytes32) pure"
                      }
                    },
                    "id": 6140,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3040:133:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6141,
                  "nodeType": "ExpressionStatement",
                  "src": "3040:133:39"
                },
                {
                  "assignments": [
                    6143
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6143,
                      "name": "sigType",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "3184:21:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 6142,
                        "name": "SignatureType",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 6096,
                        "src": "3184:13:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SignatureType_$6096",
                          "typeString": "enum TypedSignature.SignatureType"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6147,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6145,
                        "name": "rawSigType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6126,
                        "src": "3222:10:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 6144,
                      "name": "SignatureType",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6096,
                      "src": "3208:13:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                        "typeString": "type(enum TypedSignature.SignatureType)"
                      }
                    },
                    "id": 6146,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3208:25:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_SignatureType_$6096",
                      "typeString": "enum TypedSignature.SignatureType"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3184:49:39"
                },
                {
                  "assignments": [
                    6149
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6149,
                      "name": "signedHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "3244:18:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 6148,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "3244:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6150,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3244:18:39"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_enum$_SignatureType_$6096",
                      "typeString": "enum TypedSignature.SignatureType"
                    },
                    "id": 6154,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 6151,
                      "name": "sigType",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6143,
                      "src": "3276:7:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6152,
                        "name": "SignatureType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6096,
                        "src": "3287:13:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                          "typeString": "type(enum TypedSignature.SignatureType)"
                        }
                      },
                      "id": 6153,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "NoPrepend",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3287:23:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      }
                    },
                    "src": "3276:34:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      },
                      "id": 6163,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 6160,
                        "name": "sigType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6143,
                        "src": "3364:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SignatureType_$6096",
                          "typeString": "enum TypedSignature.SignatureType"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 6161,
                          "name": "SignatureType",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6096,
                          "src": "3375:13:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                            "typeString": "type(enum TypedSignature.SignatureType)"
                          }
                        },
                        "id": 6162,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "Decimal",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3375:21:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SignatureType_$6096",
                          "typeString": "enum TypedSignature.SignatureType"
                        }
                      },
                      "src": "3364:32:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 6192,
                      "nodeType": "Block",
                      "src": "3488:142:39",
                      "statements": [
                        {
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_enum$_SignatureType_$6096",
                                  "typeString": "enum TypedSignature.SignatureType"
                                },
                                "id": 6179,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 6176,
                                  "name": "sigType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6143,
                                  "src": "3509:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SignatureType_$6096",
                                    "typeString": "enum TypedSignature.SignatureType"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 6177,
                                    "name": "SignatureType",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6096,
                                    "src": "3520:13:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                                      "typeString": "type(enum TypedSignature.SignatureType)"
                                    }
                                  },
                                  "id": 6178,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "Hexadecimal",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": null,
                                  "src": "3520:25:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SignatureType_$6096",
                                    "typeString": "enum TypedSignature.SignatureType"
                                  }
                                },
                                "src": "3509:36:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "id": 6175,
                              "name": "assert",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 38096,
                              "src": "3502:6:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
                                "typeString": "function (bool) pure"
                              }
                            },
                            "id": 6180,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3502:44:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$",
                              "typeString": "tuple()"
                            }
                          },
                          "id": 6181,
                          "nodeType": "ExpressionStatement",
                          "src": "3502:44:39"
                        },
                        {
                          "expression": {
                            "argumentTypes": null,
                            "id": 6190,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 6182,
                              "name": "signedHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6149,
                              "src": "3560:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 6186,
                                      "name": "PREPEND_HEX",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6088,
                                      "src": "3600:11:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 6187,
                                      "name": "hash",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6098,
                                      "src": "3613:4:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 6184,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 38094,
                                      "src": "3583:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 6185,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "3583:16:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 6188,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3583:35:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                ],
                                "id": 6183,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 38101,
                                "src": "3573:9:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 6189,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3573:46:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3560:59:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 6191,
                          "nodeType": "ExpressionStatement",
                          "src": "3560:59:39"
                        }
                      ]
                    },
                    "id": 6193,
                    "nodeType": "IfStatement",
                    "src": "3360:270:39",
                    "trueBody": {
                      "id": 6174,
                      "nodeType": "Block",
                      "src": "3398:84:39",
                      "statements": [
                        {
                          "expression": {
                            "argumentTypes": null,
                            "id": 6172,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 6164,
                              "name": "signedHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6149,
                              "src": "3412:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 6168,
                                      "name": "PREPEND_DEC",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6085,
                                      "src": "3452:11:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 6169,
                                      "name": "hash",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6098,
                                      "src": "3465:4:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 6166,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 38094,
                                      "src": "3435:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 6167,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "3435:16:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 6170,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3435:35:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                ],
                                "id": 6165,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 38101,
                                "src": "3425:9:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 6171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3425:46:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3412:59:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 6173,
                          "nodeType": "ExpressionStatement",
                          "src": "3412:59:39"
                        }
                      ]
                    }
                  },
                  "id": 6194,
                  "nodeType": "IfStatement",
                  "src": "3272:358:39",
                  "trueBody": {
                    "id": 6159,
                    "nodeType": "Block",
                    "src": "3312:42:39",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 6157,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 6155,
                            "name": "signedHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6149,
                            "src": "3326:10:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 6156,
                            "name": "hash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6098,
                            "src": "3339:4:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "3326:17:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 6158,
                        "nodeType": "ExpressionStatement",
                        "src": "3326:17:39"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6196,
                        "name": "signedHash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6149,
                        "src": "3670:10:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6197,
                        "name": "v",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6123,
                        "src": "3694:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6198,
                        "name": "r",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6117,
                        "src": "3709:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6199,
                        "name": "s",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6120,
                        "src": "3724:1:39",
                        "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": 6195,
                      "name": "ecrecover",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 38099,
                      "src": "3647:9:39",
                      "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": 6200,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3647:88:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 6104,
                  "id": 6201,
                  "nodeType": "Return",
                  "src": "3640:95:39"
                }
              ]
            },
            "documentation": "Gives the address of the signer of a hash. Also allows for the commonly prepended string of\n'\\x19Ethereum Signed Message:\\n' + message.length\n     * @param  hash               Hash that was signed (does not include prepended message)\n@param  signatureWithType  Type and ECDSA signature with structure: {32:r}{32:s}{1:v}{1:type}\n@return                    address of the signer of the hash",
            "id": 6203,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "recover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6098,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 6203,
                  "src": "2331:12:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6097,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2331:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6100,
                  "name": "signatureWithType",
                  "nodeType": "VariableDeclaration",
                  "scope": 6203,
                  "src": "2353:30:39",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6099,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2353:5:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2321:68:39"
            },
            "returnParameters": {
              "id": 6104,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6103,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6203,
                  "src": "2437:7:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6102,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2437:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2436:9:39"
            },
            "scope": 6204,
            "src": "2305:1437:39",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 6205,
        "src": "813:2931:39"
      }
    ],
    "src": "603:3142:39"
  },
  "legacyAST": {
    "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/lib/TypedSignature.sol",
    "exportedSymbols": {
      "TypedSignature": [
        6204
      ]
    },
    "id": 6205,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6076,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".7"
        ],
        "nodeType": "PragmaDirective",
        "src": "603:23:39"
      },
      {
        "id": 6077,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "627:33:39"
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/protocol/lib/Require.sol",
        "file": "../../protocol/lib/Require.sol",
        "id": 6079,
        "nodeType": "ImportDirective",
        "scope": 6205,
        "sourceUnit": 28453,
        "src": "662:57:39",
        "symbolAliases": [
          {
            "foreign": 6078,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@title TypedSignature\n@author dYdX\n * Library to unparse typed signatures",
        "fullyImplemented": true,
        "id": 6204,
        "linearizedBaseContracts": [
          6204
        ],
        "name": "TypedSignature",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 6082,
            "name": "FILE",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "887:48:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 6080,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "887:7:39",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "54797065645369676e6174757265",
              "id": 6081,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "919:16:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_32da92ebc86f808a5601596b8b0f1f799e40f65ecd790694e20fa629c06befde",
                "typeString": "literal_string \"TypedSignature\""
              },
              "value": "TypedSignature"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 6085,
            "name": "PREPEND_DEC",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "1013:71:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes_memory",
              "typeString": "bytes"
            },
            "typeName": {
              "id": 6083,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "1013:5:39",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
              "id": 6084,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1050:34:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
                "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
              },
              "value": "\u0019Ethereum Signed Message:\n32"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 6088,
            "name": "PREPEND_HEX",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "1166:73:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes_memory",
              "typeString": "bytes"
            },
            "typeName": {
              "id": 6086,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "1166:5:39",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a20",
              "id": 6087,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1203:36:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_db0c25319566d7151361170a8ff7fb553c7c592a3dc686e05c1444deb22accdd",
                "typeString": "literal_string \"\u0019Ethereum Signed Message:\n \""
              },
              "value": "\u0019Ethereum Signed Message:\n "
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 6091,
            "name": "NUM_SIGNATURE_BYTES",
            "nodeType": "VariableDeclaration",
            "scope": 6204,
            "src": "1290:49:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 6089,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1290:7:39",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "3636",
              "id": 6090,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1337:2:39",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_66_by_1",
                "typeString": "int_const 66"
              },
              "value": "66"
            },
            "visibility": "private"
          },
          {
            "canonicalName": "TypedSignature.SignatureType",
            "id": 6096,
            "members": [
              {
                "id": 6092,
                "name": "NoPrepend",
                "nodeType": "EnumValue",
                "src": "1600:9:39"
              },
              {
                "id": 6093,
                "name": "Decimal",
                "nodeType": "EnumValue",
                "src": "1649:7:39"
              },
              {
                "id": 6094,
                "name": "Hexadecimal",
                "nodeType": "EnumValue",
                "src": "1700:11:39"
              },
              {
                "id": 6095,
                "name": "Invalid",
                "nodeType": "EnumValue",
                "src": "1751:7:39"
              }
            ],
            "name": "SignatureType",
            "nodeType": "EnumDefinition",
            "src": "1571:244:39"
          },
          {
            "body": {
              "id": 6202,
              "nodeType": "Block",
              "src": "2450:1292:39",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6111,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6108,
                            "name": "signatureWithType",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6100,
                            "src": "2486:17:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 6109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2486:24:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 6110,
                          "name": "NUM_SIGNATURE_BYTES",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6091,
                          "src": "2514:19:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2486:47:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6112,
                        "name": "FILE",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6082,
                        "src": "2547:4:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "496e76616c6964207369676e6174757265206c656e677468",
                        "id": 6113,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2565:26:39",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_d0e57016dfcfa997388e3f3d9ad75ea4d5a67a0f23b0489f2cdbaecf3ef0f78c",
                          "typeString": "literal_string \"Invalid signature length\""
                        },
                        "value": "Invalid signature length"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_d0e57016dfcfa997388e3f3d9ad75ea4d5a67a0f23b0489f2cdbaecf3ef0f78c",
                          "typeString": "literal_string \"Invalid signature length\""
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 6105,
                        "name": "Require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 28452,
                        "src": "2460:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Require_$28452_$",
                          "typeString": "type(library Require)"
                        }
                      },
                      "id": 6107,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "that",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 27816,
                      "src": "2460:12:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes32_$_t_bytes32_$returns$__$",
                        "typeString": "function (bool,bytes32,bytes32) pure"
                      }
                    },
                    "id": 6114,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2460:141:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6115,
                  "nodeType": "ExpressionStatement",
                  "src": "2460:141:39"
                },
                {
                  "assignments": [
                    6117
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6117,
                      "name": "r",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2612:9:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 6116,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "2612:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6118,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2612:9:39"
                },
                {
                  "assignments": [
                    6120
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6120,
                      "name": "s",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2631:9:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 6119,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "2631:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6121,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2631:9:39"
                },
                {
                  "assignments": [
                    6123
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6123,
                      "name": "v",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2650:7:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 6122,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2650:5:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6124,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2650:7:39"
                },
                {
                  "assignments": [
                    6126
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6126,
                      "name": "rawSigType",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "2667:16:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 6125,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2667:5:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6127,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2667:16:39"
                },
                {
                  "externalReferences": [
                    {
                      "r": {
                        "declaration": 6117,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2784:1:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "signatureWithType": {
                        "declaration": 6100,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2799:17:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "s": {
                        "declaration": 6120,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2837:1:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "signatureWithType": {
                        "declaration": 6100,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2852:17:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "signatureWithType": {
                        "declaration": 6100,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2916:17:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "v": {
                        "declaration": 6123,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2954:1:39",
                        "valueSize": 1
                      }
                    },
                    {
                      "rawSigType": {
                        "declaration": 6126,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2989:10:39",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 6128,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    r := mload(add(signatureWithType, 0x20))\n    s := mload(add(signatureWithType, 0x40))\n    let lastSlot := mload(add(signatureWithType, 0x60))\n    v := byte(0, lastSlot)\n    rawSigType := byte(1, lastSlot)\n}",
                  "src": "2761:269:39"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "id": 6137,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 6132,
                          "name": "rawSigType",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6126,
                          "src": "3066:10:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 6134,
                                "name": "SignatureType",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6096,
                                "src": "3085:13:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                                  "typeString": "type(enum TypedSignature.SignatureType)"
                                }
                              },
                              "id": 6135,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "Invalid",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "3085:21:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SignatureType_$6096",
                                "typeString": "enum TypedSignature.SignatureType"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_SignatureType_$6096",
                                "typeString": "enum TypedSignature.SignatureType"
                              }
                            ],
                            "id": 6133,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "3079:5:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint8_$",
                              "typeString": "type(uint8)"
                            },
                            "typeName": "uint8"
                          },
                          "id": 6136,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3079:28:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "3066:41:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6138,
                        "name": "FILE",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6082,
                        "src": "3121:4:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "496e76616c6964207369676e61747572652074797065",
                        "id": 6139,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3139:24:39",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_28f12df7f381e785c864bf191dba12625917d5290b5425f4d7cf84a50611f726",
                          "typeString": "literal_string \"Invalid signature type\""
                        },
                        "value": "Invalid signature type"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_28f12df7f381e785c864bf191dba12625917d5290b5425f4d7cf84a50611f726",
                          "typeString": "literal_string \"Invalid signature type\""
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 6129,
                        "name": "Require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 28452,
                        "src": "3040:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Require_$28452_$",
                          "typeString": "type(library Require)"
                        }
                      },
                      "id": 6131,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "that",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 27816,
                      "src": "3040:12:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes32_$_t_bytes32_$returns$__$",
                        "typeString": "function (bool,bytes32,bytes32) pure"
                      }
                    },
                    "id": 6140,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3040:133:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6141,
                  "nodeType": "ExpressionStatement",
                  "src": "3040:133:39"
                },
                {
                  "assignments": [
                    6143
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6143,
                      "name": "sigType",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "3184:21:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 6142,
                        "name": "SignatureType",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 6096,
                        "src": "3184:13:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SignatureType_$6096",
                          "typeString": "enum TypedSignature.SignatureType"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6147,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6145,
                        "name": "rawSigType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6126,
                        "src": "3222:10:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 6144,
                      "name": "SignatureType",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6096,
                      "src": "3208:13:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                        "typeString": "type(enum TypedSignature.SignatureType)"
                      }
                    },
                    "id": 6146,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3208:25:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_SignatureType_$6096",
                      "typeString": "enum TypedSignature.SignatureType"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3184:49:39"
                },
                {
                  "assignments": [
                    6149
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6149,
                      "name": "signedHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 6202,
                      "src": "3244:18:39",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 6148,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "3244:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6150,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3244:18:39"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_enum$_SignatureType_$6096",
                      "typeString": "enum TypedSignature.SignatureType"
                    },
                    "id": 6154,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 6151,
                      "name": "sigType",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6143,
                      "src": "3276:7:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6152,
                        "name": "SignatureType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6096,
                        "src": "3287:13:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                          "typeString": "type(enum TypedSignature.SignatureType)"
                        }
                      },
                      "id": 6153,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "NoPrepend",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3287:23:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      }
                    },
                    "src": "3276:34:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_enum$_SignatureType_$6096",
                        "typeString": "enum TypedSignature.SignatureType"
                      },
                      "id": 6163,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 6160,
                        "name": "sigType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6143,
                        "src": "3364:7:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SignatureType_$6096",
                          "typeString": "enum TypedSignature.SignatureType"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 6161,
                          "name": "SignatureType",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6096,
                          "src": "3375:13:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                            "typeString": "type(enum TypedSignature.SignatureType)"
                          }
                        },
                        "id": 6162,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "Decimal",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3375:21:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SignatureType_$6096",
                          "typeString": "enum TypedSignature.SignatureType"
                        }
                      },
                      "src": "3364:32:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 6192,
                      "nodeType": "Block",
                      "src": "3488:142:39",
                      "statements": [
                        {
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_enum$_SignatureType_$6096",
                                  "typeString": "enum TypedSignature.SignatureType"
                                },
                                "id": 6179,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 6176,
                                  "name": "sigType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6143,
                                  "src": "3509:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SignatureType_$6096",
                                    "typeString": "enum TypedSignature.SignatureType"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 6177,
                                    "name": "SignatureType",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6096,
                                    "src": "3520:13:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_SignatureType_$6096_$",
                                      "typeString": "type(enum TypedSignature.SignatureType)"
                                    }
                                  },
                                  "id": 6178,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "Hexadecimal",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": null,
                                  "src": "3520:25:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SignatureType_$6096",
                                    "typeString": "enum TypedSignature.SignatureType"
                                  }
                                },
                                "src": "3509:36:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "id": 6175,
                              "name": "assert",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 38096,
                              "src": "3502:6:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
                                "typeString": "function (bool) pure"
                              }
                            },
                            "id": 6180,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3502:44:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$",
                              "typeString": "tuple()"
                            }
                          },
                          "id": 6181,
                          "nodeType": "ExpressionStatement",
                          "src": "3502:44:39"
                        },
                        {
                          "expression": {
                            "argumentTypes": null,
                            "id": 6190,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 6182,
                              "name": "signedHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6149,
                              "src": "3560:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 6186,
                                      "name": "PREPEND_HEX",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6088,
                                      "src": "3600:11:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 6187,
                                      "name": "hash",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6098,
                                      "src": "3613:4:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 6184,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 38094,
                                      "src": "3583:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 6185,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "3583:16:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 6188,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3583:35:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                ],
                                "id": 6183,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 38101,
                                "src": "3573:9:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 6189,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3573:46:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3560:59:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 6191,
                          "nodeType": "ExpressionStatement",
                          "src": "3560:59:39"
                        }
                      ]
                    },
                    "id": 6193,
                    "nodeType": "IfStatement",
                    "src": "3360:270:39",
                    "trueBody": {
                      "id": 6174,
                      "nodeType": "Block",
                      "src": "3398:84:39",
                      "statements": [
                        {
                          "expression": {
                            "argumentTypes": null,
                            "id": 6172,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 6164,
                              "name": "signedHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6149,
                              "src": "3412:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 6168,
                                      "name": "PREPEND_DEC",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6085,
                                      "src": "3452:11:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 6169,
                                      "name": "hash",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6098,
                                      "src": "3465:4:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 6166,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 38094,
                                      "src": "3435:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 6167,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "3435:16:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 6170,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3435:35:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                ],
                                "id": 6165,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 38101,
                                "src": "3425:9:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 6171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3425:46:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3412:59:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 6173,
                          "nodeType": "ExpressionStatement",
                          "src": "3412:59:39"
                        }
                      ]
                    }
                  },
                  "id": 6194,
                  "nodeType": "IfStatement",
                  "src": "3272:358:39",
                  "trueBody": {
                    "id": 6159,
                    "nodeType": "Block",
                    "src": "3312:42:39",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 6157,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 6155,
                            "name": "signedHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6149,
                            "src": "3326:10:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 6156,
                            "name": "hash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6098,
                            "src": "3339:4:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "3326:17:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 6158,
                        "nodeType": "ExpressionStatement",
                        "src": "3326:17:39"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6196,
                        "name": "signedHash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6149,
                        "src": "3670:10:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6197,
                        "name": "v",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6123,
                        "src": "3694:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6198,
                        "name": "r",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6117,
                        "src": "3709:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 6199,
                        "name": "s",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6120,
                        "src": "3724:1:39",
                        "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": 6195,
                      "name": "ecrecover",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 38099,
                      "src": "3647:9:39",
                      "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": 6200,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3647:88:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 6104,
                  "id": 6201,
                  "nodeType": "Return",
                  "src": "3640:95:39"
                }
              ]
            },
            "documentation": "Gives the address of the signer of a hash. Also allows for the commonly prepended string of\n'\\x19Ethereum Signed Message:\\n' + message.length\n     * @param  hash               Hash that was signed (does not include prepended message)\n@param  signatureWithType  Type and ECDSA signature with structure: {32:r}{32:s}{1:v}{1:type}\n@return                    address of the signer of the hash",
            "id": 6203,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "recover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6098,
                  "name": "hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 6203,
                  "src": "2331:12:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6097,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2331:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6100,
                  "name": "signatureWithType",
                  "nodeType": "VariableDeclaration",
                  "scope": 6203,
                  "src": "2353:30:39",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6099,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2353:5:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2321:68:39"
            },
            "returnParameters": {
              "id": 6104,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6103,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6203,
                  "src": "2437:7:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6102,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2437:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2436:9:39"
            },
            "scope": 6204,
            "src": "2305:1437:39",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 6205,
        "src": "813:2931:39"
      }
    ],
    "src": "603:3142:39"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.23",
  "updatedAt": "2026-03-02T16:38:28.587Z",
  "devdoc": {
    "author": "dYdX * Library to unparse typed signatures",
    "methods": {},
    "title": "TypedSignature"
  },
  "userdoc": {
    "methods": {}
  }
}