{
  "contractName": "ValidateSPV",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol\":\"ValidateSPV\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol\":{\"keccak256\":\"0xc63829e9d674bb7bb98b264aff17add28db3c19d3ee0ef49531663491af8b087\",\"urls\":[\"bzzr://9a76af9995e01cb82228d6827801929b4697eb83fc60b44faa00d5e62c69ee2d\",\"dweb:/ipfs/QmYRRfdW9qyerUaEyHSEi7LY7WymkKUQQ61YQdxVorGdNW\"]},\"@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol\":{\"keccak256\":\"0x16296b4a97cdac10bb9cd4666d29310fe25897b7644dc04ad053ae09d4aeea9c\",\"urls\":[\"bzzr://27b097b56c0dc070a4e80572e01ffc28d26d83490f56fe0947a4d62ab09e1c48\",\"dweb:/ipfs/QmXwiQCVL8MS3R2NDWwTozngTjrD3SmWmZ6fbNGgQiwdDd\"]},\"@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol\":{\"keccak256\":\"0x22d34c04c68c2a77ee83e2ef3756f6e6bad6ad675560d777e612315d7eb83935\",\"urls\":[\"bzzr://a3312aa9977669832679852788efb21430fa70e5779243861ac6400fdc72f3de\",\"dweb:/ipfs/QmWADdVTCSyvtgb76AxFFkAr9h9jbY57Mj5X6xiEqCqmMu\"]},\"@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol\":{\"keccak256\":\"0x1b26b6ec30dcf0adb9cd7a8035a6cf0a565e8e12f0adf9f0ccda1f6b78e453c1\",\"urls\":[\"bzzr://ac9acd02674dcf17e3d6b58322efbfb42111dac4332cd9ee31ba9c7b8aa9fb47\",\"dweb:/ipfs/QmcwStYYD1NMVRzwcRP4v6eCscbMLdpjp45itWnfBaVnkf\"]}},\"version\":1}",
  "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b0bc947528edc82fa980956c2900b774fb5d708c021412936e105b08fa7bfc1d64736f6c634300050a0032",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b0bc947528edc82fa980956c2900b774fb5d708c021412936e105b08fa7bfc1d64736f6c634300050a0032",
  "sourceMap": "218:9481:8:-;;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": "218:9481:8:-;;;;;;;;",
  "source": "pragma solidity ^0.5.10;\n\n/** @title ValidateSPV*/\n/** @author Summa (https://summa.one) */\n\nimport {BytesLib} from \"./BytesLib.sol\";\nimport {SafeMath} from \"./SafeMath.sol\";\nimport {BTCUtils} from \"./BTCUtils.sol\";\n\n\nlibrary ValidateSPV {\n\n    using BTCUtils for bytes;\n    using BTCUtils for uint256;\n    using BytesLib for bytes;\n    using SafeMath for uint256;\n\n    enum InputTypes { NONE, LEGACY, COMPATIBILITY, WITNESS }\n    enum OutputTypes { NONE, WPKH, WSH, OP_RETURN, PKH, SH, NONSTANDARD }\n\n    uint256 constant ERR_BAD_LENGTH = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n    uint256 constant ERR_INVALID_CHAIN = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe;\n    uint256 constant ERR_LOW_WORK = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd;\n\n    function getErrBadLength() internal pure returns (uint256) {\n        return ERR_BAD_LENGTH;\n    }\n\n    function getErrInvalidChain() internal pure returns (uint256) {\n        return ERR_INVALID_CHAIN;\n    }\n\n    function getErrLowWork() internal pure returns (uint256) {\n        return ERR_LOW_WORK;\n    }\n\n    /// @notice                     Validates a tx inclusion in the block\n    /// @param _txid                The txid (LE)\n    /// @param _merkleRoot          The merkle root (as in the block header)\n    /// @param _intermediateNodes   The proof's intermediate nodes (digests between leaf and root)\n    /// @param _index               The leaf's index in the tree (0-indexed)\n    /// @return                     true if fully valid, false otherwise\n    function prove(\n        bytes32 _txid,\n        bytes32 _merkleRoot,\n        bytes memory _intermediateNodes,\n        uint _index\n    ) internal pure returns (bool) {\n        // Shortcut the empty-block case\n        if (_txid == _merkleRoot && _index == 0 && _intermediateNodes.length == 0) {\n            return true;\n        }\n\n        bytes memory _proof = abi.encodePacked(_txid, _intermediateNodes, _merkleRoot);\n        // If the Merkle proof failed, bubble up error\n        return _proof.verifyHash256Merkle(_index);\n    }\n\n    /// @notice             Hashes transaction to get txid\n    /// @dev                Supports Legacy and Witness\n    /// @param _version     4-bytes version\n    /// @param _vin         Raw bytes length-prefixed input vector\n    /// @param _vout        Raw bytes length-prefixed output vector\n    /// @ param _locktime   4-byte tx locktime\n    /// @return             32-byte transaction id, little endian\n    function calculateTxId(\n        bytes memory _version,\n        bytes memory _vin,\n        bytes memory _vout,\n        bytes memory _locktime\n    ) internal pure returns (bytes32) {\n        // Get transaction hash double-Sha256(version + nIns + inputs + nOuts + outputs + locktime)\n        return abi.encodePacked(_version, _vin, _vout, _locktime).hash256();\n    }\n\n    /// @notice         Parses a tx input from raw input bytes\n    /// @dev            Supports Legacy and Witness inputs\n    /// @param _input   Raw bytes tx input\n    /// @return         Tx input sequence number, tx hash, and index\n    function parseInput(bytes memory _input) internal pure returns (uint32 _sequence, bytes32 _hash, uint32 _index, uint8 _inputType) {\n        // NB: If the scriptsig is exactly 00, we are witness.\n        //     Otherwise we are compatibility\n        if (_input.keccak256Slice(36, 1) != keccak256(hex\"00\")) {\n            _sequence = _input.extractSequenceLegacy();\n            bytes32 _witnessTag = _input.keccak256Slice(36, 3);\n\n            if (_witnessTag == keccak256(hex\"220020\") || _witnessTag == keccak256(hex\"160014\")) {\n                _inputType = uint8(InputTypes.COMPATIBILITY);\n            } else {\n                _inputType = uint8(InputTypes.LEGACY);\n            }\n\n        } else {\n            _sequence = _input.extractSequenceWitness();\n            _inputType = uint8(InputTypes.WITNESS);\n        }\n\n        return (_sequence, _input.extractInputTxId(), _input.extractTxIndex(), _inputType);\n    }\n\n    /// @notice         Parses a tx output from raw output bytes\n    /// @dev            Differentiates by output script prefix, handles legacy and witness\n    /// @param _output  Raw bytes tx output\n    /// @return         Tx output value, output type, payload\n    function parseOutput(bytes memory _output) internal pure returns (uint64 _value, uint8 _outputType, bytes memory _payload) {\n\n        _value = _output.extractValue();\n\n        if (_output.keccak256Slice(9, 1) == keccak256(hex\"6a\")) {\n            // OP_RETURN\n            _outputType = uint8(OutputTypes.OP_RETURN);\n            _payload = _output.extractOpReturnData();\n        } else {\n            bytes32 _prefixHash = _output.keccak256Slice(8, 2);\n            if (_prefixHash == keccak256(hex\"2200\")) {\n                // P2WSH\n                _outputType = uint8(OutputTypes.WSH);\n                _payload = _output.slice(11, 32);\n            } else if (_prefixHash == keccak256(hex\"1600\")) {\n                // P2WPKH\n                _outputType = uint8(OutputTypes.WPKH);\n                _payload = _output.slice(11, 20);\n            } else if (_prefixHash == keccak256(hex\"1976\")) {\n                // PKH\n                _outputType = uint8(OutputTypes.PKH);\n                _payload = _output.slice(12, 20);\n            } else if (_prefixHash == keccak256(hex\"17a9\")) {\n                // SH\n                _outputType = uint8(OutputTypes.SH);\n                _payload = _output.slice(11, 20);\n            } else {\n                _outputType = uint8(OutputTypes.NONSTANDARD);\n            }\n        }\n\n        return (_value, _outputType, _payload);\n    }\n\n    /// @notice             Parses a block header struct from a bytestring\n    /// @dev                Block headers are always 80 bytes, see Bitcoin docs\n    /// @return             Header digest, version, previous block header hash, merkle root, timestamp, target, nonce\n    function parseHeader(bytes memory _header) internal pure returns (\n        bytes32 _digest,\n        uint32 _version,\n        bytes32 _prevHash,\n        bytes32 _merkleRoot,\n        uint32 _timestamp,\n        uint256 _target,\n        uint32 _nonce\n    ) {\n        // If header has an invalid length, bubble up error\n        if (_header.length != 80) {\n            return(_digest, _version, _prevHash, _merkleRoot, _timestamp, _target, _nonce);\n        }\n\n        _digest = abi.encodePacked(_header.hash256()).reverseEndianness().toBytes32();\n        _version = uint32(_header.slice(0, 4).reverseEndianness().bytesToUint());\n        _prevHash = _header.extractPrevBlockLE().toBytes32();\n        _merkleRoot = _header.extractMerkleRootLE().toBytes32();\n        _timestamp = _header.extractTimestamp();\n        _target = _header.extractTarget();\n        _nonce = uint32(_header.slice(76, 4).reverseEndianness().bytesToUint());\n\n        return(_digest, _version, _prevHash, _merkleRoot, _timestamp, _target, _nonce);\n    }\n\n    /// @notice             Checks validity of header chain\n    /// @notice             Compares the hash of each header to the prevHash in the next header\n    /// @param _headers     Raw byte array of header chain\n    /// @return             The total accumulated difficulty of the header chain, or an error code\n    function validateHeaderChain(bytes memory _headers) internal view returns (uint256 _totalDifficulty) {\n\n        // Check header chain length\n        if (_headers.length % 80 != 0) {return ERR_BAD_LENGTH;}\n\n        // Initialize header start index\n        bytes32 _digest;\n\n        _totalDifficulty = 0;\n\n        for (uint256 _start = 0; _start < _headers.length; _start += 80) {\n\n            // ith header start index and ith header\n            bytes memory _header = _headers.slice(_start, 80);\n\n            // After the first header, check that headers are in a chain\n            if (_start != 0) {\n                if (!validateHeaderPrevHash(_header, _digest)) {return ERR_INVALID_CHAIN;}\n            }\n\n            // ith header target\n            uint256 _target = _header.extractTarget();\n\n            // Require that the header has sufficient work\n            _digest = _header.hash256View();\n            if(uint256(_digest).reverseUint256() > _target) {\n                return ERR_LOW_WORK;\n            }\n\n            // Add ith header difficulty to difficulty sum\n            _totalDifficulty = _totalDifficulty.add(_target.calculateDifficulty());\n        }\n    }\n\n    /// @notice             Checks validity of header work\n    /// @param _digest      Header digest\n    /// @param _target      The target threshold\n    /// @return             true if header work is valid, false otherwise\n    function validateHeaderWork(bytes32 _digest, uint256 _target) internal pure returns (bool) {\n        if (_digest == bytes32(0)) {return false;}\n        return (abi.encodePacked(_digest).reverseEndianness().bytesToUint() < _target);\n    }\n\n    /// @notice                     Checks validity of header chain\n    /// @dev                        Compares current header prevHash to previous header's digest\n    /// @param _header              The raw bytes header\n    /// @param _prevHeaderDigest    The previous header's digest\n    /// @return                     true if header chain is valid, false otherwise\n    function validateHeaderPrevHash(bytes memory _header, bytes32 _prevHeaderDigest) internal pure returns (bool) {\n\n        // Extract prevHash of current header\n        bytes32 _prevHash = _header.extractPrevBlockLE().toBytes32();\n\n        // Compare prevHash of current header to previous header's digest\n        if (_prevHash != _prevHeaderDigest) {return false;}\n\n        return true;\n    }\n}\n",
  "sourcePath": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
  "ast": {
    "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
    "exportedSymbols": {
      "ValidateSPV": [
        5008
      ]
    },
    "id": 5009,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4368,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".10"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:8"
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
        "file": "./BytesLib.sol",
        "id": 4370,
        "nodeType": "ImportDirective",
        "scope": 5009,
        "sourceUnit": 4270,
        "src": "93:40:8",
        "symbolAliases": [
          {
            "foreign": 4369,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
        "file": "./SafeMath.sol",
        "id": 4372,
        "nodeType": "ImportDirective",
        "scope": 5009,
        "sourceUnit": 4367,
        "src": "134:40:8",
        "symbolAliases": [
          {
            "foreign": 4371,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
        "file": "./BTCUtils.sol",
        "id": 4374,
        "nodeType": "ImportDirective",
        "scope": 5009,
        "sourceUnit": 4083,
        "src": "175:40:8",
        "symbolAliases": [
          {
            "foreign": 4373,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 5008,
        "linearizedBaseContracts": [
          5008
        ],
        "name": "ValidateSPV",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 4377,
            "libraryName": {
              "contractScope": null,
              "id": 4375,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4082,
              "src": "251:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$4082",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "245:25:8",
            "typeName": {
              "id": 4376,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "264:5:8",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 4380,
            "libraryName": {
              "contractScope": null,
              "id": 4378,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4082,
              "src": "281:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$4082",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "275:27:8",
            "typeName": {
              "id": 4379,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "294:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "id": 4383,
            "libraryName": {
              "contractScope": null,
              "id": 4381,
              "name": "BytesLib",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4269,
              "src": "313:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BytesLib_$4269",
                "typeString": "library BytesLib"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "307:25:8",
            "typeName": {
              "id": 4382,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "326:5:8",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 4386,
            "libraryName": {
              "contractScope": null,
              "id": 4384,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4366,
              "src": "343:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$4366",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "337:27:8",
            "typeName": {
              "id": 4385,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "356:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "canonicalName": "ValidateSPV.InputTypes",
            "id": 4391,
            "members": [
              {
                "id": 4387,
                "name": "NONE",
                "nodeType": "EnumValue",
                "src": "388:4:8"
              },
              {
                "id": 4388,
                "name": "LEGACY",
                "nodeType": "EnumValue",
                "src": "394:6:8"
              },
              {
                "id": 4389,
                "name": "COMPATIBILITY",
                "nodeType": "EnumValue",
                "src": "402:13:8"
              },
              {
                "id": 4390,
                "name": "WITNESS",
                "nodeType": "EnumValue",
                "src": "417:7:8"
              }
            ],
            "name": "InputTypes",
            "nodeType": "EnumDefinition",
            "src": "370:56:8"
          },
          {
            "canonicalName": "ValidateSPV.OutputTypes",
            "id": 4399,
            "members": [
              {
                "id": 4392,
                "name": "NONE",
                "nodeType": "EnumValue",
                "src": "450:4:8"
              },
              {
                "id": 4393,
                "name": "WPKH",
                "nodeType": "EnumValue",
                "src": "456:4:8"
              },
              {
                "id": 4394,
                "name": "WSH",
                "nodeType": "EnumValue",
                "src": "462:3:8"
              },
              {
                "id": 4395,
                "name": "OP_RETURN",
                "nodeType": "EnumValue",
                "src": "467:9:8"
              },
              {
                "id": 4396,
                "name": "PKH",
                "nodeType": "EnumValue",
                "src": "478:3:8"
              },
              {
                "id": 4397,
                "name": "SH",
                "nodeType": "EnumValue",
                "src": "483:2:8"
              },
              {
                "id": 4398,
                "name": "NONSTANDARD",
                "nodeType": "EnumValue",
                "src": "487:11:8"
              }
            ],
            "name": "OutputTypes",
            "nodeType": "EnumDefinition",
            "src": "431:69:8"
          },
          {
            "constant": true,
            "id": 4402,
            "name": "ERR_BAD_LENGTH",
            "nodeType": "VariableDeclaration",
            "scope": 5008,
            "src": "506:100:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 4400,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "506:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666",
              "id": 4401,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "540:66:8",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9935"
              },
              "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 4405,
            "name": "ERR_INVALID_CHAIN",
            "nodeType": "VariableDeclaration",
            "scope": 5008,
            "src": "612:103:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 4403,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "612:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665",
              "id": 4404,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "649:66:8",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639934_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9934"
              },
              "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 4408,
            "name": "ERR_LOW_WORK",
            "nodeType": "VariableDeclaration",
            "scope": 5008,
            "src": "721:98:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 4406,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "721:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666664",
              "id": 4407,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "753:66:8",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639933_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9933"
              },
              "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd"
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4415,
              "nodeType": "Block",
              "src": "885:38:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4413,
                    "name": "ERR_BAD_LENGTH",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4402,
                    "src": "902:14:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4412,
                  "id": 4414,
                  "nodeType": "Return",
                  "src": "895:21:8"
                }
              ]
            },
            "documentation": null,
            "id": 4416,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrBadLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4409,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "850:2:8"
            },
            "returnParameters": {
              "id": 4412,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4411,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4416,
                  "src": "876:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4410,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "876:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "875:9:8"
            },
            "scope": 5008,
            "src": "826:97:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4423,
              "nodeType": "Block",
              "src": "991:41:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4421,
                    "name": "ERR_INVALID_CHAIN",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4405,
                    "src": "1008:17:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4420,
                  "id": 4422,
                  "nodeType": "Return",
                  "src": "1001:24:8"
                }
              ]
            },
            "documentation": null,
            "id": 4424,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrInvalidChain",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4417,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "956:2:8"
            },
            "returnParameters": {
              "id": 4420,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4419,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4424,
                  "src": "982:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4418,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "982:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "981:9:8"
            },
            "scope": 5008,
            "src": "929:103:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4431,
              "nodeType": "Block",
              "src": "1095:36:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4429,
                    "name": "ERR_LOW_WORK",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4408,
                    "src": "1112:12:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4428,
                  "id": 4430,
                  "nodeType": "Return",
                  "src": "1105:19:8"
                }
              ]
            },
            "documentation": null,
            "id": 4432,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrLowWork",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4425,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1060:2:8"
            },
            "returnParameters": {
              "id": 4428,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4427,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4432,
                  "src": "1086:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4426,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1086:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1085:9:8"
            },
            "scope": 5008,
            "src": "1038:93:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4475,
              "nodeType": "Block",
              "src": "1751:363:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 4456,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "id": 4451,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 4447,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4445,
                          "name": "_txid",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4434,
                          "src": "1806:5:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 4446,
                          "name": "_merkleRoot",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4436,
                          "src": "1815:11:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "1806:20:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "&&",
                      "rightExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4450,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4448,
                          "name": "_index",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4440,
                          "src": "1830:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 4449,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1840:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1830:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "src": "1806:35:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4455,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4452,
                          "name": "_intermediateNodes",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4438,
                          "src": "1845:18:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4453,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1845:25:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 4454,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1874:1:8",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "1845:30:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1806:69:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4460,
                  "nodeType": "IfStatement",
                  "src": "1802:111:8",
                  "trueBody": {
                    "id": 4459,
                    "nodeType": "Block",
                    "src": "1877:36:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 4457,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1898:4:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4444,
                        "id": 4458,
                        "nodeType": "Return",
                        "src": "1891:11:8"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4462
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4462,
                      "name": "_proof",
                      "nodeType": "VariableDeclaration",
                      "scope": 4475,
                      "src": "1923:19:8",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 4461,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1923:5:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4469,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4465,
                        "name": "_txid",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4434,
                        "src": "1962:5:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4466,
                        "name": "_intermediateNodes",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4438,
                        "src": "1969:18:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4467,
                        "name": "_merkleRoot",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4436,
                        "src": "1989:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 4463,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5010,
                        "src": "1945:3:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 4464,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodePacked",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1945:16:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function () pure returns (bytes memory)"
                      }
                    },
                    "id": 4468,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1945:56:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1923:78:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4472,
                        "name": "_index",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4440,
                        "src": "2100:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 4470,
                        "name": "_proof",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4462,
                        "src": "2073:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4471,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "verifyHash256Merkle",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4014,
                      "src": "2073:26:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory,uint256) pure returns (bool)"
                      }
                    },
                    "id": 4473,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2073:34:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 4444,
                  "id": 4474,
                  "nodeType": "Return",
                  "src": "2066:41:8"
                }
              ]
            },
            "documentation": "@notice                     Validates a tx inclusion in the block\n @param _txid                The txid (LE)\n @param _merkleRoot          The merkle root (as in the block header)\n @param _intermediateNodes   The proof's intermediate nodes (digests between leaf and root)\n @param _index               The leaf's index in the tree (0-indexed)\n @return                     true if fully valid, false otherwise",
            "id": 4476,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "prove",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4441,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4434,
                  "name": "_txid",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1611:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4433,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1611:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4436,
                  "name": "_merkleRoot",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1634:19:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4435,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1634:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4438,
                  "name": "_intermediateNodes",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1663:31:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4437,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1663:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4440,
                  "name": "_index",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1704:11:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4439,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1704:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1601:120:8"
            },
            "returnParameters": {
              "id": 4444,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4443,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1745:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4442,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1745:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1744:6:8"
            },
            "scope": 5008,
            "src": "1587:527:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4499,
              "nodeType": "Block",
              "src": "2706:184:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4491,
                            "name": "_version",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4478,
                            "src": "2840:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 4492,
                            "name": "_vin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4480,
                            "src": "2850:4:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 4493,
                            "name": "_vout",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4482,
                            "src": "2856:5:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 4494,
                            "name": "_locktime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4484,
                            "src": "2863:9:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4489,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5010,
                            "src": "2823:3:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 4490,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2823:16:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 4495,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2823:50:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4496,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2792,
                      "src": "2823:58:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 4497,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2823:60:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 4488,
                  "id": 4498,
                  "nodeType": "Return",
                  "src": "2816:67:8"
                }
              ]
            },
            "documentation": "@notice             Hashes transaction to get txid\n @dev                Supports Legacy and Witness\n @param _version     4-bytes version\n @param _vin         Raw bytes length-prefixed input vector\n @param _vout        Raw bytes length-prefixed output vector\n @ param _locktime   4-byte tx locktime\n @return             32-byte transaction id, little endian",
            "id": 4500,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "calculateTxId",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4485,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4478,
                  "name": "_version",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2559:21:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4477,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2559:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4480,
                  "name": "_vin",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2590:17:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4479,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2590:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4482,
                  "name": "_vout",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2617:18:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4481,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2617:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4484,
                  "name": "_locktime",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2645:22:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4483,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2645:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2549:124:8"
            },
            "returnParameters": {
              "id": 4488,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4487,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2697:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4486,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2697:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2696:9:8"
            },
            "scope": 5008,
            "src": "2527:363:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4590,
              "nodeType": "Block",
              "src": "3260:783:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4521,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "3336",
                          "id": 4515,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3405:2:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_36_by_1",
                            "typeString": "int_const 36"
                          },
                          "value": "36"
                        },
                        {
                          "argumentTypes": null,
                          "hexValue": "31",
                          "id": 4516,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3409:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_36_by_1",
                            "typeString": "int_const 36"
                          },
                          {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4513,
                          "name": "_input",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4502,
                          "src": "3383:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4514,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "keccak256Slice",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4268,
                        "src": "3383:21:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                        }
                      },
                      "id": 4517,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3383:28:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "00",
                          "id": 4519,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3425:7:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_bc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a",
                            "typeString": "literal_string \"\u0000\""
                          },
                          "value": "\u0000"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_stringliteral_bc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a",
                            "typeString": "literal_string \"\u0000\""
                          }
                        ],
                        "id": 4518,
                        "name": "keccak256",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5017,
                        "src": "3415:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4520,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3415:18:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "3383:50:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4578,
                    "nodeType": "Block",
                    "src": "3824:120:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4569,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4565,
                            "name": "_sequence",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4505,
                            "src": "3838:9:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4566,
                                "name": "_input",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4502,
                                "src": "3850:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4567,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractSequenceWitness",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3120,
                              "src": "3850:29:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (uint32)"
                              }
                            },
                            "id": 4568,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3850:31:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "src": "3838:43:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "id": 4570,
                        "nodeType": "ExpressionStatement",
                        "src": "3838:43:8"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4576,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4571,
                            "name": "_inputType",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4511,
                            "src": "3895:10:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4573,
                                  "name": "InputTypes",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4391,
                                  "src": "3914:10:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_InputTypes_$4391_$",
                                    "typeString": "type(enum ValidateSPV.InputTypes)"
                                  }
                                },
                                "id": 4574,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "WITNESS",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "3914:18:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_InputTypes_$4391",
                                  "typeString": "enum ValidateSPV.InputTypes"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_enum$_InputTypes_$4391",
                                  "typeString": "enum ValidateSPV.InputTypes"
                                }
                              ],
                              "id": 4572,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3908:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint8_$",
                                "typeString": "type(uint8)"
                              },
                              "typeName": "uint8"
                            },
                            "id": 4575,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3908:25:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "3895:38:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 4577,
                        "nodeType": "ExpressionStatement",
                        "src": "3895:38:8"
                      }
                    ]
                  },
                  "id": 4579,
                  "nodeType": "IfStatement",
                  "src": "3379:565:8",
                  "trueBody": {
                    "id": 4564,
                    "nodeType": "Block",
                    "src": "3435:383:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4526,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4522,
                            "name": "_sequence",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4505,
                            "src": "3449:9:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4523,
                                "name": "_input",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4502,
                                "src": "3461:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4524,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractSequenceLegacy",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2989,
                              "src": "3461:28:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (uint32)"
                              }
                            },
                            "id": 4525,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3461:30:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "src": "3449:42:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "id": 4527,
                        "nodeType": "ExpressionStatement",
                        "src": "3449:42:8"
                      },
                      {
                        "assignments": [
                          4529
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4529,
                            "name": "_witnessTag",
                            "nodeType": "VariableDeclaration",
                            "scope": 4564,
                            "src": "3505:19:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 4528,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3505:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4535,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "3336",
                              "id": 4532,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3549:2:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_36_by_1",
                                "typeString": "int_const 36"
                              },
                              "value": "36"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "33",
                              "id": 4533,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3553:1:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              },
                              "value": "3"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_36_by_1",
                                "typeString": "int_const 36"
                              },
                              {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4530,
                              "name": "_input",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4502,
                              "src": "3527:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4531,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "keccak256Slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4268,
                            "src": "3527:21:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 4534,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3527:28:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3505:50:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 4546,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 4540,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 4536,
                              "name": "_witnessTag",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4529,
                              "src": "3574:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "220020",
                                  "id": 4538,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3599:11:8",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_33b5f6d42eef1e9e31f928375546beb5ccbc06516f549bb51f33536680ad4439",
                                    "typeString": "literal_string \"\"\u0000 \""
                                  },
                                  "value": "\"\u0000 "
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_33b5f6d42eef1e9e31f928375546beb5ccbc06516f549bb51f33536680ad4439",
                                    "typeString": "literal_string \"\"\u0000 \""
                                  }
                                ],
                                "id": 4537,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5017,
                                "src": "3589:9:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 4539,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3589:22:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3574:37:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 4545,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 4541,
                              "name": "_witnessTag",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4529,
                              "src": "3615:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "160014",
                                  "id": 4543,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3640:11:8",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_bde11925feafe00f4d9d48ef4480be1ea68d808b9c557770a6133e20d41f44bf",
                                    "typeString": "literal_string \"\u0016\u0000\u0014\""
                                  },
                                  "value": "\u0016\u0000\u0014"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_bde11925feafe00f4d9d48ef4480be1ea68d808b9c557770a6133e20d41f44bf",
                                    "typeString": "literal_string \"\u0016\u0000\u0014\""
                                  }
                                ],
                                "id": 4542,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5017,
                                "src": "3630:9:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 4544,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3630:22:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3615:37:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "3574:78:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 4562,
                          "nodeType": "Block",
                          "src": "3737:70:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4560,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4555,
                                  "name": "_inputType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4511,
                                  "src": "3755:10:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4557,
                                        "name": "InputTypes",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4391,
                                        "src": "3774:10:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_enum$_InputTypes_$4391_$",
                                          "typeString": "type(enum ValidateSPV.InputTypes)"
                                        }
                                      },
                                      "id": 4558,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "LEGACY",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "3774:17:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    ],
                                    "id": 4556,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "3768:5:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint8_$",
                                      "typeString": "type(uint8)"
                                    },
                                    "typeName": "uint8"
                                  },
                                  "id": 4559,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3768:24:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "src": "3755:37:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "id": 4561,
                              "nodeType": "ExpressionStatement",
                              "src": "3755:37:8"
                            }
                          ]
                        },
                        "id": 4563,
                        "nodeType": "IfStatement",
                        "src": "3570:237:8",
                        "trueBody": {
                          "id": 4554,
                          "nodeType": "Block",
                          "src": "3654:77:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4552,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4547,
                                  "name": "_inputType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4511,
                                  "src": "3672:10:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4549,
                                        "name": "InputTypes",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4391,
                                        "src": "3691:10:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_enum$_InputTypes_$4391_$",
                                          "typeString": "type(enum ValidateSPV.InputTypes)"
                                        }
                                      },
                                      "id": 4550,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "COMPATIBILITY",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "3691:24:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    ],
                                    "id": 4548,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "3685:5:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint8_$",
                                      "typeString": "type(uint8)"
                                    },
                                    "typeName": "uint8"
                                  },
                                  "id": 4551,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3685:31:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "src": "3672:44:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "id": 4553,
                              "nodeType": "ExpressionStatement",
                              "src": "3672:44:8"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 4580,
                        "name": "_sequence",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4505,
                        "src": "3962:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4581,
                            "name": "_input",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4502,
                            "src": "3973:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4582,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractInputTxId",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3177,
                          "src": "3973:23:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 4583,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3973:25:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4584,
                            "name": "_input",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4502,
                            "src": "4000:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4585,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractTxIndex",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3217,
                          "src": "4000:21:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (uint32)"
                          }
                        },
                        "id": 4586,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4000:23:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4587,
                        "name": "_inputType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4511,
                        "src": "4025:10:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "id": 4588,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "3961:75:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint32_$_t_bytes32_$_t_uint32_$_t_uint8_$",
                      "typeString": "tuple(uint32,bytes32,uint32,uint8)"
                    }
                  },
                  "functionReturnParameters": 4512,
                  "id": 4589,
                  "nodeType": "Return",
                  "src": "3954:82:8"
                }
              ]
            },
            "documentation": "@notice         Parses a tx input from raw input bytes\n @dev            Supports Legacy and Witness inputs\n @param _input   Raw bytes tx input\n @return         Tx input sequence number, tx hash, and index",
            "id": 4591,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseInput",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4503,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4502,
                  "name": "_input",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3150:19:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4501,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3150:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3149:21:8"
            },
            "returnParameters": {
              "id": 4512,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4505,
                  "name": "_sequence",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3194:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4504,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3194:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4507,
                  "name": "_hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3212:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4506,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3212:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4509,
                  "name": "_index",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3227:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4508,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3227:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4511,
                  "name": "_inputType",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3242:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4510,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "3242:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3193:66:8"
            },
            "scope": 5008,
            "src": "3130:913:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4742,
              "nodeType": "Block",
              "src": "4434:1241:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4606,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4602,
                      "name": "_value",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4596,
                      "src": "4445:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint64",
                        "typeString": "uint64"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4603,
                          "name": "_output",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4593,
                          "src": "4454:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4604,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractValue",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3382,
                        "src": "4454:20:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint64_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint64)"
                        }
                      },
                      "id": 4605,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4454:22:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint64",
                        "typeString": "uint64"
                      }
                    },
                    "src": "4445:31:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "id": 4607,
                  "nodeType": "ExpressionStatement",
                  "src": "4445:31:8"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4616,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "39",
                          "id": 4610,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4514:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_9_by_1",
                            "typeString": "int_const 9"
                          },
                          "value": "9"
                        },
                        {
                          "argumentTypes": null,
                          "hexValue": "31",
                          "id": 4611,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4517:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_9_by_1",
                            "typeString": "int_const 9"
                          },
                          {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4608,
                          "name": "_output",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4593,
                          "src": "4491:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4609,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "keccak256Slice",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4268,
                        "src": "4491:22:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                        }
                      },
                      "id": 4612,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4491:28:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "6a",
                          "id": 4614,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4533:7:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_b31d742db54d6961c6b346af2c9c4c495eb8aff2ebf6b3699e052d1cef5cf50b",
                            "typeString": "literal_string \"j\""
                          },
                          "value": "j"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_stringliteral_b31d742db54d6961c6b346af2c9c4c495eb8aff2ebf6b3699e052d1cef5cf50b",
                            "typeString": "literal_string \"j\""
                          }
                        ],
                        "id": 4613,
                        "name": "keccak256",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5017,
                        "src": "4523:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4615,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4523:18:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "4491:50:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4735,
                    "nodeType": "Block",
                    "src": "4695:925:8",
                    "statements": [
                      {
                        "assignments": [
                          4632
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4632,
                            "name": "_prefixHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 4735,
                            "src": "4709:19:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 4631,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4709:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4638,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 4635,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4754:1:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "32",
                              "id": 4636,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4757:1:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4633,
                              "name": "_output",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4593,
                              "src": "4731:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4634,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "keccak256Slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4268,
                            "src": "4731:22:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 4637,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4731:28:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4709:50:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 4643,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 4639,
                            "name": "_prefixHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4632,
                            "src": "4777:11:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "2200",
                                "id": 4641,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "string",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4802:9:8",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_stringliteral_b07fb0a3471486f9ccb02aab1d525df60d82925cb2d27860f923e655d76f35fc",
                                  "typeString": "literal_string \"\"\u0000\""
                                },
                                "value": "\"\u0000"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_b07fb0a3471486f9ccb02aab1d525df60d82925cb2d27860f923e655d76f35fc",
                                  "typeString": "literal_string \"\"\u0000\""
                                }
                              ],
                              "id": 4640,
                              "name": "keccak256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5017,
                              "src": "4792:9:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 4642,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4792:20:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4777:35:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 4664,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 4660,
                              "name": "_prefixHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4632,
                              "src": "4968:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "1600",
                                  "id": 4662,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4993:9:8",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_ef68c1dfb3907c1a4ede55ac1ea785d8b99118a36999824e5ba557e25a67f448",
                                    "typeString": "literal_string \"\u0016\u0000\""
                                  },
                                  "value": "\u0016\u0000"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_ef68c1dfb3907c1a4ede55ac1ea785d8b99118a36999824e5ba557e25a67f448",
                                    "typeString": "literal_string \"\u0016\u0000\""
                                  }
                                ],
                                "id": 4661,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5017,
                                "src": "4983:9:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 4663,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4983:20:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "4968:35:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "condition": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "id": 4685,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4681,
                                "name": "_prefixHash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4632,
                                "src": "5161:11:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "hexValue": "1976",
                                    "id": 4683,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "string",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "5186:9:8",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_stringliteral_ad81b5075fc2fab784a78e7b78827a4218c83feb16873a545f008e5cd8266b6d",
                                      "typeString": "literal_string \"\u0019v\""
                                    },
                                    "value": "\u0019v"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_stringliteral_ad81b5075fc2fab784a78e7b78827a4218c83feb16873a545f008e5cd8266b6d",
                                      "typeString": "literal_string \"\u0019v\""
                                    }
                                  ],
                                  "id": 4682,
                                  "name": "keccak256",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5017,
                                  "src": "5176:9:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                    "typeString": "function (bytes memory) pure returns (bytes32)"
                                  }
                                },
                                "id": 4684,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5176:20:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "src": "5161:35:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "condition": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "id": 4706,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 4702,
                                  "name": "_prefixHash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4632,
                                  "src": "5350:11:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "17a9",
                                      "id": 4704,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "string",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5375:9:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_stringliteral_8c372bc872581e21a019e9c438c7646f8a6cf04e4c2acf7045e86bf2fabee118",
                                        "typeString": "literal_string (contains invalid UTF-8 sequence at position 1)"
                                      },
                                      "value": null
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_stringliteral_8c372bc872581e21a019e9c438c7646f8a6cf04e4c2acf7045e86bf2fabee118",
                                        "typeString": "literal_string (contains invalid UTF-8 sequence at position 1)"
                                      }
                                    ],
                                    "id": 4703,
                                    "name": "keccak256",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5017,
                                    "src": "5365:9:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                      "typeString": "function (bytes memory) pure returns (bytes32)"
                                    }
                                  },
                                  "id": 4705,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5365:20:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "5350:35:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 4730,
                                "nodeType": "Block",
                                "src": "5533:77:8",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4728,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "id": 4723,
                                        "name": "_outputType",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4598,
                                        "src": "5551:11:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "expression": {
                                              "argumentTypes": null,
                                              "id": 4725,
                                              "name": "OutputTypes",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 4399,
                                              "src": "5571:11:8",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                                "typeString": "type(enum ValidateSPV.OutputTypes)"
                                              }
                                            },
                                            "id": 4726,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "memberName": "NONSTANDARD",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": null,
                                            "src": "5571:23:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          ],
                                          "id": 4724,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "5565:5:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint8_$",
                                            "typeString": "type(uint8)"
                                          },
                                          "typeName": "uint8"
                                        },
                                        "id": 4727,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "5565:30:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "src": "5551:44:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "id": 4729,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5551:44:8"
                                  }
                                ]
                              },
                              "id": 4731,
                              "nodeType": "IfStatement",
                              "src": "5346:264:8",
                              "trueBody": {
                                "id": 4722,
                                "nodeType": "Block",
                                "src": "5387:140:8",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4712,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "id": 4707,
                                        "name": "_outputType",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4598,
                                        "src": "5427:11:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "expression": {
                                              "argumentTypes": null,
                                              "id": 4709,
                                              "name": "OutputTypes",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 4399,
                                              "src": "5447:11:8",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                                "typeString": "type(enum ValidateSPV.OutputTypes)"
                                              }
                                            },
                                            "id": 4710,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "memberName": "SH",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": null,
                                            "src": "5447:14:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          ],
                                          "id": 4708,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "5441:5:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint8_$",
                                            "typeString": "type(uint8)"
                                          },
                                          "typeName": "uint8"
                                        },
                                        "id": 4711,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "5441:21:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "src": "5427:35:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "id": 4713,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5427:35:8"
                                  },
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4720,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "id": 4714,
                                        "name": "_payload",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4600,
                                        "src": "5480:8:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "hexValue": "3131",
                                            "id": 4717,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "5505:2:8",
                                            "subdenomination": null,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_rational_11_by_1",
                                              "typeString": "int_const 11"
                                            },
                                            "value": "11"
                                          },
                                          {
                                            "argumentTypes": null,
                                            "hexValue": "3230",
                                            "id": 4718,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "5509:2:8",
                                            "subdenomination": null,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_rational_20_by_1",
                                              "typeString": "int_const 20"
                                            },
                                            "value": "20"
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_rational_11_by_1",
                                              "typeString": "int_const 11"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_20_by_1",
                                              "typeString": "int_const 20"
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": null,
                                            "id": 4715,
                                            "name": "_output",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 4593,
                                            "src": "5491:7:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bytes_memory_ptr",
                                              "typeString": "bytes memory"
                                            }
                                          },
                                          "id": 4716,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "slice",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 4133,
                                          "src": "5491:13:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                            "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                          }
                                        },
                                        "id": 4719,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "5491:21:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "src": "5480:32:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4721,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5480:32:8"
                                  }
                                ]
                              }
                            },
                            "id": 4732,
                            "nodeType": "IfStatement",
                            "src": "5157:453:8",
                            "trueBody": {
                              "id": 4701,
                              "nodeType": "Block",
                              "src": "5198:142:8",
                              "statements": [
                                {
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 4691,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "argumentTypes": null,
                                      "id": 4686,
                                      "name": "_outputType",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4598,
                                      "src": "5239:11:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "expression": {
                                            "argumentTypes": null,
                                            "id": 4688,
                                            "name": "OutputTypes",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 4399,
                                            "src": "5259:11:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                              "typeString": "type(enum ValidateSPV.OutputTypes)"
                                            }
                                          },
                                          "id": 4689,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "memberName": "PKH",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": null,
                                          "src": "5259:15:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                            "typeString": "enum ValidateSPV.OutputTypes"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                            "typeString": "enum ValidateSPV.OutputTypes"
                                          }
                                        ],
                                        "id": 4687,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "5253:5:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint8_$",
                                          "typeString": "type(uint8)"
                                        },
                                        "typeName": "uint8"
                                      },
                                      "id": 4690,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5253:22:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "src": "5239:36:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "id": 4692,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5239:36:8"
                                },
                                {
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 4699,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "argumentTypes": null,
                                      "id": 4693,
                                      "name": "_payload",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4600,
                                      "src": "5293:8:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "hexValue": "3132",
                                          "id": 4696,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "5318:2:8",
                                          "subdenomination": null,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_12_by_1",
                                            "typeString": "int_const 12"
                                          },
                                          "value": "12"
                                        },
                                        {
                                          "argumentTypes": null,
                                          "hexValue": "3230",
                                          "id": 4697,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "5322:2:8",
                                          "subdenomination": null,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_20_by_1",
                                            "typeString": "int_const 20"
                                          },
                                          "value": "20"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_rational_12_by_1",
                                            "typeString": "int_const 12"
                                          },
                                          {
                                            "typeIdentifier": "t_rational_20_by_1",
                                            "typeString": "int_const 20"
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": null,
                                          "id": 4694,
                                          "name": "_output",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 4593,
                                          "src": "5304:7:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_memory_ptr",
                                            "typeString": "bytes memory"
                                          }
                                        },
                                        "id": 4695,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "slice",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 4133,
                                        "src": "5304:13:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                          "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                        }
                                      },
                                      "id": 4698,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5304:21:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "src": "5293:32:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 4700,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5293:32:8"
                                }
                              ]
                            }
                          },
                          "id": 4733,
                          "nodeType": "IfStatement",
                          "src": "4964:646:8",
                          "trueBody": {
                            "id": 4680,
                            "nodeType": "Block",
                            "src": "5005:146:8",
                            "statements": [
                              {
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4670,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "argumentTypes": null,
                                    "id": 4665,
                                    "name": "_outputType",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4598,
                                    "src": "5049:11:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "expression": {
                                          "argumentTypes": null,
                                          "id": 4667,
                                          "name": "OutputTypes",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 4399,
                                          "src": "5069:11:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                            "typeString": "type(enum ValidateSPV.OutputTypes)"
                                          }
                                        },
                                        "id": 4668,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "memberName": "WPKH",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": null,
                                        "src": "5069:16:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                          "typeString": "enum ValidateSPV.OutputTypes"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                          "typeString": "enum ValidateSPV.OutputTypes"
                                        }
                                      ],
                                      "id": 4666,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "5063:5:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint8_$",
                                        "typeString": "type(uint8)"
                                      },
                                      "typeName": "uint8"
                                    },
                                    "id": 4669,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "5063:23:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "src": "5049:37:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "id": 4671,
                                "nodeType": "ExpressionStatement",
                                "src": "5049:37:8"
                              },
                              {
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4678,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "argumentTypes": null,
                                    "id": 4672,
                                    "name": "_payload",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4600,
                                    "src": "5104:8:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "hexValue": "3131",
                                        "id": 4675,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5129:2:8",
                                        "subdenomination": null,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_11_by_1",
                                          "typeString": "int_const 11"
                                        },
                                        "value": "11"
                                      },
                                      {
                                        "argumentTypes": null,
                                        "hexValue": "3230",
                                        "id": 4676,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5133:2:8",
                                        "subdenomination": null,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_20_by_1",
                                          "typeString": "int_const 20"
                                        },
                                        "value": "20"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_11_by_1",
                                          "typeString": "int_const 11"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_20_by_1",
                                          "typeString": "int_const 20"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4673,
                                        "name": "_output",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4593,
                                        "src": "5115:7:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "id": 4674,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "slice",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 4133,
                                      "src": "5115:13:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                        "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                      }
                                    },
                                    "id": 4677,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "5115:21:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "src": "5104:32:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4679,
                                "nodeType": "ExpressionStatement",
                                "src": "5104:32:8"
                              }
                            ]
                          }
                        },
                        "id": 4734,
                        "nodeType": "IfStatement",
                        "src": "4773:837:8",
                        "trueBody": {
                          "id": 4659,
                          "nodeType": "Block",
                          "src": "4814:144:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4649,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4644,
                                  "name": "_outputType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4598,
                                  "src": "4857:11:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4646,
                                        "name": "OutputTypes",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4399,
                                        "src": "4877:11:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                          "typeString": "type(enum ValidateSPV.OutputTypes)"
                                        }
                                      },
                                      "id": 4647,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "WSH",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "4877:15:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                        "typeString": "enum ValidateSPV.OutputTypes"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                        "typeString": "enum ValidateSPV.OutputTypes"
                                      }
                                    ],
                                    "id": 4645,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "4871:5:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint8_$",
                                      "typeString": "type(uint8)"
                                    },
                                    "typeName": "uint8"
                                  },
                                  "id": 4648,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4871:22:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "src": "4857:36:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "id": 4650,
                              "nodeType": "ExpressionStatement",
                              "src": "4857:36:8"
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4657,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4651,
                                  "name": "_payload",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4600,
                                  "src": "4911:8:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "3131",
                                      "id": 4654,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "4936:2:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_11_by_1",
                                        "typeString": "int_const 11"
                                      },
                                      "value": "11"
                                    },
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "3332",
                                      "id": 4655,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "4940:2:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_32_by_1",
                                        "typeString": "int_const 32"
                                      },
                                      "value": "32"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_11_by_1",
                                        "typeString": "int_const 11"
                                      },
                                      {
                                        "typeIdentifier": "t_rational_32_by_1",
                                        "typeString": "int_const 32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4652,
                                      "name": "_output",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4593,
                                      "src": "4922:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4653,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "slice",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4133,
                                    "src": "4922:13:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4656,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4922:21:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "src": "4911:32:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4658,
                              "nodeType": "ExpressionStatement",
                              "src": "4911:32:8"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 4736,
                  "nodeType": "IfStatement",
                  "src": "4487:1133:8",
                  "trueBody": {
                    "id": 4630,
                    "nodeType": "Block",
                    "src": "4543:146:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4622,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4617,
                            "name": "_outputType",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4598,
                            "src": "4582:11:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4619,
                                  "name": "OutputTypes",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4399,
                                  "src": "4602:11:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                    "typeString": "type(enum ValidateSPV.OutputTypes)"
                                  }
                                },
                                "id": 4620,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "OP_RETURN",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "4602:21:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                  "typeString": "enum ValidateSPV.OutputTypes"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                  "typeString": "enum ValidateSPV.OutputTypes"
                                }
                              ],
                              "id": 4618,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4596:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint8_$",
                                "typeString": "type(uint8)"
                              },
                              "typeName": "uint8"
                            },
                            "id": 4621,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4596:28:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "4582:42:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 4623,
                        "nodeType": "ExpressionStatement",
                        "src": "4582:42:8"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4628,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4624,
                            "name": "_payload",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4600,
                            "src": "4638:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4625,
                                "name": "_output",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4593,
                                "src": "4649:7:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4626,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractOpReturnData",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3419,
                              "src": "4649:27:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (bytes memory)"
                              }
                            },
                            "id": 4627,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4649:29:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "src": "4638:40:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4629,
                        "nodeType": "ExpressionStatement",
                        "src": "4638:40:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 4737,
                        "name": "_value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4596,
                        "src": "5638:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint64",
                          "typeString": "uint64"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4738,
                        "name": "_outputType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4598,
                        "src": "5646:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4739,
                        "name": "_payload",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4600,
                        "src": "5659:8:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "id": 4740,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "5637:31:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint64_$_t_uint8_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(uint64,uint8,bytes memory)"
                    }
                  },
                  "functionReturnParameters": 4601,
                  "id": 4741,
                  "nodeType": "Return",
                  "src": "5630:38:8"
                }
              ]
            },
            "documentation": "@notice         Parses a tx output from raw output bytes\n @dev            Differentiates by output script prefix, handles legacy and witness\n @param _output  Raw bytes tx output\n @return         Tx output value, output type, payload",
            "id": 4743,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseOutput",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4594,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4593,
                  "name": "_output",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4332:20:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4592,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4332:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4331:22:8"
            },
            "returnParameters": {
              "id": 4601,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4596,
                  "name": "_value",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4377:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 4595,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "4377:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4598,
                  "name": "_outputType",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4392:17:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4597,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "4392:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4600,
                  "name": "_payload",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4411:21:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4599,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4411:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4376:57:8"
            },
            "scope": 5008,
            "src": "4311:1364:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4855,
              "nodeType": "Block",
              "src": "6207:764:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4765,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4762,
                        "name": "_header",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4745,
                        "src": "6281:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "6281:14:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3830",
                      "id": 4764,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6299:2:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_80_by_1",
                        "typeString": "int_const 80"
                      },
                      "value": "80"
                    },
                    "src": "6281:20:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4776,
                  "nodeType": "IfStatement",
                  "src": "6277:129:8",
                  "trueBody": {
                    "id": 4775,
                    "nodeType": "Block",
                    "src": "6303:103:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "id": 4766,
                              "name": "_digest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4748,
                              "src": "6324:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4767,
                              "name": "_version",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4750,
                              "src": "6333:8:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4768,
                              "name": "_prevHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4752,
                              "src": "6343:9:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4769,
                              "name": "_merkleRoot",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4754,
                              "src": "6354:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4770,
                              "name": "_timestamp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4756,
                              "src": "6367:10:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4771,
                              "name": "_target",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4758,
                              "src": "6379:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4772,
                              "name": "_nonce",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4760,
                              "src": "6388:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            }
                          ],
                          "id": 4773,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "6323:72:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint32_$_t_bytes32_$_t_bytes32_$_t_uint32_$_t_uint256_$_t_uint32_$",
                            "typeString": "tuple(bytes32,uint32,bytes32,bytes32,uint32,uint256,uint32)"
                          }
                        },
                        "functionReturnParameters": 4761,
                        "id": 4774,
                        "nodeType": "Return",
                        "src": "6317:78:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4788,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4777,
                      "name": "_digest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4748,
                      "src": "6416:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4780,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4745,
                                      "src": "6443:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4781,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "hash256",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 2792,
                                    "src": "6443:15:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory) pure returns (bytes32)"
                                    }
                                  },
                                  "id": 4782,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6443:17:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4778,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5010,
                                  "src": "6426:3:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 4779,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodePacked",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "6426:16:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 4783,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6426:35:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4784,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "reverseEndianness",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2579,
                            "src": "6426:53:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 4785,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6426:55:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4786,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "toBytes32",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4244,
                        "src": "6426:65:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4787,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6426:67:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "6416:77:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4789,
                  "nodeType": "ExpressionStatement",
                  "src": "6416:77:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4802,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4790,
                      "name": "_version",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4750,
                      "src": "6503:8:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "30",
                                      "id": 4794,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6535:1:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "34",
                                      "id": 4795,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6538:1:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      },
                                      "value": "4"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4792,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4745,
                                      "src": "6521:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4793,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "slice",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4133,
                                    "src": "6521:13:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4796,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6521:19:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4797,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 2579,
                                "src": "6521:37:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory) pure returns (bytes memory)"
                                }
                              },
                              "id": 4798,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6521:39:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4799,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2726,
                            "src": "6521:51:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4800,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6521:53:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 4791,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "6514:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint32_$",
                          "typeString": "type(uint32)"
                        },
                        "typeName": "uint32"
                      },
                      "id": 4801,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6514:61:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "6503:72:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "id": 4803,
                  "nodeType": "ExpressionStatement",
                  "src": "6503:72:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4810,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4804,
                      "name": "_prevHash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4752,
                      "src": "6585:9:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4805,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4745,
                              "src": "6597:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4806,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractPrevBlockLE",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3804,
                            "src": "6597:26:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 4807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6597:28:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4808,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "toBytes32",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4244,
                        "src": "6597:38:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4809,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6597:40:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "6585:52:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4811,
                  "nodeType": "ExpressionStatement",
                  "src": "6585:52:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4818,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4812,
                      "name": "_merkleRoot",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4754,
                      "src": "6647:11:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4813,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4745,
                              "src": "6661:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4814,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractMerkleRootLE",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3718,
                            "src": "6661:27:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 4815,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6661:29:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4816,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "toBytes32",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4244,
                        "src": "6661:39:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4817,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6661:41:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "6647:55:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4819,
                  "nodeType": "ExpressionStatement",
                  "src": "6647:55:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4824,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4820,
                      "name": "_timestamp",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4756,
                      "src": "6712:10:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4821,
                          "name": "_header",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4745,
                          "src": "6725:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4822,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractTimestamp",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3850,
                        "src": "6725:24:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint32)"
                        }
                      },
                      "id": 4823,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6725:26:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "6712:39:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "id": 4825,
                  "nodeType": "ExpressionStatement",
                  "src": "6712:39:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4830,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4826,
                      "name": "_target",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4758,
                      "src": "6761:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4827,
                          "name": "_header",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4745,
                          "src": "6771:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4828,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractTarget",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3777,
                        "src": "6771:21:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint256)"
                        }
                      },
                      "id": 4829,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6771:23:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6761:33:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4831,
                  "nodeType": "ExpressionStatement",
                  "src": "6761:33:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4844,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4832,
                      "name": "_nonce",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4760,
                      "src": "6804:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "3736",
                                      "id": 4836,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6834:2:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_76_by_1",
                                        "typeString": "int_const 76"
                                      },
                                      "value": "76"
                                    },
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "34",
                                      "id": 4837,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6838:1:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      },
                                      "value": "4"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_76_by_1",
                                        "typeString": "int_const 76"
                                      },
                                      {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4834,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4745,
                                      "src": "6820:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4835,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "slice",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4133,
                                    "src": "6820:13:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4838,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6820:20:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4839,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 2579,
                                "src": "6820:38:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory) pure returns (bytes memory)"
                                }
                              },
                              "id": 4840,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6820:40:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4841,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2726,
                            "src": "6820:52:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4842,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6820:54:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 4833,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "6813:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint32_$",
                          "typeString": "type(uint32)"
                        },
                        "typeName": "uint32"
                      },
                      "id": 4843,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6813:62:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "6804:71:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "id": 4845,
                  "nodeType": "ExpressionStatement",
                  "src": "6804:71:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 4846,
                        "name": "_digest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4748,
                        "src": "6893:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4847,
                        "name": "_version",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4750,
                        "src": "6902:8:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4848,
                        "name": "_prevHash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4752,
                        "src": "6912:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4849,
                        "name": "_merkleRoot",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4754,
                        "src": "6923:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4850,
                        "name": "_timestamp",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4756,
                        "src": "6936:10:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4851,
                        "name": "_target",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4758,
                        "src": "6948:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4852,
                        "name": "_nonce",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4760,
                        "src": "6957:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "id": 4853,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "6892:72:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint32_$_t_bytes32_$_t_bytes32_$_t_uint32_$_t_uint256_$_t_uint32_$",
                      "typeString": "tuple(bytes32,uint32,bytes32,bytes32,uint32,uint256,uint32)"
                    }
                  },
                  "functionReturnParameters": 4761,
                  "id": 4854,
                  "nodeType": "Return",
                  "src": "6886:78:8"
                }
              ]
            },
            "documentation": "@notice             Parses a block header struct from a bytestring\n @dev                Block headers are always 80 bytes, see Bitcoin docs\n @return             Header digest, version, previous block header hash, merkle root, timestamp, target, nonce",
            "id": 4856,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseHeader",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4746,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4745,
                  "name": "_header",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "5975:20:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4744,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5975:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5974:22:8"
            },
            "returnParameters": {
              "id": 4761,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4748,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6029:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4747,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6029:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4750,
                  "name": "_version",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6054:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4749,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6054:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4752,
                  "name": "_prevHash",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6079:17:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4751,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6079:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4754,
                  "name": "_merkleRoot",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6106:19:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4753,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6106:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4756,
                  "name": "_timestamp",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6135:17:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4755,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6135:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4758,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6162:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4757,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6162:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4760,
                  "name": "_nonce",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6187:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4759,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6187:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6019:187:8"
            },
            "scope": 5008,
            "src": "5954:1017:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4948,
              "nodeType": "Block",
              "src": "7392:1071:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4868,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4866,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4863,
                          "name": "_headers",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4858,
                          "src": "7444:8:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4864,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "7444:15:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 4865,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7462:2:8",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "7444:20:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4867,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7468:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "7444:25:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4872,
                  "nodeType": "IfStatement",
                  "src": "7440:55:8",
                  "trueBody": {
                    "id": 4871,
                    "nodeType": "Block",
                    "src": "7471:24:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4869,
                          "name": "ERR_BAD_LENGTH",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4402,
                          "src": "7479:14:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4862,
                        "id": 4870,
                        "nodeType": "Return",
                        "src": "7472:21:8"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4874
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4874,
                      "name": "_digest",
                      "nodeType": "VariableDeclaration",
                      "scope": 4948,
                      "src": "7546:15:8",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 4873,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "7546:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4875,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7546:15:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4878,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4876,
                      "name": "_totalDifficulty",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4861,
                      "src": "7572:16:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4877,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7591:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "7572:20:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4879,
                  "nodeType": "ExpressionStatement",
                  "src": "7572:20:8"
                },
                {
                  "body": {
                    "id": 4946,
                    "nodeType": "Block",
                    "src": "7668:789:8",
                    "statements": [
                      {
                        "assignments": [
                          4893
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4893,
                            "name": "_header",
                            "nodeType": "VariableDeclaration",
                            "scope": 4946,
                            "src": "7736:20:8",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes"
                            },
                            "typeName": {
                              "id": 4892,
                              "name": "bytes",
                              "nodeType": "ElementaryTypeName",
                              "src": "7736:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_storage_ptr",
                                "typeString": "bytes"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4899,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4896,
                              "name": "_start",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4881,
                              "src": "7774:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "3830",
                              "id": 4897,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7782:2:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_80_by_1",
                                "typeString": "int_const 80"
                              },
                              "value": "80"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_80_by_1",
                                "typeString": "int_const 80"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4894,
                              "name": "_headers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4858,
                              "src": "7759:8:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4895,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4133,
                            "src": "7759:14:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                            }
                          },
                          "id": 4898,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7759:26:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7736:49:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4902,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 4900,
                            "name": "_start",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4881,
                            "src": "7877:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 4901,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7887:1:8",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "7877:11:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 4913,
                        "nodeType": "IfStatement",
                        "src": "7873:123:8",
                        "trueBody": {
                          "id": 4912,
                          "nodeType": "Block",
                          "src": "7890:106:8",
                          "statements": [
                            {
                              "condition": {
                                "argumentTypes": null,
                                "id": 4907,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "7912:41:8",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 4904,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4893,
                                      "src": "7936:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 4905,
                                      "name": "_digest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4874,
                                      "src": "7945:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 4903,
                                    "name": "validateHeaderPrevHash",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5007,
                                    "src": "7913:22:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_bool_$",
                                      "typeString": "function (bytes memory,bytes32) pure returns (bool)"
                                    }
                                  },
                                  "id": 4906,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7913:40:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": null,
                              "id": 4911,
                              "nodeType": "IfStatement",
                              "src": "7908:74:8",
                              "trueBody": {
                                "id": 4910,
                                "nodeType": "Block",
                                "src": "7955:27:8",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4908,
                                      "name": "ERR_INVALID_CHAIN",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4405,
                                      "src": "7963:17:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "functionReturnParameters": 4862,
                                    "id": 4909,
                                    "nodeType": "Return",
                                    "src": "7956:24:8"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          4915
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4915,
                            "name": "_target",
                            "nodeType": "VariableDeclaration",
                            "scope": 4946,
                            "src": "8043:15:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4914,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8043:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4919,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4916,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4893,
                              "src": "8061:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4917,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractTarget",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3777,
                            "src": "8061:21:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4918,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8061:23:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8043:41:8"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4924,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4920,
                            "name": "_digest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4874,
                            "src": "8158:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4921,
                                "name": "_header",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4893,
                                "src": "8168:7:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4922,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "hash256View",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2801,
                              "src": "8168:19:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) view returns (bytes32)"
                              }
                            },
                            "id": 4923,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8168:21:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "8158:31:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 4925,
                        "nodeType": "ExpressionStatement",
                        "src": "8158:31:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4932,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 4927,
                                    "name": "_digest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4874,
                                    "src": "8214:7:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 4926,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "8206:7:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": "uint256"
                                },
                                "id": 4928,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8206:16:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4929,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "reverseUint256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2675,
                              "src": "8206:31:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4930,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8206:33:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 4931,
                            "name": "_target",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4915,
                            "src": "8242:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8206:43:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 4936,
                        "nodeType": "IfStatement",
                        "src": "8203:100:8",
                        "trueBody": {
                          "id": 4935,
                          "nodeType": "Block",
                          "src": "8251:52:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4933,
                                "name": "ERR_LOW_WORK",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4408,
                                "src": "8276:12:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 4862,
                              "id": 4934,
                              "nodeType": "Return",
                              "src": "8269:19:8"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4944,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4937,
                            "name": "_totalDifficulty",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4861,
                            "src": "8376:16:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 4940,
                                    "name": "_target",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4915,
                                    "src": "8416:7:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 4941,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "calculateDifficulty",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3790,
                                  "src": "8416:27:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 4942,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8416:29:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4938,
                                "name": "_totalDifficulty",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4861,
                                "src": "8395:16:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4939,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4365,
                              "src": "8395:20:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4943,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8395:51:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8376:70:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4945,
                        "nodeType": "ExpressionStatement",
                        "src": "8376:70:8"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4887,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4884,
                      "name": "_start",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4881,
                      "src": "7628:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4885,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4858,
                        "src": "7637:8:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4886,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "7637:15:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7628:24:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 4947,
                  "initializationExpression": {
                    "assignments": [
                      4881
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 4881,
                        "name": "_start",
                        "nodeType": "VariableDeclaration",
                        "scope": 4947,
                        "src": "7608:14:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4880,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7608:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 4883,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4882,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7625:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "7608:18:8"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 4890,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 4888,
                        "name": "_start",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4881,
                        "src": "7654:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "+=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 4889,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7664:2:8",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "7654:12:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 4891,
                    "nodeType": "ExpressionStatement",
                    "src": "7654:12:8"
                  },
                  "nodeType": "ForStatement",
                  "src": "7603:854:8"
                }
              ]
            },
            "documentation": "@notice             Checks validity of header chain\n @notice             Compares the hash of each header to the prevHash in the next header\n @param _headers     Raw byte array of header chain\n @return             The total accumulated difficulty of the header chain, or an error code",
            "id": 4949,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderChain",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4859,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4858,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 4949,
                  "src": "7320:21:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4857,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "7320:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7319:23:8"
            },
            "returnParameters": {
              "id": 4862,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4861,
                  "name": "_totalDifficulty",
                  "nodeType": "VariableDeclaration",
                  "scope": 4949,
                  "src": "7366:24:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4860,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7366:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7365:26:8"
            },
            "scope": 5008,
            "src": "7291:1172:8",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4979,
              "nodeType": "Block",
              "src": "8784:146:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4962,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4958,
                      "name": "_digest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4951,
                      "src": "8798:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 4960,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8817:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 4959,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "8809:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_bytes32_$",
                          "typeString": "type(bytes32)"
                        },
                        "typeName": "bytes32"
                      },
                      "id": 4961,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8809:10:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "8798:21:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4966,
                  "nodeType": "IfStatement",
                  "src": "8794:42:8",
                  "trueBody": {
                    "id": 4965,
                    "nodeType": "Block",
                    "src": "8821:15:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 4963,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8829:5:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 4957,
                        "id": 4964,
                        "nodeType": "Return",
                        "src": "8822:12:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4976,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 4969,
                                      "name": "_digest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4951,
                                      "src": "8870:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4967,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5010,
                                      "src": "8853:3:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 4968,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "8853:16:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4970,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8853:25:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4971,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 2579,
                                "src": "8853:43:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory) pure returns (bytes memory)"
                                }
                              },
                              "id": 4972,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8853:45:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4973,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2726,
                            "src": "8853:57:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4974,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8853:59:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 4975,
                          "name": "_target",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4953,
                          "src": "8915:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "8853:69:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "id": 4977,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "8852:71:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 4957,
                  "id": 4978,
                  "nodeType": "Return",
                  "src": "8845:78:8"
                }
              ]
            },
            "documentation": "@notice             Checks validity of header work\n @param _digest      Header digest\n @param _target      The target threshold\n @return             true if header work is valid, false otherwise",
            "id": 4980,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderWork",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4954,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4951,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 4980,
                  "src": "8721:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4950,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8721:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4953,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 4980,
                  "src": "8738:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4952,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8738:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8720:34:8"
            },
            "returnParameters": {
              "id": 4957,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4956,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4980,
                  "src": "8778:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4955,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "8778:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8777:6:8"
            },
            "scope": 5008,
            "src": "8693:237:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5006,
              "nodeType": "Block",
              "src": "9416:281:8",
              "statements": [
                {
                  "assignments": [
                    4990
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4990,
                      "name": "_prevHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 5006,
                      "src": "9473:17:8",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 4989,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "9473:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4996,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4991,
                            "name": "_header",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4982,
                            "src": "9493:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4992,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractPrevBlockLE",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3804,
                          "src": "9493:26:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes memory)"
                          }
                        },
                        "id": 4993,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9493:28:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4994,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "toBytes32",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4244,
                      "src": "9493:38:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 4995,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9493:40:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9473:60:8"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4999,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4997,
                      "name": "_prevHash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4990,
                      "src": "9622:9:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4998,
                      "name": "_prevHeaderDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4984,
                      "src": "9635:17:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "9622:30:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 5003,
                  "nodeType": "IfStatement",
                  "src": "9618:51:8",
                  "trueBody": {
                    "id": 5002,
                    "nodeType": "Block",
                    "src": "9654:15:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 5000,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9662:5:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 4988,
                        "id": 5001,
                        "nodeType": "Return",
                        "src": "9655:12:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 5004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9686:4:8",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 4988,
                  "id": 5005,
                  "nodeType": "Return",
                  "src": "9679:11:8"
                }
              ]
            },
            "documentation": "@notice                     Checks validity of header chain\n @dev                        Compares current header prevHash to previous header's digest\n @param _header              The raw bytes header\n @param _prevHeaderDigest    The previous header's digest\n @return                     true if header chain is valid, false otherwise",
            "id": 5007,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderPrevHash",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4985,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4982,
                  "name": "_header",
                  "nodeType": "VariableDeclaration",
                  "scope": 5007,
                  "src": "9338:20:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4981,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "9338:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4984,
                  "name": "_prevHeaderDigest",
                  "nodeType": "VariableDeclaration",
                  "scope": 5007,
                  "src": "9360:25:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4983,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "9360:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9337:49:8"
            },
            "returnParameters": {
              "id": 4988,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4987,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5007,
                  "src": "9410:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4986,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "9410:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9409:6:8"
            },
            "scope": 5008,
            "src": "9306:391:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 5009,
        "src": "218:9481:8"
      }
    ],
    "src": "0:9700:8"
  },
  "legacyAST": {
    "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
    "exportedSymbols": {
      "ValidateSPV": [
        5008
      ]
    },
    "id": 5009,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4368,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".10"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:8"
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
        "file": "./BytesLib.sol",
        "id": 4370,
        "nodeType": "ImportDirective",
        "scope": 5009,
        "sourceUnit": 4270,
        "src": "93:40:8",
        "symbolAliases": [
          {
            "foreign": 4369,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
        "file": "./SafeMath.sol",
        "id": 4372,
        "nodeType": "ImportDirective",
        "scope": 5009,
        "sourceUnit": 4367,
        "src": "134:40:8",
        "symbolAliases": [
          {
            "foreign": 4371,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
        "file": "./BTCUtils.sol",
        "id": 4374,
        "nodeType": "ImportDirective",
        "scope": 5009,
        "sourceUnit": 4083,
        "src": "175:40:8",
        "symbolAliases": [
          {
            "foreign": 4373,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 5008,
        "linearizedBaseContracts": [
          5008
        ],
        "name": "ValidateSPV",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 4377,
            "libraryName": {
              "contractScope": null,
              "id": 4375,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4082,
              "src": "251:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$4082",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "245:25:8",
            "typeName": {
              "id": 4376,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "264:5:8",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 4380,
            "libraryName": {
              "contractScope": null,
              "id": 4378,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4082,
              "src": "281:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$4082",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "275:27:8",
            "typeName": {
              "id": 4379,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "294:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "id": 4383,
            "libraryName": {
              "contractScope": null,
              "id": 4381,
              "name": "BytesLib",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4269,
              "src": "313:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BytesLib_$4269",
                "typeString": "library BytesLib"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "307:25:8",
            "typeName": {
              "id": 4382,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "326:5:8",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 4386,
            "libraryName": {
              "contractScope": null,
              "id": 4384,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4366,
              "src": "343:8:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$4366",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "337:27:8",
            "typeName": {
              "id": 4385,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "356:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "canonicalName": "ValidateSPV.InputTypes",
            "id": 4391,
            "members": [
              {
                "id": 4387,
                "name": "NONE",
                "nodeType": "EnumValue",
                "src": "388:4:8"
              },
              {
                "id": 4388,
                "name": "LEGACY",
                "nodeType": "EnumValue",
                "src": "394:6:8"
              },
              {
                "id": 4389,
                "name": "COMPATIBILITY",
                "nodeType": "EnumValue",
                "src": "402:13:8"
              },
              {
                "id": 4390,
                "name": "WITNESS",
                "nodeType": "EnumValue",
                "src": "417:7:8"
              }
            ],
            "name": "InputTypes",
            "nodeType": "EnumDefinition",
            "src": "370:56:8"
          },
          {
            "canonicalName": "ValidateSPV.OutputTypes",
            "id": 4399,
            "members": [
              {
                "id": 4392,
                "name": "NONE",
                "nodeType": "EnumValue",
                "src": "450:4:8"
              },
              {
                "id": 4393,
                "name": "WPKH",
                "nodeType": "EnumValue",
                "src": "456:4:8"
              },
              {
                "id": 4394,
                "name": "WSH",
                "nodeType": "EnumValue",
                "src": "462:3:8"
              },
              {
                "id": 4395,
                "name": "OP_RETURN",
                "nodeType": "EnumValue",
                "src": "467:9:8"
              },
              {
                "id": 4396,
                "name": "PKH",
                "nodeType": "EnumValue",
                "src": "478:3:8"
              },
              {
                "id": 4397,
                "name": "SH",
                "nodeType": "EnumValue",
                "src": "483:2:8"
              },
              {
                "id": 4398,
                "name": "NONSTANDARD",
                "nodeType": "EnumValue",
                "src": "487:11:8"
              }
            ],
            "name": "OutputTypes",
            "nodeType": "EnumDefinition",
            "src": "431:69:8"
          },
          {
            "constant": true,
            "id": 4402,
            "name": "ERR_BAD_LENGTH",
            "nodeType": "VariableDeclaration",
            "scope": 5008,
            "src": "506:100:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 4400,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "506:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666",
              "id": 4401,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "540:66:8",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9935"
              },
              "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 4405,
            "name": "ERR_INVALID_CHAIN",
            "nodeType": "VariableDeclaration",
            "scope": 5008,
            "src": "612:103:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 4403,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "612:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665",
              "id": 4404,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "649:66:8",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639934_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9934"
              },
              "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 4408,
            "name": "ERR_LOW_WORK",
            "nodeType": "VariableDeclaration",
            "scope": 5008,
            "src": "721:98:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 4406,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "721:7:8",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666664",
              "id": 4407,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "753:66:8",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639933_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9933"
              },
              "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd"
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4415,
              "nodeType": "Block",
              "src": "885:38:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4413,
                    "name": "ERR_BAD_LENGTH",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4402,
                    "src": "902:14:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4412,
                  "id": 4414,
                  "nodeType": "Return",
                  "src": "895:21:8"
                }
              ]
            },
            "documentation": null,
            "id": 4416,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrBadLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4409,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "850:2:8"
            },
            "returnParameters": {
              "id": 4412,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4411,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4416,
                  "src": "876:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4410,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "876:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "875:9:8"
            },
            "scope": 5008,
            "src": "826:97:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4423,
              "nodeType": "Block",
              "src": "991:41:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4421,
                    "name": "ERR_INVALID_CHAIN",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4405,
                    "src": "1008:17:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4420,
                  "id": 4422,
                  "nodeType": "Return",
                  "src": "1001:24:8"
                }
              ]
            },
            "documentation": null,
            "id": 4424,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrInvalidChain",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4417,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "956:2:8"
            },
            "returnParameters": {
              "id": 4420,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4419,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4424,
                  "src": "982:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4418,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "982:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "981:9:8"
            },
            "scope": 5008,
            "src": "929:103:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4431,
              "nodeType": "Block",
              "src": "1095:36:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4429,
                    "name": "ERR_LOW_WORK",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4408,
                    "src": "1112:12:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4428,
                  "id": 4430,
                  "nodeType": "Return",
                  "src": "1105:19:8"
                }
              ]
            },
            "documentation": null,
            "id": 4432,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrLowWork",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4425,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1060:2:8"
            },
            "returnParameters": {
              "id": 4428,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4427,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4432,
                  "src": "1086:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4426,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1086:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1085:9:8"
            },
            "scope": 5008,
            "src": "1038:93:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4475,
              "nodeType": "Block",
              "src": "1751:363:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 4456,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "id": 4451,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 4447,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4445,
                          "name": "_txid",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4434,
                          "src": "1806:5:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 4446,
                          "name": "_merkleRoot",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4436,
                          "src": "1815:11:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "1806:20:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "&&",
                      "rightExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4450,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4448,
                          "name": "_index",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4440,
                          "src": "1830:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 4449,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1840:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1830:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "src": "1806:35:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4455,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4452,
                          "name": "_intermediateNodes",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4438,
                          "src": "1845:18:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4453,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1845:25:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 4454,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1874:1:8",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "1845:30:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1806:69:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4460,
                  "nodeType": "IfStatement",
                  "src": "1802:111:8",
                  "trueBody": {
                    "id": 4459,
                    "nodeType": "Block",
                    "src": "1877:36:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 4457,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1898:4:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4444,
                        "id": 4458,
                        "nodeType": "Return",
                        "src": "1891:11:8"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4462
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4462,
                      "name": "_proof",
                      "nodeType": "VariableDeclaration",
                      "scope": 4475,
                      "src": "1923:19:8",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 4461,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1923:5:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4469,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4465,
                        "name": "_txid",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4434,
                        "src": "1962:5:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4466,
                        "name": "_intermediateNodes",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4438,
                        "src": "1969:18:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4467,
                        "name": "_merkleRoot",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4436,
                        "src": "1989:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 4463,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5010,
                        "src": "1945:3:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 4464,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodePacked",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1945:16:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function () pure returns (bytes memory)"
                      }
                    },
                    "id": 4468,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1945:56:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1923:78:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4472,
                        "name": "_index",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4440,
                        "src": "2100:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 4470,
                        "name": "_proof",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4462,
                        "src": "2073:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4471,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "verifyHash256Merkle",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4014,
                      "src": "2073:26:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory,uint256) pure returns (bool)"
                      }
                    },
                    "id": 4473,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2073:34:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 4444,
                  "id": 4474,
                  "nodeType": "Return",
                  "src": "2066:41:8"
                }
              ]
            },
            "documentation": "@notice                     Validates a tx inclusion in the block\n @param _txid                The txid (LE)\n @param _merkleRoot          The merkle root (as in the block header)\n @param _intermediateNodes   The proof's intermediate nodes (digests between leaf and root)\n @param _index               The leaf's index in the tree (0-indexed)\n @return                     true if fully valid, false otherwise",
            "id": 4476,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "prove",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4441,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4434,
                  "name": "_txid",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1611:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4433,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1611:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4436,
                  "name": "_merkleRoot",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1634:19:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4435,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1634:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4438,
                  "name": "_intermediateNodes",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1663:31:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4437,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1663:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4440,
                  "name": "_index",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1704:11:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4439,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1704:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1601:120:8"
            },
            "returnParameters": {
              "id": 4444,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4443,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4476,
                  "src": "1745:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4442,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1745:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1744:6:8"
            },
            "scope": 5008,
            "src": "1587:527:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4499,
              "nodeType": "Block",
              "src": "2706:184:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4491,
                            "name": "_version",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4478,
                            "src": "2840:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 4492,
                            "name": "_vin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4480,
                            "src": "2850:4:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 4493,
                            "name": "_vout",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4482,
                            "src": "2856:5:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 4494,
                            "name": "_locktime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4484,
                            "src": "2863:9:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4489,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5010,
                            "src": "2823:3:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 4490,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2823:16:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 4495,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2823:50:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4496,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2792,
                      "src": "2823:58:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 4497,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2823:60:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 4488,
                  "id": 4498,
                  "nodeType": "Return",
                  "src": "2816:67:8"
                }
              ]
            },
            "documentation": "@notice             Hashes transaction to get txid\n @dev                Supports Legacy and Witness\n @param _version     4-bytes version\n @param _vin         Raw bytes length-prefixed input vector\n @param _vout        Raw bytes length-prefixed output vector\n @ param _locktime   4-byte tx locktime\n @return             32-byte transaction id, little endian",
            "id": 4500,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "calculateTxId",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4485,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4478,
                  "name": "_version",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2559:21:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4477,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2559:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4480,
                  "name": "_vin",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2590:17:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4479,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2590:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4482,
                  "name": "_vout",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2617:18:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4481,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2617:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4484,
                  "name": "_locktime",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2645:22:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4483,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2645:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2549:124:8"
            },
            "returnParameters": {
              "id": 4488,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4487,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4500,
                  "src": "2697:7:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4486,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2697:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2696:9:8"
            },
            "scope": 5008,
            "src": "2527:363:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4590,
              "nodeType": "Block",
              "src": "3260:783:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4521,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "3336",
                          "id": 4515,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3405:2:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_36_by_1",
                            "typeString": "int_const 36"
                          },
                          "value": "36"
                        },
                        {
                          "argumentTypes": null,
                          "hexValue": "31",
                          "id": 4516,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3409:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_36_by_1",
                            "typeString": "int_const 36"
                          },
                          {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4513,
                          "name": "_input",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4502,
                          "src": "3383:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4514,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "keccak256Slice",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4268,
                        "src": "3383:21:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                        }
                      },
                      "id": 4517,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3383:28:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "00",
                          "id": 4519,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3425:7:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_bc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a",
                            "typeString": "literal_string \"\u0000\""
                          },
                          "value": "\u0000"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_stringliteral_bc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a",
                            "typeString": "literal_string \"\u0000\""
                          }
                        ],
                        "id": 4518,
                        "name": "keccak256",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5017,
                        "src": "3415:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4520,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3415:18:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "3383:50:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4578,
                    "nodeType": "Block",
                    "src": "3824:120:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4569,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4565,
                            "name": "_sequence",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4505,
                            "src": "3838:9:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4566,
                                "name": "_input",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4502,
                                "src": "3850:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4567,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractSequenceWitness",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3120,
                              "src": "3850:29:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (uint32)"
                              }
                            },
                            "id": 4568,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3850:31:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "src": "3838:43:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "id": 4570,
                        "nodeType": "ExpressionStatement",
                        "src": "3838:43:8"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4576,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4571,
                            "name": "_inputType",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4511,
                            "src": "3895:10:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4573,
                                  "name": "InputTypes",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4391,
                                  "src": "3914:10:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_InputTypes_$4391_$",
                                    "typeString": "type(enum ValidateSPV.InputTypes)"
                                  }
                                },
                                "id": 4574,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "WITNESS",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "3914:18:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_InputTypes_$4391",
                                  "typeString": "enum ValidateSPV.InputTypes"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_enum$_InputTypes_$4391",
                                  "typeString": "enum ValidateSPV.InputTypes"
                                }
                              ],
                              "id": 4572,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3908:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint8_$",
                                "typeString": "type(uint8)"
                              },
                              "typeName": "uint8"
                            },
                            "id": 4575,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3908:25:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "3895:38:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 4577,
                        "nodeType": "ExpressionStatement",
                        "src": "3895:38:8"
                      }
                    ]
                  },
                  "id": 4579,
                  "nodeType": "IfStatement",
                  "src": "3379:565:8",
                  "trueBody": {
                    "id": 4564,
                    "nodeType": "Block",
                    "src": "3435:383:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4526,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4522,
                            "name": "_sequence",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4505,
                            "src": "3449:9:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4523,
                                "name": "_input",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4502,
                                "src": "3461:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4524,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractSequenceLegacy",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2989,
                              "src": "3461:28:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (uint32)"
                              }
                            },
                            "id": 4525,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3461:30:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "src": "3449:42:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "id": 4527,
                        "nodeType": "ExpressionStatement",
                        "src": "3449:42:8"
                      },
                      {
                        "assignments": [
                          4529
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4529,
                            "name": "_witnessTag",
                            "nodeType": "VariableDeclaration",
                            "scope": 4564,
                            "src": "3505:19:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 4528,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3505:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4535,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "3336",
                              "id": 4532,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3549:2:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_36_by_1",
                                "typeString": "int_const 36"
                              },
                              "value": "36"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "33",
                              "id": 4533,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3553:1:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              },
                              "value": "3"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_36_by_1",
                                "typeString": "int_const 36"
                              },
                              {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4530,
                              "name": "_input",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4502,
                              "src": "3527:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4531,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "keccak256Slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4268,
                            "src": "3527:21:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 4534,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3527:28:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3505:50:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 4546,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 4540,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 4536,
                              "name": "_witnessTag",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4529,
                              "src": "3574:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "220020",
                                  "id": 4538,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3599:11:8",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_33b5f6d42eef1e9e31f928375546beb5ccbc06516f549bb51f33536680ad4439",
                                    "typeString": "literal_string \"\"\u0000 \""
                                  },
                                  "value": "\"\u0000 "
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_33b5f6d42eef1e9e31f928375546beb5ccbc06516f549bb51f33536680ad4439",
                                    "typeString": "literal_string \"\"\u0000 \""
                                  }
                                ],
                                "id": 4537,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5017,
                                "src": "3589:9:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 4539,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3589:22:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3574:37:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 4545,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 4541,
                              "name": "_witnessTag",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4529,
                              "src": "3615:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "160014",
                                  "id": 4543,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3640:11:8",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_bde11925feafe00f4d9d48ef4480be1ea68d808b9c557770a6133e20d41f44bf",
                                    "typeString": "literal_string \"\u0016\u0000\u0014\""
                                  },
                                  "value": "\u0016\u0000\u0014"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_bde11925feafe00f4d9d48ef4480be1ea68d808b9c557770a6133e20d41f44bf",
                                    "typeString": "literal_string \"\u0016\u0000\u0014\""
                                  }
                                ],
                                "id": 4542,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5017,
                                "src": "3630:9:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 4544,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3630:22:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "3615:37:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "3574:78:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 4562,
                          "nodeType": "Block",
                          "src": "3737:70:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4560,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4555,
                                  "name": "_inputType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4511,
                                  "src": "3755:10:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4557,
                                        "name": "InputTypes",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4391,
                                        "src": "3774:10:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_enum$_InputTypes_$4391_$",
                                          "typeString": "type(enum ValidateSPV.InputTypes)"
                                        }
                                      },
                                      "id": 4558,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "LEGACY",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "3774:17:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    ],
                                    "id": 4556,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "3768:5:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint8_$",
                                      "typeString": "type(uint8)"
                                    },
                                    "typeName": "uint8"
                                  },
                                  "id": 4559,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3768:24:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "src": "3755:37:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "id": 4561,
                              "nodeType": "ExpressionStatement",
                              "src": "3755:37:8"
                            }
                          ]
                        },
                        "id": 4563,
                        "nodeType": "IfStatement",
                        "src": "3570:237:8",
                        "trueBody": {
                          "id": 4554,
                          "nodeType": "Block",
                          "src": "3654:77:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4552,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4547,
                                  "name": "_inputType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4511,
                                  "src": "3672:10:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4549,
                                        "name": "InputTypes",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4391,
                                        "src": "3691:10:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_enum$_InputTypes_$4391_$",
                                          "typeString": "type(enum ValidateSPV.InputTypes)"
                                        }
                                      },
                                      "id": 4550,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "COMPATIBILITY",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "3691:24:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_InputTypes_$4391",
                                        "typeString": "enum ValidateSPV.InputTypes"
                                      }
                                    ],
                                    "id": 4548,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "3685:5:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint8_$",
                                      "typeString": "type(uint8)"
                                    },
                                    "typeName": "uint8"
                                  },
                                  "id": 4551,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3685:31:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "src": "3672:44:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "id": 4553,
                              "nodeType": "ExpressionStatement",
                              "src": "3672:44:8"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 4580,
                        "name": "_sequence",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4505,
                        "src": "3962:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4581,
                            "name": "_input",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4502,
                            "src": "3973:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4582,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractInputTxId",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3177,
                          "src": "3973:23:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 4583,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3973:25:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4584,
                            "name": "_input",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4502,
                            "src": "4000:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4585,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractTxIndex",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3217,
                          "src": "4000:21:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (uint32)"
                          }
                        },
                        "id": 4586,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4000:23:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4587,
                        "name": "_inputType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4511,
                        "src": "4025:10:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "id": 4588,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "3961:75:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint32_$_t_bytes32_$_t_uint32_$_t_uint8_$",
                      "typeString": "tuple(uint32,bytes32,uint32,uint8)"
                    }
                  },
                  "functionReturnParameters": 4512,
                  "id": 4589,
                  "nodeType": "Return",
                  "src": "3954:82:8"
                }
              ]
            },
            "documentation": "@notice         Parses a tx input from raw input bytes\n @dev            Supports Legacy and Witness inputs\n @param _input   Raw bytes tx input\n @return         Tx input sequence number, tx hash, and index",
            "id": 4591,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseInput",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4503,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4502,
                  "name": "_input",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3150:19:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4501,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3150:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3149:21:8"
            },
            "returnParameters": {
              "id": 4512,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4505,
                  "name": "_sequence",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3194:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4504,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3194:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4507,
                  "name": "_hash",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3212:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4506,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3212:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4509,
                  "name": "_index",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3227:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4508,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3227:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4511,
                  "name": "_inputType",
                  "nodeType": "VariableDeclaration",
                  "scope": 4591,
                  "src": "3242:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4510,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "3242:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3193:66:8"
            },
            "scope": 5008,
            "src": "3130:913:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4742,
              "nodeType": "Block",
              "src": "4434:1241:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4606,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4602,
                      "name": "_value",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4596,
                      "src": "4445:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint64",
                        "typeString": "uint64"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4603,
                          "name": "_output",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4593,
                          "src": "4454:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4604,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractValue",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3382,
                        "src": "4454:20:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint64_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint64)"
                        }
                      },
                      "id": 4605,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4454:22:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint64",
                        "typeString": "uint64"
                      }
                    },
                    "src": "4445:31:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "id": 4607,
                  "nodeType": "ExpressionStatement",
                  "src": "4445:31:8"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4616,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "39",
                          "id": 4610,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4514:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_9_by_1",
                            "typeString": "int_const 9"
                          },
                          "value": "9"
                        },
                        {
                          "argumentTypes": null,
                          "hexValue": "31",
                          "id": 4611,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4517:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_9_by_1",
                            "typeString": "int_const 9"
                          },
                          {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4608,
                          "name": "_output",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4593,
                          "src": "4491:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4609,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "keccak256Slice",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4268,
                        "src": "4491:22:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                        }
                      },
                      "id": 4612,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4491:28:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "6a",
                          "id": 4614,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4533:7:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_b31d742db54d6961c6b346af2c9c4c495eb8aff2ebf6b3699e052d1cef5cf50b",
                            "typeString": "literal_string \"j\""
                          },
                          "value": "j"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_stringliteral_b31d742db54d6961c6b346af2c9c4c495eb8aff2ebf6b3699e052d1cef5cf50b",
                            "typeString": "literal_string \"j\""
                          }
                        ],
                        "id": 4613,
                        "name": "keccak256",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5017,
                        "src": "4523:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4615,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4523:18:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "4491:50:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4735,
                    "nodeType": "Block",
                    "src": "4695:925:8",
                    "statements": [
                      {
                        "assignments": [
                          4632
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4632,
                            "name": "_prefixHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 4735,
                            "src": "4709:19:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 4631,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4709:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4638,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 4635,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4754:1:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "32",
                              "id": 4636,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4757:1:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4633,
                              "name": "_output",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4593,
                              "src": "4731:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4634,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "keccak256Slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4268,
                            "src": "4731:22:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 4637,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4731:28:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4709:50:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 4643,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 4639,
                            "name": "_prefixHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4632,
                            "src": "4777:11:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "2200",
                                "id": 4641,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "string",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4802:9:8",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_stringliteral_b07fb0a3471486f9ccb02aab1d525df60d82925cb2d27860f923e655d76f35fc",
                                  "typeString": "literal_string \"\"\u0000\""
                                },
                                "value": "\"\u0000"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_b07fb0a3471486f9ccb02aab1d525df60d82925cb2d27860f923e655d76f35fc",
                                  "typeString": "literal_string \"\"\u0000\""
                                }
                              ],
                              "id": 4640,
                              "name": "keccak256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5017,
                              "src": "4792:9:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 4642,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4792:20:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4777:35:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 4664,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 4660,
                              "name": "_prefixHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4632,
                              "src": "4968:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "1600",
                                  "id": 4662,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4993:9:8",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_ef68c1dfb3907c1a4ede55ac1ea785d8b99118a36999824e5ba557e25a67f448",
                                    "typeString": "literal_string \"\u0016\u0000\""
                                  },
                                  "value": "\u0016\u0000"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_ef68c1dfb3907c1a4ede55ac1ea785d8b99118a36999824e5ba557e25a67f448",
                                    "typeString": "literal_string \"\u0016\u0000\""
                                  }
                                ],
                                "id": 4661,
                                "name": "keccak256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5017,
                                "src": "4983:9:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes memory) pure returns (bytes32)"
                                }
                              },
                              "id": 4663,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4983:20:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "src": "4968:35:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "condition": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "id": 4685,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4681,
                                "name": "_prefixHash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4632,
                                "src": "5161:11:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "hexValue": "1976",
                                    "id": 4683,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "string",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "5186:9:8",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_stringliteral_ad81b5075fc2fab784a78e7b78827a4218c83feb16873a545f008e5cd8266b6d",
                                      "typeString": "literal_string \"\u0019v\""
                                    },
                                    "value": "\u0019v"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_stringliteral_ad81b5075fc2fab784a78e7b78827a4218c83feb16873a545f008e5cd8266b6d",
                                      "typeString": "literal_string \"\u0019v\""
                                    }
                                  ],
                                  "id": 4682,
                                  "name": "keccak256",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5017,
                                  "src": "5176:9:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                    "typeString": "function (bytes memory) pure returns (bytes32)"
                                  }
                                },
                                "id": 4684,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5176:20:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "src": "5161:35:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "condition": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "id": 4706,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 4702,
                                  "name": "_prefixHash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4632,
                                  "src": "5350:11:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "17a9",
                                      "id": 4704,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "string",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5375:9:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_stringliteral_8c372bc872581e21a019e9c438c7646f8a6cf04e4c2acf7045e86bf2fabee118",
                                        "typeString": "literal_string (contains invalid UTF-8 sequence at position 1)"
                                      },
                                      "value": null
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_stringliteral_8c372bc872581e21a019e9c438c7646f8a6cf04e4c2acf7045e86bf2fabee118",
                                        "typeString": "literal_string (contains invalid UTF-8 sequence at position 1)"
                                      }
                                    ],
                                    "id": 4703,
                                    "name": "keccak256",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5017,
                                    "src": "5365:9:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                      "typeString": "function (bytes memory) pure returns (bytes32)"
                                    }
                                  },
                                  "id": 4705,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5365:20:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "5350:35:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 4730,
                                "nodeType": "Block",
                                "src": "5533:77:8",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4728,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "id": 4723,
                                        "name": "_outputType",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4598,
                                        "src": "5551:11:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "expression": {
                                              "argumentTypes": null,
                                              "id": 4725,
                                              "name": "OutputTypes",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 4399,
                                              "src": "5571:11:8",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                                "typeString": "type(enum ValidateSPV.OutputTypes)"
                                              }
                                            },
                                            "id": 4726,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "memberName": "NONSTANDARD",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": null,
                                            "src": "5571:23:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          ],
                                          "id": 4724,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "5565:5:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint8_$",
                                            "typeString": "type(uint8)"
                                          },
                                          "typeName": "uint8"
                                        },
                                        "id": 4727,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "5565:30:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "src": "5551:44:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "id": 4729,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5551:44:8"
                                  }
                                ]
                              },
                              "id": 4731,
                              "nodeType": "IfStatement",
                              "src": "5346:264:8",
                              "trueBody": {
                                "id": 4722,
                                "nodeType": "Block",
                                "src": "5387:140:8",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4712,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "id": 4707,
                                        "name": "_outputType",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4598,
                                        "src": "5427:11:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "expression": {
                                              "argumentTypes": null,
                                              "id": 4709,
                                              "name": "OutputTypes",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 4399,
                                              "src": "5447:11:8",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                                "typeString": "type(enum ValidateSPV.OutputTypes)"
                                              }
                                            },
                                            "id": 4710,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "memberName": "SH",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": null,
                                            "src": "5447:14:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                              "typeString": "enum ValidateSPV.OutputTypes"
                                            }
                                          ],
                                          "id": 4708,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "5441:5:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint8_$",
                                            "typeString": "type(uint8)"
                                          },
                                          "typeName": "uint8"
                                        },
                                        "id": 4711,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "5441:21:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "src": "5427:35:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "id": 4713,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5427:35:8"
                                  },
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4720,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "id": 4714,
                                        "name": "_payload",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4600,
                                        "src": "5480:8:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "hexValue": "3131",
                                            "id": 4717,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "5505:2:8",
                                            "subdenomination": null,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_rational_11_by_1",
                                              "typeString": "int_const 11"
                                            },
                                            "value": "11"
                                          },
                                          {
                                            "argumentTypes": null,
                                            "hexValue": "3230",
                                            "id": 4718,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "5509:2:8",
                                            "subdenomination": null,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_rational_20_by_1",
                                              "typeString": "int_const 20"
                                            },
                                            "value": "20"
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_rational_11_by_1",
                                              "typeString": "int_const 11"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_20_by_1",
                                              "typeString": "int_const 20"
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": null,
                                            "id": 4715,
                                            "name": "_output",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 4593,
                                            "src": "5491:7:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bytes_memory_ptr",
                                              "typeString": "bytes memory"
                                            }
                                          },
                                          "id": 4716,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "slice",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 4133,
                                          "src": "5491:13:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                            "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                          }
                                        },
                                        "id": 4719,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "5491:21:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "src": "5480:32:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4721,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5480:32:8"
                                  }
                                ]
                              }
                            },
                            "id": 4732,
                            "nodeType": "IfStatement",
                            "src": "5157:453:8",
                            "trueBody": {
                              "id": 4701,
                              "nodeType": "Block",
                              "src": "5198:142:8",
                              "statements": [
                                {
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 4691,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "argumentTypes": null,
                                      "id": 4686,
                                      "name": "_outputType",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4598,
                                      "src": "5239:11:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "expression": {
                                            "argumentTypes": null,
                                            "id": 4688,
                                            "name": "OutputTypes",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 4399,
                                            "src": "5259:11:8",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                              "typeString": "type(enum ValidateSPV.OutputTypes)"
                                            }
                                          },
                                          "id": 4689,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "memberName": "PKH",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": null,
                                          "src": "5259:15:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                            "typeString": "enum ValidateSPV.OutputTypes"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                            "typeString": "enum ValidateSPV.OutputTypes"
                                          }
                                        ],
                                        "id": 4687,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "5253:5:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint8_$",
                                          "typeString": "type(uint8)"
                                        },
                                        "typeName": "uint8"
                                      },
                                      "id": 4690,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5253:22:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    },
                                    "src": "5239:36:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "id": 4692,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5239:36:8"
                                },
                                {
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 4699,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "argumentTypes": null,
                                      "id": 4693,
                                      "name": "_payload",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4600,
                                      "src": "5293:8:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "hexValue": "3132",
                                          "id": 4696,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "5318:2:8",
                                          "subdenomination": null,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_12_by_1",
                                            "typeString": "int_const 12"
                                          },
                                          "value": "12"
                                        },
                                        {
                                          "argumentTypes": null,
                                          "hexValue": "3230",
                                          "id": 4697,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "5322:2:8",
                                          "subdenomination": null,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_20_by_1",
                                            "typeString": "int_const 20"
                                          },
                                          "value": "20"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_rational_12_by_1",
                                            "typeString": "int_const 12"
                                          },
                                          {
                                            "typeIdentifier": "t_rational_20_by_1",
                                            "typeString": "int_const 20"
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": null,
                                          "id": 4694,
                                          "name": "_output",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 4593,
                                          "src": "5304:7:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_memory_ptr",
                                            "typeString": "bytes memory"
                                          }
                                        },
                                        "id": 4695,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "slice",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 4133,
                                        "src": "5304:13:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                          "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                        }
                                      },
                                      "id": 4698,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5304:21:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "src": "5293:32:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 4700,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5293:32:8"
                                }
                              ]
                            }
                          },
                          "id": 4733,
                          "nodeType": "IfStatement",
                          "src": "4964:646:8",
                          "trueBody": {
                            "id": 4680,
                            "nodeType": "Block",
                            "src": "5005:146:8",
                            "statements": [
                              {
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4670,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "argumentTypes": null,
                                    "id": 4665,
                                    "name": "_outputType",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4598,
                                    "src": "5049:11:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "expression": {
                                          "argumentTypes": null,
                                          "id": 4667,
                                          "name": "OutputTypes",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 4399,
                                          "src": "5069:11:8",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                            "typeString": "type(enum ValidateSPV.OutputTypes)"
                                          }
                                        },
                                        "id": 4668,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "memberName": "WPKH",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": null,
                                        "src": "5069:16:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                          "typeString": "enum ValidateSPV.OutputTypes"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                          "typeString": "enum ValidateSPV.OutputTypes"
                                        }
                                      ],
                                      "id": 4666,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "5063:5:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint8_$",
                                        "typeString": "type(uint8)"
                                      },
                                      "typeName": "uint8"
                                    },
                                    "id": 4669,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "5063:23:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "src": "5049:37:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "id": 4671,
                                "nodeType": "ExpressionStatement",
                                "src": "5049:37:8"
                              },
                              {
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4678,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "argumentTypes": null,
                                    "id": 4672,
                                    "name": "_payload",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4600,
                                    "src": "5104:8:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "hexValue": "3131",
                                        "id": 4675,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5129:2:8",
                                        "subdenomination": null,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_11_by_1",
                                          "typeString": "int_const 11"
                                        },
                                        "value": "11"
                                      },
                                      {
                                        "argumentTypes": null,
                                        "hexValue": "3230",
                                        "id": 4676,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5133:2:8",
                                        "subdenomination": null,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_20_by_1",
                                          "typeString": "int_const 20"
                                        },
                                        "value": "20"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_11_by_1",
                                          "typeString": "int_const 11"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_20_by_1",
                                          "typeString": "int_const 20"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4673,
                                        "name": "_output",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4593,
                                        "src": "5115:7:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "id": 4674,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "slice",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 4133,
                                      "src": "5115:13:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                        "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                      }
                                    },
                                    "id": 4677,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "5115:21:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "src": "5104:32:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4679,
                                "nodeType": "ExpressionStatement",
                                "src": "5104:32:8"
                              }
                            ]
                          }
                        },
                        "id": 4734,
                        "nodeType": "IfStatement",
                        "src": "4773:837:8",
                        "trueBody": {
                          "id": 4659,
                          "nodeType": "Block",
                          "src": "4814:144:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4649,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4644,
                                  "name": "_outputType",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4598,
                                  "src": "4857:11:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 4646,
                                        "name": "OutputTypes",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4399,
                                        "src": "4877:11:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                          "typeString": "type(enum ValidateSPV.OutputTypes)"
                                        }
                                      },
                                      "id": 4647,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "WSH",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "4877:15:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                        "typeString": "enum ValidateSPV.OutputTypes"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                        "typeString": "enum ValidateSPV.OutputTypes"
                                      }
                                    ],
                                    "id": 4645,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "4871:5:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint8_$",
                                      "typeString": "type(uint8)"
                                    },
                                    "typeName": "uint8"
                                  },
                                  "id": 4648,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4871:22:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "src": "4857:36:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "id": 4650,
                              "nodeType": "ExpressionStatement",
                              "src": "4857:36:8"
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4657,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 4651,
                                  "name": "_payload",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4600,
                                  "src": "4911:8:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "3131",
                                      "id": 4654,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "4936:2:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_11_by_1",
                                        "typeString": "int_const 11"
                                      },
                                      "value": "11"
                                    },
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "3332",
                                      "id": 4655,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "4940:2:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_32_by_1",
                                        "typeString": "int_const 32"
                                      },
                                      "value": "32"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_11_by_1",
                                        "typeString": "int_const 11"
                                      },
                                      {
                                        "typeIdentifier": "t_rational_32_by_1",
                                        "typeString": "int_const 32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4652,
                                      "name": "_output",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4593,
                                      "src": "4922:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4653,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "slice",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4133,
                                    "src": "4922:13:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4656,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4922:21:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "src": "4911:32:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4658,
                              "nodeType": "ExpressionStatement",
                              "src": "4911:32:8"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 4736,
                  "nodeType": "IfStatement",
                  "src": "4487:1133:8",
                  "trueBody": {
                    "id": 4630,
                    "nodeType": "Block",
                    "src": "4543:146:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4622,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4617,
                            "name": "_outputType",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4598,
                            "src": "4582:11:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4619,
                                  "name": "OutputTypes",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4399,
                                  "src": "4602:11:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_OutputTypes_$4399_$",
                                    "typeString": "type(enum ValidateSPV.OutputTypes)"
                                  }
                                },
                                "id": 4620,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "OP_RETURN",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "4602:21:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                  "typeString": "enum ValidateSPV.OutputTypes"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_enum$_OutputTypes_$4399",
                                  "typeString": "enum ValidateSPV.OutputTypes"
                                }
                              ],
                              "id": 4618,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4596:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint8_$",
                                "typeString": "type(uint8)"
                              },
                              "typeName": "uint8"
                            },
                            "id": 4621,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4596:28:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "4582:42:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 4623,
                        "nodeType": "ExpressionStatement",
                        "src": "4582:42:8"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4628,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4624,
                            "name": "_payload",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4600,
                            "src": "4638:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4625,
                                "name": "_output",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4593,
                                "src": "4649:7:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4626,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractOpReturnData",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3419,
                              "src": "4649:27:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (bytes memory)"
                              }
                            },
                            "id": 4627,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4649:29:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "src": "4638:40:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4629,
                        "nodeType": "ExpressionStatement",
                        "src": "4638:40:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 4737,
                        "name": "_value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4596,
                        "src": "5638:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint64",
                          "typeString": "uint64"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4738,
                        "name": "_outputType",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4598,
                        "src": "5646:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4739,
                        "name": "_payload",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4600,
                        "src": "5659:8:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "id": 4740,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "5637:31:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint64_$_t_uint8_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(uint64,uint8,bytes memory)"
                    }
                  },
                  "functionReturnParameters": 4601,
                  "id": 4741,
                  "nodeType": "Return",
                  "src": "5630:38:8"
                }
              ]
            },
            "documentation": "@notice         Parses a tx output from raw output bytes\n @dev            Differentiates by output script prefix, handles legacy and witness\n @param _output  Raw bytes tx output\n @return         Tx output value, output type, payload",
            "id": 4743,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseOutput",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4594,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4593,
                  "name": "_output",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4332:20:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4592,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4332:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4331:22:8"
            },
            "returnParameters": {
              "id": 4601,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4596,
                  "name": "_value",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4377:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 4595,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "4377:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4598,
                  "name": "_outputType",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4392:17:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4597,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "4392:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4600,
                  "name": "_payload",
                  "nodeType": "VariableDeclaration",
                  "scope": 4743,
                  "src": "4411:21:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4599,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4411:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4376:57:8"
            },
            "scope": 5008,
            "src": "4311:1364:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4855,
              "nodeType": "Block",
              "src": "6207:764:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4765,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4762,
                        "name": "_header",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4745,
                        "src": "6281:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "6281:14:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3830",
                      "id": 4764,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6299:2:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_80_by_1",
                        "typeString": "int_const 80"
                      },
                      "value": "80"
                    },
                    "src": "6281:20:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4776,
                  "nodeType": "IfStatement",
                  "src": "6277:129:8",
                  "trueBody": {
                    "id": 4775,
                    "nodeType": "Block",
                    "src": "6303:103:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "id": 4766,
                              "name": "_digest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4748,
                              "src": "6324:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4767,
                              "name": "_version",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4750,
                              "src": "6333:8:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4768,
                              "name": "_prevHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4752,
                              "src": "6343:9:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4769,
                              "name": "_merkleRoot",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4754,
                              "src": "6354:11:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4770,
                              "name": "_timestamp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4756,
                              "src": "6367:10:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4771,
                              "name": "_target",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4758,
                              "src": "6379:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4772,
                              "name": "_nonce",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4760,
                              "src": "6388:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            }
                          ],
                          "id": 4773,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "6323:72:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint32_$_t_bytes32_$_t_bytes32_$_t_uint32_$_t_uint256_$_t_uint32_$",
                            "typeString": "tuple(bytes32,uint32,bytes32,bytes32,uint32,uint256,uint32)"
                          }
                        },
                        "functionReturnParameters": 4761,
                        "id": 4774,
                        "nodeType": "Return",
                        "src": "6317:78:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4788,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4777,
                      "name": "_digest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4748,
                      "src": "6416:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4780,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4745,
                                      "src": "6443:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4781,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "hash256",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 2792,
                                    "src": "6443:15:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory) pure returns (bytes32)"
                                    }
                                  },
                                  "id": 4782,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6443:17:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4778,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5010,
                                  "src": "6426:3:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 4779,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodePacked",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "6426:16:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 4783,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6426:35:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4784,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "reverseEndianness",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2579,
                            "src": "6426:53:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 4785,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6426:55:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4786,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "toBytes32",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4244,
                        "src": "6426:65:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4787,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6426:67:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "6416:77:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4789,
                  "nodeType": "ExpressionStatement",
                  "src": "6416:77:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4802,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4790,
                      "name": "_version",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4750,
                      "src": "6503:8:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "30",
                                      "id": 4794,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6535:1:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "34",
                                      "id": 4795,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6538:1:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      },
                                      "value": "4"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4792,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4745,
                                      "src": "6521:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4793,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "slice",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4133,
                                    "src": "6521:13:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4796,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6521:19:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4797,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 2579,
                                "src": "6521:37:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory) pure returns (bytes memory)"
                                }
                              },
                              "id": 4798,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6521:39:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4799,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2726,
                            "src": "6521:51:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4800,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6521:53:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 4791,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "6514:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint32_$",
                          "typeString": "type(uint32)"
                        },
                        "typeName": "uint32"
                      },
                      "id": 4801,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6514:61:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "6503:72:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "id": 4803,
                  "nodeType": "ExpressionStatement",
                  "src": "6503:72:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4810,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4804,
                      "name": "_prevHash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4752,
                      "src": "6585:9:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4805,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4745,
                              "src": "6597:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4806,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractPrevBlockLE",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3804,
                            "src": "6597:26:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 4807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6597:28:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4808,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "toBytes32",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4244,
                        "src": "6597:38:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4809,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6597:40:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "6585:52:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4811,
                  "nodeType": "ExpressionStatement",
                  "src": "6585:52:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4818,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4812,
                      "name": "_merkleRoot",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4754,
                      "src": "6647:11:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4813,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4745,
                              "src": "6661:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4814,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractMerkleRootLE",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3718,
                            "src": "6661:27:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                            }
                          },
                          "id": 4815,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6661:29:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4816,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "toBytes32",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4244,
                        "src": "6661:39:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (bytes32)"
                        }
                      },
                      "id": 4817,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6661:41:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "6647:55:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4819,
                  "nodeType": "ExpressionStatement",
                  "src": "6647:55:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4824,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4820,
                      "name": "_timestamp",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4756,
                      "src": "6712:10:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4821,
                          "name": "_header",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4745,
                          "src": "6725:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4822,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractTimestamp",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3850,
                        "src": "6725:24:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint32)"
                        }
                      },
                      "id": 4823,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6725:26:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "6712:39:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "id": 4825,
                  "nodeType": "ExpressionStatement",
                  "src": "6712:39:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4830,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4826,
                      "name": "_target",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4758,
                      "src": "6761:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 4827,
                          "name": "_header",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4745,
                          "src": "6771:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4828,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractTarget",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3777,
                        "src": "6771:21:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint256)"
                        }
                      },
                      "id": 4829,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6771:23:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6761:33:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4831,
                  "nodeType": "ExpressionStatement",
                  "src": "6761:33:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4844,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4832,
                      "name": "_nonce",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4760,
                      "src": "6804:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "3736",
                                      "id": 4836,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6834:2:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_76_by_1",
                                        "typeString": "int_const 76"
                                      },
                                      "value": "76"
                                    },
                                    {
                                      "argumentTypes": null,
                                      "hexValue": "34",
                                      "id": 4837,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "6838:1:8",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      },
                                      "value": "4"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_76_by_1",
                                        "typeString": "int_const 76"
                                      },
                                      {
                                        "typeIdentifier": "t_rational_4_by_1",
                                        "typeString": "int_const 4"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4834,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4745,
                                      "src": "6820:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    "id": 4835,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "slice",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4133,
                                    "src": "6820:13:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                      "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4838,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6820:20:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4839,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 2579,
                                "src": "6820:38:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory) pure returns (bytes memory)"
                                }
                              },
                              "id": 4840,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6820:40:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4841,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2726,
                            "src": "6820:52:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4842,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6820:54:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 4833,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "6813:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint32_$",
                          "typeString": "type(uint32)"
                        },
                        "typeName": "uint32"
                      },
                      "id": 4843,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6813:62:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "6804:71:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "id": 4845,
                  "nodeType": "ExpressionStatement",
                  "src": "6804:71:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 4846,
                        "name": "_digest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4748,
                        "src": "6893:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4847,
                        "name": "_version",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4750,
                        "src": "6902:8:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4848,
                        "name": "_prevHash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4752,
                        "src": "6912:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4849,
                        "name": "_merkleRoot",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4754,
                        "src": "6923:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4850,
                        "name": "_timestamp",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4756,
                        "src": "6936:10:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4851,
                        "name": "_target",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4758,
                        "src": "6948:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4852,
                        "name": "_nonce",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4760,
                        "src": "6957:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "id": 4853,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "6892:72:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint32_$_t_bytes32_$_t_bytes32_$_t_uint32_$_t_uint256_$_t_uint32_$",
                      "typeString": "tuple(bytes32,uint32,bytes32,bytes32,uint32,uint256,uint32)"
                    }
                  },
                  "functionReturnParameters": 4761,
                  "id": 4854,
                  "nodeType": "Return",
                  "src": "6886:78:8"
                }
              ]
            },
            "documentation": "@notice             Parses a block header struct from a bytestring\n @dev                Block headers are always 80 bytes, see Bitcoin docs\n @return             Header digest, version, previous block header hash, merkle root, timestamp, target, nonce",
            "id": 4856,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseHeader",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4746,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4745,
                  "name": "_header",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "5975:20:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4744,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5975:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5974:22:8"
            },
            "returnParameters": {
              "id": 4761,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4748,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6029:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4747,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6029:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4750,
                  "name": "_version",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6054:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4749,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6054:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4752,
                  "name": "_prevHash",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6079:17:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4751,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6079:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4754,
                  "name": "_merkleRoot",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6106:19:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4753,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6106:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4756,
                  "name": "_timestamp",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6135:17:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4755,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6135:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4758,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6162:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4757,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6162:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4760,
                  "name": "_nonce",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "6187:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 4759,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6187:6:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6019:187:8"
            },
            "scope": 5008,
            "src": "5954:1017:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4948,
              "nodeType": "Block",
              "src": "7392:1071:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4868,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4866,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4863,
                          "name": "_headers",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4858,
                          "src": "7444:8:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4864,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "7444:15:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 4865,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7462:2:8",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "7444:20:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4867,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7468:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "7444:25:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4872,
                  "nodeType": "IfStatement",
                  "src": "7440:55:8",
                  "trueBody": {
                    "id": 4871,
                    "nodeType": "Block",
                    "src": "7471:24:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4869,
                          "name": "ERR_BAD_LENGTH",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4402,
                          "src": "7479:14:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4862,
                        "id": 4870,
                        "nodeType": "Return",
                        "src": "7472:21:8"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4874
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4874,
                      "name": "_digest",
                      "nodeType": "VariableDeclaration",
                      "scope": 4948,
                      "src": "7546:15:8",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 4873,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "7546:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4875,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7546:15:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4878,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4876,
                      "name": "_totalDifficulty",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4861,
                      "src": "7572:16:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4877,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7591:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "7572:20:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4879,
                  "nodeType": "ExpressionStatement",
                  "src": "7572:20:8"
                },
                {
                  "body": {
                    "id": 4946,
                    "nodeType": "Block",
                    "src": "7668:789:8",
                    "statements": [
                      {
                        "assignments": [
                          4893
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4893,
                            "name": "_header",
                            "nodeType": "VariableDeclaration",
                            "scope": 4946,
                            "src": "7736:20:8",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes"
                            },
                            "typeName": {
                              "id": 4892,
                              "name": "bytes",
                              "nodeType": "ElementaryTypeName",
                              "src": "7736:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_storage_ptr",
                                "typeString": "bytes"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4899,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4896,
                              "name": "_start",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4881,
                              "src": "7774:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "3830",
                              "id": 4897,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7782:2:8",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_80_by_1",
                                "typeString": "int_const 80"
                              },
                              "value": "80"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_80_by_1",
                                "typeString": "int_const 80"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4894,
                              "name": "_headers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4858,
                              "src": "7759:8:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4895,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4133,
                            "src": "7759:14:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                            }
                          },
                          "id": 4898,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7759:26:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7736:49:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4902,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 4900,
                            "name": "_start",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4881,
                            "src": "7877:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 4901,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7887:1:8",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "7877:11:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 4913,
                        "nodeType": "IfStatement",
                        "src": "7873:123:8",
                        "trueBody": {
                          "id": 4912,
                          "nodeType": "Block",
                          "src": "7890:106:8",
                          "statements": [
                            {
                              "condition": {
                                "argumentTypes": null,
                                "id": 4907,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "7912:41:8",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 4904,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4893,
                                      "src": "7936:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 4905,
                                      "name": "_digest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4874,
                                      "src": "7945:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 4903,
                                    "name": "validateHeaderPrevHash",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5007,
                                    "src": "7913:22:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_bool_$",
                                      "typeString": "function (bytes memory,bytes32) pure returns (bool)"
                                    }
                                  },
                                  "id": 4906,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7913:40:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": null,
                              "id": 4911,
                              "nodeType": "IfStatement",
                              "src": "7908:74:8",
                              "trueBody": {
                                "id": 4910,
                                "nodeType": "Block",
                                "src": "7955:27:8",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4908,
                                      "name": "ERR_INVALID_CHAIN",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4405,
                                      "src": "7963:17:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "functionReturnParameters": 4862,
                                    "id": 4909,
                                    "nodeType": "Return",
                                    "src": "7956:24:8"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          4915
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4915,
                            "name": "_target",
                            "nodeType": "VariableDeclaration",
                            "scope": 4946,
                            "src": "8043:15:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4914,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8043:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 4919,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 4916,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4893,
                              "src": "8061:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4917,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractTarget",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3777,
                            "src": "8061:21:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4918,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8061:23:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8043:41:8"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4924,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4920,
                            "name": "_digest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4874,
                            "src": "8158:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4921,
                                "name": "_header",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4893,
                                "src": "8168:7:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 4922,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "hash256View",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2801,
                              "src": "8168:19:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) view returns (bytes32)"
                              }
                            },
                            "id": 4923,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8168:21:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "8158:31:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 4925,
                        "nodeType": "ExpressionStatement",
                        "src": "8158:31:8"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4932,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 4927,
                                    "name": "_digest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4874,
                                    "src": "8214:7:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 4926,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "8206:7:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": "uint256"
                                },
                                "id": 4928,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8206:16:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4929,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "reverseUint256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2675,
                              "src": "8206:31:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4930,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8206:33:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 4931,
                            "name": "_target",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4915,
                            "src": "8242:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8206:43:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 4936,
                        "nodeType": "IfStatement",
                        "src": "8203:100:8",
                        "trueBody": {
                          "id": 4935,
                          "nodeType": "Block",
                          "src": "8251:52:8",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 4933,
                                "name": "ERR_LOW_WORK",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4408,
                                "src": "8276:12:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 4862,
                              "id": 4934,
                              "nodeType": "Return",
                              "src": "8269:19:8"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4944,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4937,
                            "name": "_totalDifficulty",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4861,
                            "src": "8376:16:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 4940,
                                    "name": "_target",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4915,
                                    "src": "8416:7:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 4941,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "calculateDifficulty",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3790,
                                  "src": "8416:27:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 4942,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8416:29:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4938,
                                "name": "_totalDifficulty",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4861,
                                "src": "8395:16:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4939,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4365,
                              "src": "8395:20:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4943,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8395:51:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8376:70:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4945,
                        "nodeType": "ExpressionStatement",
                        "src": "8376:70:8"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4887,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4884,
                      "name": "_start",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4881,
                      "src": "7628:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4885,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4858,
                        "src": "7637:8:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4886,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "7637:15:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7628:24:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 4947,
                  "initializationExpression": {
                    "assignments": [
                      4881
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 4881,
                        "name": "_start",
                        "nodeType": "VariableDeclaration",
                        "scope": 4947,
                        "src": "7608:14:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4880,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7608:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 4883,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4882,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7625:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "7608:18:8"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 4890,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 4888,
                        "name": "_start",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4881,
                        "src": "7654:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "+=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 4889,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7664:2:8",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "7654:12:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 4891,
                    "nodeType": "ExpressionStatement",
                    "src": "7654:12:8"
                  },
                  "nodeType": "ForStatement",
                  "src": "7603:854:8"
                }
              ]
            },
            "documentation": "@notice             Checks validity of header chain\n @notice             Compares the hash of each header to the prevHash in the next header\n @param _headers     Raw byte array of header chain\n @return             The total accumulated difficulty of the header chain, or an error code",
            "id": 4949,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderChain",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4859,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4858,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 4949,
                  "src": "7320:21:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4857,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "7320:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7319:23:8"
            },
            "returnParameters": {
              "id": 4862,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4861,
                  "name": "_totalDifficulty",
                  "nodeType": "VariableDeclaration",
                  "scope": 4949,
                  "src": "7366:24:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4860,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7366:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7365:26:8"
            },
            "scope": 5008,
            "src": "7291:1172:8",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4979,
              "nodeType": "Block",
              "src": "8784:146:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4962,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4958,
                      "name": "_digest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4951,
                      "src": "8798:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 4960,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8817:1:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 4959,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "8809:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_bytes32_$",
                          "typeString": "type(bytes32)"
                        },
                        "typeName": "bytes32"
                      },
                      "id": 4961,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8809:10:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "8798:21:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4966,
                  "nodeType": "IfStatement",
                  "src": "8794:42:8",
                  "trueBody": {
                    "id": 4965,
                    "nodeType": "Block",
                    "src": "8821:15:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 4963,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8829:5:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 4957,
                        "id": 4964,
                        "nodeType": "Return",
                        "src": "8822:12:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4976,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 4969,
                                      "name": "_digest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4951,
                                      "src": "8870:7:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4967,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5010,
                                      "src": "8853:3:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 4968,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "8853:16:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 4970,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8853:25:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 4971,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 2579,
                                "src": "8853:43:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory) pure returns (bytes memory)"
                                }
                              },
                              "id": 4972,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8853:45:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 4973,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2726,
                            "src": "8853:57:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 4974,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8853:59:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 4975,
                          "name": "_target",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4953,
                          "src": "8915:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "8853:69:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "id": 4977,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "8852:71:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 4957,
                  "id": 4978,
                  "nodeType": "Return",
                  "src": "8845:78:8"
                }
              ]
            },
            "documentation": "@notice             Checks validity of header work\n @param _digest      Header digest\n @param _target      The target threshold\n @return             true if header work is valid, false otherwise",
            "id": 4980,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderWork",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4954,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4951,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 4980,
                  "src": "8721:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4950,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8721:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4953,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 4980,
                  "src": "8738:15:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4952,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8738:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8720:34:8"
            },
            "returnParameters": {
              "id": 4957,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4956,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4980,
                  "src": "8778:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4955,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "8778:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8777:6:8"
            },
            "scope": 5008,
            "src": "8693:237:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5006,
              "nodeType": "Block",
              "src": "9416:281:8",
              "statements": [
                {
                  "assignments": [
                    4990
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4990,
                      "name": "_prevHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 5006,
                      "src": "9473:17:8",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 4989,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "9473:7:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4996,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 4991,
                            "name": "_header",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4982,
                            "src": "9493:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4992,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractPrevBlockLE",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3804,
                          "src": "9493:26:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes memory)"
                          }
                        },
                        "id": 4993,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9493:28:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4994,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "toBytes32",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4244,
                      "src": "9493:38:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 4995,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9493:40:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9473:60:8"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 4999,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4997,
                      "name": "_prevHash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4990,
                      "src": "9622:9:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4998,
                      "name": "_prevHeaderDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4984,
                      "src": "9635:17:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "9622:30:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 5003,
                  "nodeType": "IfStatement",
                  "src": "9618:51:8",
                  "trueBody": {
                    "id": 5002,
                    "nodeType": "Block",
                    "src": "9654:15:8",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 5000,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9662:5:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 4988,
                        "id": 5001,
                        "nodeType": "Return",
                        "src": "9655:12:8"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 5004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9686:4:8",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 4988,
                  "id": 5005,
                  "nodeType": "Return",
                  "src": "9679:11:8"
                }
              ]
            },
            "documentation": "@notice                     Checks validity of header chain\n @dev                        Compares current header prevHash to previous header's digest\n @param _header              The raw bytes header\n @param _prevHeaderDigest    The previous header's digest\n @return                     true if header chain is valid, false otherwise",
            "id": 5007,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderPrevHash",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4985,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4982,
                  "name": "_header",
                  "nodeType": "VariableDeclaration",
                  "scope": 5007,
                  "src": "9338:20:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4981,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "9338:5:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4984,
                  "name": "_prevHeaderDigest",
                  "nodeType": "VariableDeclaration",
                  "scope": 5007,
                  "src": "9360:25:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4983,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "9360:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9337:49:8"
            },
            "returnParameters": {
              "id": 4988,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4987,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5007,
                  "src": "9410:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4986,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "9410:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9409:6:8"
            },
            "scope": 5008,
            "src": "9306:391:8",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 5009,
        "src": "218:9481:8"
      }
    ],
    "src": "0:9700:8"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.10+commit.5a6ea5b1.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.23",
  "updatedAt": "2020-04-08T00:07:28.202Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}