{
  "contractName": "ValidateSPV",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol\":\"ValidateSPV\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol\":{\"keccak256\":\"0x461cc52e40ba53e646f5c9505b992baa3d5b3c98ae5718561e61b3bc6c726d52\",\"urls\":[\"bzz-raw://90cf2e608b660671642a616ec044e2a39e8ceb7079315b6133ec978c47af9f98\",\"dweb:/ipfs/QmX4hyYS99RYWiQ7BwLXuvQpU5x62YbjJWLgYFwrPkYbzT\"]},\"@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol\":{\"keccak256\":\"0x43451fdb4c4d55c01122411a4cf89a5c544c2bd4b646ee1d1f306626275324bf\",\"urls\":[\"bzz-raw://db93f07c32fa294d416aaab1b19a205772f2a3fa573fd380e5641e7770193ccf\",\"dweb:/ipfs/QmVE4y8cFKWZGKEfTM9Q3YreAArpMTTALHNr2tcvcNDnbi\"]},\"@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol\":{\"keccak256\":\"0x22d34c04c68c2a77ee83e2ef3756f6e6bad6ad675560d777e612315d7eb83935\",\"urls\":[\"bzz-raw://b642c61be1d34e153e4f9cc139291fa26f4ecf31a3acc5b960aad20f4f689eeb\",\"dweb:/ipfs/QmWADdVTCSyvtgb76AxFFkAr9h9jbY57Mj5X6xiEqCqmMu\"]},\"@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol\":{\"keccak256\":\"0x9af3b3f36de63e95977f09548617989e391b3c511cf0383ee35cefd5da7d3bfd\",\"urls\":[\"bzz-raw://97ce025c7d18540e4c24578db61cc5e33828be8e9a82b5cb5f46c99212f75ed1\",\"dweb:/ipfs/QmRrdWnd95rgCZzeaNiU4KUcGe1j7oDBj7LatpXhUmjbEE\"]}},\"version\":1}",
  "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820d9143b1d2d90bd2f69c340f94fd2d83a1678b304f65267655ef229b5805d6be264736f6c63430005110032",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820d9143b1d2d90bd2f69c340f94fd2d83a1678b304f65267655ef229b5805d6be264736f6c63430005110032",
  "sourceMap": "218:5497:52:-;;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:5497:52:-;;;;;;;;",
  "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    /// @dev                        `index` is not a reliable indicator of location within a 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             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 the connect 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": [
        14207
      ]
    },
    "id": 14208,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 13923,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".10"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:52"
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
        "file": "./BytesLib.sol",
        "id": 13925,
        "nodeType": "ImportDirective",
        "scope": 14208,
        "sourceUnit": 13433,
        "src": "93:40:52",
        "symbolAliases": [
          {
            "foreign": 13924,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
        "file": "./SafeMath.sol",
        "id": 13927,
        "nodeType": "ImportDirective",
        "scope": 14208,
        "sourceUnit": 13922,
        "src": "134:40:52",
        "symbolAliases": [
          {
            "foreign": 13926,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
        "file": "./BTCUtils.sol",
        "id": 13929,
        "nodeType": "ImportDirective",
        "scope": 14208,
        "sourceUnit": 13217,
        "src": "175:40:52",
        "symbolAliases": [
          {
            "foreign": 13928,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 14207,
        "linearizedBaseContracts": [
          14207
        ],
        "name": "ValidateSPV",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 13932,
            "libraryName": {
              "contractScope": null,
              "id": 13930,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13216,
              "src": "251:8:52",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$13216",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "245:25:52",
            "typeName": {
              "id": 13931,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "264:5:52",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 13935,
            "libraryName": {
              "contractScope": null,
              "id": 13933,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13216,
              "src": "281:8:52",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$13216",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "275:27:52",
            "typeName": {
              "id": 13934,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "294:7:52",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "id": 13938,
            "libraryName": {
              "contractScope": null,
              "id": 13936,
              "name": "BytesLib",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13432,
              "src": "313:8:52",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BytesLib_$13432",
                "typeString": "library BytesLib"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "307:25:52",
            "typeName": {
              "id": 13937,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "326:5:52",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 13941,
            "libraryName": {
              "contractScope": null,
              "id": 13939,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13921,
              "src": "343:8:52",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$13921",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "337:27:52",
            "typeName": {
              "id": 13940,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "356:7:52",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "canonicalName": "ValidateSPV.InputTypes",
            "id": 13946,
            "members": [
              {
                "id": 13942,
                "name": "NONE",
                "nodeType": "EnumValue",
                "src": "388:4:52"
              },
              {
                "id": 13943,
                "name": "LEGACY",
                "nodeType": "EnumValue",
                "src": "394:6:52"
              },
              {
                "id": 13944,
                "name": "COMPATIBILITY",
                "nodeType": "EnumValue",
                "src": "402:13:52"
              },
              {
                "id": 13945,
                "name": "WITNESS",
                "nodeType": "EnumValue",
                "src": "417:7:52"
              }
            ],
            "name": "InputTypes",
            "nodeType": "EnumDefinition",
            "src": "370:56:52"
          },
          {
            "canonicalName": "ValidateSPV.OutputTypes",
            "id": 13954,
            "members": [
              {
                "id": 13947,
                "name": "NONE",
                "nodeType": "EnumValue",
                "src": "450:4:52"
              },
              {
                "id": 13948,
                "name": "WPKH",
                "nodeType": "EnumValue",
                "src": "456:4:52"
              },
              {
                "id": 13949,
                "name": "WSH",
                "nodeType": "EnumValue",
                "src": "462:3:52"
              },
              {
                "id": 13950,
                "name": "OP_RETURN",
                "nodeType": "EnumValue",
                "src": "467:9:52"
              },
              {
                "id": 13951,
                "name": "PKH",
                "nodeType": "EnumValue",
                "src": "478:3:52"
              },
              {
                "id": 13952,
                "name": "SH",
                "nodeType": "EnumValue",
                "src": "483:2:52"
              },
              {
                "id": 13953,
                "name": "NONSTANDARD",
                "nodeType": "EnumValue",
                "src": "487:11:52"
              }
            ],
            "name": "OutputTypes",
            "nodeType": "EnumDefinition",
            "src": "431:69:52"
          },
          {
            "constant": true,
            "id": 13957,
            "name": "ERR_BAD_LENGTH",
            "nodeType": "VariableDeclaration",
            "scope": 14207,
            "src": "506:100:52",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 13955,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "506:7:52",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666",
              "id": 13956,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "540:66:52",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9935"
              },
              "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 13960,
            "name": "ERR_INVALID_CHAIN",
            "nodeType": "VariableDeclaration",
            "scope": 14207,
            "src": "612:103:52",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 13958,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "612:7:52",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665",
              "id": 13959,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "649:66:52",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639934_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9934"
              },
              "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 13963,
            "name": "ERR_LOW_WORK",
            "nodeType": "VariableDeclaration",
            "scope": 14207,
            "src": "721:98:52",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 13961,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "721:7:52",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666664",
              "id": 13962,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "753:66:52",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639933_by_1",
                "typeString": "int_const 1157...(70 digits omitted)...9933"
              },
              "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd"
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 13970,
              "nodeType": "Block",
              "src": "885:38:52",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 13968,
                    "name": "ERR_BAD_LENGTH",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 13957,
                    "src": "902:14:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 13967,
                  "id": 13969,
                  "nodeType": "Return",
                  "src": "895:21:52"
                }
              ]
            },
            "documentation": null,
            "id": 13971,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrBadLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13964,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "850:2:52"
            },
            "returnParameters": {
              "id": 13967,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13966,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 13971,
                  "src": "876:7:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13965,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "876:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "875:9:52"
            },
            "scope": 14207,
            "src": "826:97:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 13978,
              "nodeType": "Block",
              "src": "991:41:52",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 13976,
                    "name": "ERR_INVALID_CHAIN",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 13960,
                    "src": "1008:17:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 13975,
                  "id": 13977,
                  "nodeType": "Return",
                  "src": "1001:24:52"
                }
              ]
            },
            "documentation": null,
            "id": 13979,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrInvalidChain",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13972,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "956:2:52"
            },
            "returnParameters": {
              "id": 13975,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13974,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 13979,
                  "src": "982:7:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13973,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "982:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "981:9:52"
            },
            "scope": 14207,
            "src": "929:103:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 13986,
              "nodeType": "Block",
              "src": "1095:36:52",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 13984,
                    "name": "ERR_LOW_WORK",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 13963,
                    "src": "1112:12:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 13983,
                  "id": 13985,
                  "nodeType": "Return",
                  "src": "1105:19:52"
                }
              ]
            },
            "documentation": null,
            "id": 13987,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getErrLowWork",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13980,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1060:2:52"
            },
            "returnParameters": {
              "id": 13983,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13982,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 13987,
                  "src": "1086:7:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13981,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1086:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1085:9:52"
            },
            "scope": 14207,
            "src": "1038:93:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 14030,
              "nodeType": "Block",
              "src": "1850:363:52",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 14011,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "id": 14006,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 14002,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 14000,
                          "name": "_txid",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13989,
                          "src": "1905:5:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 14001,
                          "name": "_merkleRoot",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13991,
                          "src": "1914:11:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "1905:20:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "&&",
                      "rightExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 14005,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 14003,
                          "name": "_index",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13995,
                          "src": "1929:6:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 14004,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1939:1:52",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1929:11:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "src": "1905:35:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 14010,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 14007,
                          "name": "_intermediateNodes",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13993,
                          "src": "1944:18:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 14008,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1944:25:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 14009,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1973:1:52",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "1944:30:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1905:69:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 14015,
                  "nodeType": "IfStatement",
                  "src": "1901:111:52",
                  "trueBody": {
                    "id": 14014,
                    "nodeType": "Block",
                    "src": "1976:36:52",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 14012,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1997:4:52",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 13999,
                        "id": 14013,
                        "nodeType": "Return",
                        "src": "1990:11:52"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    14017
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 14017,
                      "name": "_proof",
                      "nodeType": "VariableDeclaration",
                      "scope": 14030,
                      "src": "2022:19:52",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 14016,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "2022:5:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 14024,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 14020,
                        "name": "_txid",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 13989,
                        "src": "2061:5:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 14021,
                        "name": "_intermediateNodes",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 13993,
                        "src": "2068:18:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 14022,
                        "name": "_merkleRoot",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 13991,
                        "src": "2088:11:52",
                        "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": 14018,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 18347,
                        "src": "2044:3:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 14019,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodePacked",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2044:16:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function () pure returns (bytes memory)"
                      }
                    },
                    "id": 14023,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2044:56:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2022:78:52"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 14027,
                        "name": "_index",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 13995,
                        "src": "2199:6:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 14025,
                        "name": "_proof",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 14017,
                        "src": "2172:6:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 14026,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "verifyHash256Merkle",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13148,
                      "src": "2172:26:52",
                      "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": 14028,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2172:34:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 13999,
                  "id": 14029,
                  "nodeType": "Return",
                  "src": "2165:41:52"
                }
              ]
            },
            "documentation": "@notice                     Validates a tx inclusion in the block\n @dev                        `index` is not a reliable indicator of location within a 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": 14031,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "prove",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13996,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13989,
                  "name": "_txid",
                  "nodeType": "VariableDeclaration",
                  "scope": 14031,
                  "src": "1710:13:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13988,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1710:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13991,
                  "name": "_merkleRoot",
                  "nodeType": "VariableDeclaration",
                  "scope": 14031,
                  "src": "1733:19:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13990,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1733:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13993,
                  "name": "_intermediateNodes",
                  "nodeType": "VariableDeclaration",
                  "scope": 14031,
                  "src": "1762:31:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 13992,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1762:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13995,
                  "name": "_index",
                  "nodeType": "VariableDeclaration",
                  "scope": 14031,
                  "src": "1803:11:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13994,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1803:4:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1700:120:52"
            },
            "returnParameters": {
              "id": 13999,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13998,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14031,
                  "src": "1844:4:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 13997,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1844:4:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1843:6:52"
            },
            "scope": 14207,
            "src": "1686:527:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 14054,
              "nodeType": "Block",
              "src": "2804:184:52",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 14046,
                            "name": "_version",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14033,
                            "src": "2938:8:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 14047,
                            "name": "_vin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14035,
                            "src": "2948:4:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 14048,
                            "name": "_vout",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14037,
                            "src": "2954:5:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 14049,
                            "name": "_locktime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14039,
                            "src": "2961:9:52",
                            "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": 14044,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18347,
                            "src": "2921:3:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 14045,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2921:16:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 14050,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2921:50:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 14051,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11851,
                      "src": "2921:58:52",
                      "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": 14052,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2921:60:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 14043,
                  "id": 14053,
                  "nodeType": "Return",
                  "src": "2914:67:52"
                }
              ]
            },
            "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": 14055,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "calculateTxId",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14040,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14033,
                  "name": "_version",
                  "nodeType": "VariableDeclaration",
                  "scope": 14055,
                  "src": "2657:21:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14032,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2657:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14035,
                  "name": "_vin",
                  "nodeType": "VariableDeclaration",
                  "scope": 14055,
                  "src": "2688:17:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14034,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2688:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14037,
                  "name": "_vout",
                  "nodeType": "VariableDeclaration",
                  "scope": 14055,
                  "src": "2715:18:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14036,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2715:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14039,
                  "name": "_locktime",
                  "nodeType": "VariableDeclaration",
                  "scope": 14055,
                  "src": "2743:22:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14038,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2743:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2647:124:52"
            },
            "returnParameters": {
              "id": 14043,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14042,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14055,
                  "src": "2795:7:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14041,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2795:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2794:9:52"
            },
            "scope": 14207,
            "src": "2625:363:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 14147,
              "nodeType": "Block",
              "src": "3409:1071:52",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 14067,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 14065,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 14062,
                          "name": "_headers",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 14057,
                          "src": "3461:8:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 14063,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3461:15:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 14064,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3479:2:52",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "3461:20:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 14066,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3485:1:52",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3461:25:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 14071,
                  "nodeType": "IfStatement",
                  "src": "3457:55:52",
                  "trueBody": {
                    "id": 14070,
                    "nodeType": "Block",
                    "src": "3488:24:52",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 14068,
                          "name": "ERR_BAD_LENGTH",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13957,
                          "src": "3496:14:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 14061,
                        "id": 14069,
                        "nodeType": "Return",
                        "src": "3489:21:52"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    14073
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 14073,
                      "name": "_digest",
                      "nodeType": "VariableDeclaration",
                      "scope": 14147,
                      "src": "3563:15:52",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 14072,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "3563:7:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 14074,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3563:15:52"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 14077,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 14075,
                      "name": "_totalDifficulty",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14060,
                      "src": "3589:16:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 14076,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3608:1:52",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3589:20:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 14078,
                  "nodeType": "ExpressionStatement",
                  "src": "3589:20:52"
                },
                {
                  "body": {
                    "id": 14145,
                    "nodeType": "Block",
                    "src": "3685:789:52",
                    "statements": [
                      {
                        "assignments": [
                          14092
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14092,
                            "name": "_header",
                            "nodeType": "VariableDeclaration",
                            "scope": 14145,
                            "src": "3753:20:52",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes"
                            },
                            "typeName": {
                              "id": 14091,
                              "name": "bytes",
                              "nodeType": "ElementaryTypeName",
                              "src": "3753:5:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_storage_ptr",
                                "typeString": "bytes"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 14098,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 14095,
                              "name": "_start",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14080,
                              "src": "3791:6:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "3830",
                              "id": 14096,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3799:2:52",
                              "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": 14093,
                              "name": "_headers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14057,
                              "src": "3776:8:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 14094,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "slice",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13281,
                            "src": "3776:14:52",
                            "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": 14097,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3776:26:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3753:49:52"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14101,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 14099,
                            "name": "_start",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14080,
                            "src": "3894:6:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 14100,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3904:1:52",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3894:11:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 14112,
                        "nodeType": "IfStatement",
                        "src": "3890:123:52",
                        "trueBody": {
                          "id": 14111,
                          "nodeType": "Block",
                          "src": "3907:106:52",
                          "statements": [
                            {
                              "condition": {
                                "argumentTypes": null,
                                "id": 14106,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "3929:41:52",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 14103,
                                      "name": "_header",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14092,
                                      "src": "3953:7:52",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    },
                                    {
                                      "argumentTypes": null,
                                      "id": 14104,
                                      "name": "_digest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14073,
                                      "src": "3962:7:52",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 14102,
                                    "name": "validateHeaderPrevHash",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14206,
                                    "src": "3930:22:52",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_bool_$",
                                      "typeString": "function (bytes memory,bytes32) pure returns (bool)"
                                    }
                                  },
                                  "id": 14105,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3930:40:52",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": null,
                              "id": 14110,
                              "nodeType": "IfStatement",
                              "src": "3925:74:52",
                              "trueBody": {
                                "id": 14109,
                                "nodeType": "Block",
                                "src": "3972:27:52",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 14107,
                                      "name": "ERR_INVALID_CHAIN",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13960,
                                      "src": "3980:17:52",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "functionReturnParameters": 14061,
                                    "id": 14108,
                                    "nodeType": "Return",
                                    "src": "3973:24:52"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          14114
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14114,
                            "name": "_target",
                            "nodeType": "VariableDeclaration",
                            "scope": 14145,
                            "src": "4060:15:52",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 14113,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4060:7:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 14118,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 14115,
                              "name": "_header",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14092,
                              "src": "4078:7:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 14116,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractTarget",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 12925,
                            "src": "4078:21:52",
                            "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": 14117,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4078:23:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4060:41:52"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 14123,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 14119,
                            "name": "_digest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14073,
                            "src": "4175:7:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 14120,
                                "name": "_header",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14092,
                                "src": "4185:7:52",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 14121,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "hash256View",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11860,
                              "src": "4185:19:52",
                              "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": 14122,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4185:21:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4175:31:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 14124,
                        "nodeType": "ExpressionStatement",
                        "src": "4175:31:52"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14131,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 14126,
                                    "name": "_digest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14073,
                                    "src": "4231:7:52",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 14125,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4223:7:52",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": "uint256"
                                },
                                "id": 14127,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4223:16:52",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14128,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "reverseUint256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11739,
                              "src": "4223:31:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256) pure returns (uint256)"
                              }
                            },
                            "id": 14129,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4223:33:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 14130,
                            "name": "_target",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14114,
                            "src": "4259:7:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4223:43:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 14135,
                        "nodeType": "IfStatement",
                        "src": "4220:100:52",
                        "trueBody": {
                          "id": 14134,
                          "nodeType": "Block",
                          "src": "4268:52:52",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 14132,
                                "name": "ERR_LOW_WORK",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13963,
                                "src": "4293:12:52",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 14061,
                              "id": 14133,
                              "nodeType": "Return",
                              "src": "4286:19:52"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 14143,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 14136,
                            "name": "_totalDifficulty",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14060,
                            "src": "4393:16:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 14139,
                                    "name": "_target",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14114,
                                    "src": "4433:7:52",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 14140,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "calculateDifficulty",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 12938,
                                  "src": "4433:27:52",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 14141,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4433:29:52",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 14137,
                                "name": "_totalDifficulty",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14060,
                                "src": "4412:16:52",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14138,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 13920,
                              "src": "4412:20:52",
                              "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": 14142,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4412:51:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4393:70:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 14144,
                        "nodeType": "ExpressionStatement",
                        "src": "4393:70:52"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 14086,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 14083,
                      "name": "_start",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14080,
                      "src": "3645:6:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 14084,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 14057,
                        "src": "3654:8:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 14085,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3654:15:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3645:24:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 14146,
                  "initializationExpression": {
                    "assignments": [
                      14080
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 14080,
                        "name": "_start",
                        "nodeType": "VariableDeclaration",
                        "scope": 14146,
                        "src": "3625:14:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14079,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3625:7:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 14082,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 14081,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3642:1:52",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "3625:18:52"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 14089,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 14087,
                        "name": "_start",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 14080,
                        "src": "3671:6:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "+=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 14088,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3681:2:52",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "3671:12:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 14090,
                    "nodeType": "ExpressionStatement",
                    "src": "3671:12:52"
                  },
                  "nodeType": "ForStatement",
                  "src": "3620:854:52"
                }
              ]
            },
            "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": 14148,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderChain",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14058,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14057,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 14148,
                  "src": "3337:21:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14056,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3337:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3336:23:52"
            },
            "returnParameters": {
              "id": 14061,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14060,
                  "name": "_totalDifficulty",
                  "nodeType": "VariableDeclaration",
                  "scope": 14148,
                  "src": "3383:24:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14059,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3383:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3382:26:52"
            },
            "scope": 14207,
            "src": "3308:1172:52",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 14178,
              "nodeType": "Block",
              "src": "4801:146:52",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 14161,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 14157,
                      "name": "_digest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14150,
                      "src": "4815:7:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 14159,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4834:1:52",
                          "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": 14158,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4826:7:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_bytes32_$",
                          "typeString": "type(bytes32)"
                        },
                        "typeName": "bytes32"
                      },
                      "id": 14160,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4826:10:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "4815:21:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 14165,
                  "nodeType": "IfStatement",
                  "src": "4811:42:52",
                  "trueBody": {
                    "id": 14164,
                    "nodeType": "Block",
                    "src": "4838:15:52",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 14162,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4846:5:52",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 14156,
                        "id": 14163,
                        "nodeType": "Return",
                        "src": "4839:12:52"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 14175,
                        "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": 14168,
                                      "name": "_digest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14150,
                                      "src": "4887:7:52",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 14166,
                                      "name": "abi",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18347,
                                      "src": "4870:3:52",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_abi",
                                        "typeString": "abi"
                                      }
                                    },
                                    "id": 14167,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "memberName": "encodePacked",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "4870:16:52",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                      "typeString": "function () pure returns (bytes memory)"
                                    }
                                  },
                                  "id": 14169,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4870:25:52",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 14170,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "reverseEndianness",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 11643,
                                "src": "4870:43:52",
                                "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": 14171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4870:45:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 14172,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bytesToUint",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11790,
                            "src": "4870:57:52",
                            "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": 14173,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4870:59:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 14174,
                          "name": "_target",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 14152,
                          "src": "4932:7:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "4870:69:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "id": 14176,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "4869:71:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 14156,
                  "id": 14177,
                  "nodeType": "Return",
                  "src": "4862:78:52"
                }
              ]
            },
            "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": 14179,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderWork",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14153,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14150,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 14179,
                  "src": "4738:15:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14149,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4738:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14152,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 14179,
                  "src": "4755:15:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14151,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4755:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4737:34:52"
            },
            "returnParameters": {
              "id": 14156,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14155,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14179,
                  "src": "4795:4:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14154,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4795:4:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4794:6:52"
            },
            "scope": 14207,
            "src": "4710:237:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 14205,
              "nodeType": "Block",
              "src": "5432:281:52",
              "statements": [
                {
                  "assignments": [
                    14189
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 14189,
                      "name": "_prevHash",
                      "nodeType": "VariableDeclaration",
                      "scope": 14205,
                      "src": "5489:17:52",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 14188,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "5489:7:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 14195,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 14190,
                            "name": "_header",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14181,
                            "src": "5509:7:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 14191,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractPrevBlockLE",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 12952,
                          "src": "5509:26:52",
                          "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": 14192,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5509:28:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 14193,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "toBytes32",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13400,
                      "src": "5509:38:52",
                      "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": 14194,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5509:40:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5489:60:52"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 14198,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 14196,
                      "name": "_prevHash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14189,
                      "src": "5638:9:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 14197,
                      "name": "_prevHeaderDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14183,
                      "src": "5651:17:52",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "5638:30:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 14202,
                  "nodeType": "IfStatement",
                  "src": "5634:51:52",
                  "trueBody": {
                    "id": 14201,
                    "nodeType": "Block",
                    "src": "5670:15:52",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 14199,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "5678:5:52",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 14187,
                        "id": 14200,
                        "nodeType": "Return",
                        "src": "5671:12:52"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 14203,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5702:4:52",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 14187,
                  "id": 14204,
                  "nodeType": "Return",
                  "src": "5695:11:52"
                }
              ]
            },
            "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 the connect is valid, false otherwise",
            "id": 14206,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "validateHeaderPrevHash",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14184,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14181,
                  "name": "_header",
                  "nodeType": "VariableDeclaration",
                  "scope": 14206,
                  "src": "5354:20:52",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14180,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5354:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14183,
                  "name": "_prevHeaderDigest",
                  "nodeType": "VariableDeclaration",
                  "scope": 14206,
                  "src": "5376:25:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14182,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "5376:7:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5353:49:52"
            },
            "returnParameters": {
              "id": 14187,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14186,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14206,
                  "src": "5426:4:52",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14185,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5426:4:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5425:6:52"
            },
            "scope": 14207,
            "src": "5322:391:52",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 14208,
        "src": "218:5497:52"
      }
    ],
    "src": "0:5716:52"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
      "exportedSymbols": {
        "ValidateSPV": [
          14207
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.5",
            ".10"
          ]
        },
        "id": 13923,
        "name": "PragmaDirective",
        "src": "0:24:52"
      },
      {
        "attributes": {
          "SourceUnit": 13433,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
          "file": "./BytesLib.sol",
          "scope": 14208,
          "symbolAliases": [
            {
              "foreign": 13924,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 13925,
        "name": "ImportDirective",
        "src": "93:40:52"
      },
      {
        "attributes": {
          "SourceUnit": 13922,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
          "file": "./SafeMath.sol",
          "scope": 14208,
          "symbolAliases": [
            {
              "foreign": 13926,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 13927,
        "name": "ImportDirective",
        "src": "134:40:52"
      },
      {
        "attributes": {
          "SourceUnit": 13217,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
          "file": "./BTCUtils.sol",
          "scope": 14208,
          "symbolAliases": [
            {
              "foreign": 13928,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 13929,
        "name": "ImportDirective",
        "src": "175:40:52"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            14207
          ],
          "name": "ValidateSPV",
          "scope": 14208
        },
        "children": [
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "BTCUtils",
                  "referencedDeclaration": 13216,
                  "type": "library BTCUtils"
                },
                "id": 13930,
                "name": "UserDefinedTypeName",
                "src": "251:8:52"
              },
              {
                "attributes": {
                  "name": "bytes",
                  "type": "bytes"
                },
                "id": 13931,
                "name": "ElementaryTypeName",
                "src": "264:5:52"
              }
            ],
            "id": 13932,
            "name": "UsingForDirective",
            "src": "245:25:52"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "BTCUtils",
                  "referencedDeclaration": 13216,
                  "type": "library BTCUtils"
                },
                "id": 13933,
                "name": "UserDefinedTypeName",
                "src": "281:8:52"
              },
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 13934,
                "name": "ElementaryTypeName",
                "src": "294:7:52"
              }
            ],
            "id": 13935,
            "name": "UsingForDirective",
            "src": "275:27:52"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "BytesLib",
                  "referencedDeclaration": 13432,
                  "type": "library BytesLib"
                },
                "id": 13936,
                "name": "UserDefinedTypeName",
                "src": "313:8:52"
              },
              {
                "attributes": {
                  "name": "bytes",
                  "type": "bytes"
                },
                "id": 13937,
                "name": "ElementaryTypeName",
                "src": "326:5:52"
              }
            ],
            "id": 13938,
            "name": "UsingForDirective",
            "src": "307:25:52"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "SafeMath",
                  "referencedDeclaration": 13921,
                  "type": "library SafeMath"
                },
                "id": 13939,
                "name": "UserDefinedTypeName",
                "src": "343:8:52"
              },
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 13940,
                "name": "ElementaryTypeName",
                "src": "356:7:52"
              }
            ],
            "id": 13941,
            "name": "UsingForDirective",
            "src": "337:27:52"
          },
          {
            "attributes": {
              "canonicalName": "ValidateSPV.InputTypes",
              "name": "InputTypes"
            },
            "children": [
              {
                "attributes": {
                  "name": "NONE"
                },
                "id": 13942,
                "name": "EnumValue",
                "src": "388:4:52"
              },
              {
                "attributes": {
                  "name": "LEGACY"
                },
                "id": 13943,
                "name": "EnumValue",
                "src": "394:6:52"
              },
              {
                "attributes": {
                  "name": "COMPATIBILITY"
                },
                "id": 13944,
                "name": "EnumValue",
                "src": "402:13:52"
              },
              {
                "attributes": {
                  "name": "WITNESS"
                },
                "id": 13945,
                "name": "EnumValue",
                "src": "417:7:52"
              }
            ],
            "id": 13946,
            "name": "EnumDefinition",
            "src": "370:56:52"
          },
          {
            "attributes": {
              "canonicalName": "ValidateSPV.OutputTypes",
              "name": "OutputTypes"
            },
            "children": [
              {
                "attributes": {
                  "name": "NONE"
                },
                "id": 13947,
                "name": "EnumValue",
                "src": "450:4:52"
              },
              {
                "attributes": {
                  "name": "WPKH"
                },
                "id": 13948,
                "name": "EnumValue",
                "src": "456:4:52"
              },
              {
                "attributes": {
                  "name": "WSH"
                },
                "id": 13949,
                "name": "EnumValue",
                "src": "462:3:52"
              },
              {
                "attributes": {
                  "name": "OP_RETURN"
                },
                "id": 13950,
                "name": "EnumValue",
                "src": "467:9:52"
              },
              {
                "attributes": {
                  "name": "PKH"
                },
                "id": 13951,
                "name": "EnumValue",
                "src": "478:3:52"
              },
              {
                "attributes": {
                  "name": "SH"
                },
                "id": 13952,
                "name": "EnumValue",
                "src": "483:2:52"
              },
              {
                "attributes": {
                  "name": "NONSTANDARD"
                },
                "id": 13953,
                "name": "EnumValue",
                "src": "487:11:52"
              }
            ],
            "id": 13954,
            "name": "EnumDefinition",
            "src": "431:69:52"
          },
          {
            "attributes": {
              "constant": true,
              "name": "ERR_BAD_LENGTH",
              "scope": 14207,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 13955,
                "name": "ElementaryTypeName",
                "src": "506:7:52"
              },
              {
                "attributes": {
                  "argumentTypes": null,
                  "hexvalue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666",
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "subdenomination": null,
                  "token": "number",
                  "type": "int_const 1157...(70 digits omitted)...9935",
                  "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
                },
                "id": 13956,
                "name": "Literal",
                "src": "540:66:52"
              }
            ],
            "id": 13957,
            "name": "VariableDeclaration",
            "src": "506:100:52"
          },
          {
            "attributes": {
              "constant": true,
              "name": "ERR_INVALID_CHAIN",
              "scope": 14207,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 13958,
                "name": "ElementaryTypeName",
                "src": "612:7:52"
              },
              {
                "attributes": {
                  "argumentTypes": null,
                  "hexvalue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665",
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "subdenomination": null,
                  "token": "number",
                  "type": "int_const 1157...(70 digits omitted)...9934",
                  "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
                },
                "id": 13959,
                "name": "Literal",
                "src": "649:66:52"
              }
            ],
            "id": 13960,
            "name": "VariableDeclaration",
            "src": "612:103:52"
          },
          {
            "attributes": {
              "constant": true,
              "name": "ERR_LOW_WORK",
              "scope": 14207,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 13961,
                "name": "ElementaryTypeName",
                "src": "721:7:52"
              },
              {
                "attributes": {
                  "argumentTypes": null,
                  "hexvalue": "307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666664",
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "subdenomination": null,
                  "token": "number",
                  "type": "int_const 1157...(70 digits omitted)...9933",
                  "value": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd"
                },
                "id": 13962,
                "name": "Literal",
                "src": "753:66:52"
              }
            ],
            "id": 13963,
            "name": "VariableDeclaration",
            "src": "721:98:52"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getErrBadLength",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 13964,
                "name": "ParameterList",
                "src": "850:2:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 13971,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 13965,
                        "name": "ElementaryTypeName",
                        "src": "876:7:52"
                      }
                    ],
                    "id": 13966,
                    "name": "VariableDeclaration",
                    "src": "876:7:52"
                  }
                ],
                "id": 13967,
                "name": "ParameterList",
                "src": "875:9:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 13967
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 13957,
                          "type": "uint256",
                          "value": "ERR_BAD_LENGTH"
                        },
                        "id": 13968,
                        "name": "Identifier",
                        "src": "902:14:52"
                      }
                    ],
                    "id": 13969,
                    "name": "Return",
                    "src": "895:21:52"
                  }
                ],
                "id": 13970,
                "name": "Block",
                "src": "885:38:52"
              }
            ],
            "id": 13971,
            "name": "FunctionDefinition",
            "src": "826:97:52"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getErrInvalidChain",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 13972,
                "name": "ParameterList",
                "src": "956:2:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 13979,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 13973,
                        "name": "ElementaryTypeName",
                        "src": "982:7:52"
                      }
                    ],
                    "id": 13974,
                    "name": "VariableDeclaration",
                    "src": "982:7:52"
                  }
                ],
                "id": 13975,
                "name": "ParameterList",
                "src": "981:9:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 13975
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 13960,
                          "type": "uint256",
                          "value": "ERR_INVALID_CHAIN"
                        },
                        "id": 13976,
                        "name": "Identifier",
                        "src": "1008:17:52"
                      }
                    ],
                    "id": 13977,
                    "name": "Return",
                    "src": "1001:24:52"
                  }
                ],
                "id": 13978,
                "name": "Block",
                "src": "991:41:52"
              }
            ],
            "id": 13979,
            "name": "FunctionDefinition",
            "src": "929:103:52"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getErrLowWork",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 13980,
                "name": "ParameterList",
                "src": "1060:2:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 13987,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 13981,
                        "name": "ElementaryTypeName",
                        "src": "1086:7:52"
                      }
                    ],
                    "id": 13982,
                    "name": "VariableDeclaration",
                    "src": "1086:7:52"
                  }
                ],
                "id": 13983,
                "name": "ParameterList",
                "src": "1085:9:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 13983
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 13963,
                          "type": "uint256",
                          "value": "ERR_LOW_WORK"
                        },
                        "id": 13984,
                        "name": "Identifier",
                        "src": "1112:12:52"
                      }
                    ],
                    "id": 13985,
                    "name": "Return",
                    "src": "1105:19:52"
                  }
                ],
                "id": 13986,
                "name": "Block",
                "src": "1095:36:52"
              }
            ],
            "id": 13987,
            "name": "FunctionDefinition",
            "src": "1038:93:52"
          },
          {
            "attributes": {
              "documentation": "@notice                     Validates a tx inclusion in the block\n @dev                        `index` is not a reliable indicator of location within a 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",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "prove",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_txid",
                      "scope": 14031,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 13988,
                        "name": "ElementaryTypeName",
                        "src": "1710:7:52"
                      }
                    ],
                    "id": 13989,
                    "name": "VariableDeclaration",
                    "src": "1710:13:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_merkleRoot",
                      "scope": 14031,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 13990,
                        "name": "ElementaryTypeName",
                        "src": "1733:7:52"
                      }
                    ],
                    "id": 13991,
                    "name": "VariableDeclaration",
                    "src": "1733:19:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_intermediateNodes",
                      "scope": 14031,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 13992,
                        "name": "ElementaryTypeName",
                        "src": "1762:5:52"
                      }
                    ],
                    "id": 13993,
                    "name": "VariableDeclaration",
                    "src": "1762:31:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_index",
                      "scope": 14031,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 13994,
                        "name": "ElementaryTypeName",
                        "src": "1803:4:52"
                      }
                    ],
                    "id": 13995,
                    "name": "VariableDeclaration",
                    "src": "1803:11:52"
                  }
                ],
                "id": 13996,
                "name": "ParameterList",
                "src": "1700:120:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14031,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 13997,
                        "name": "ElementaryTypeName",
                        "src": "1844:4:52"
                      }
                    ],
                    "id": 13998,
                    "name": "VariableDeclaration",
                    "src": "1844:4:52"
                  }
                ],
                "id": 13999,
                "name": "ParameterList",
                "src": "1843:6:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "&&",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 13989,
                                      "type": "bytes32",
                                      "value": "_txid"
                                    },
                                    "id": 14000,
                                    "name": "Identifier",
                                    "src": "1905:5:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 13991,
                                      "type": "bytes32",
                                      "value": "_merkleRoot"
                                    },
                                    "id": 14001,
                                    "name": "Identifier",
                                    "src": "1914:11:52"
                                  }
                                ],
                                "id": 14002,
                                "name": "BinaryOperation",
                                "src": "1905:20:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 13995,
                                      "type": "uint256",
                                      "value": "_index"
                                    },
                                    "id": 14003,
                                    "name": "Identifier",
                                    "src": "1929:6:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 14004,
                                    "name": "Literal",
                                    "src": "1939:1:52"
                                  }
                                ],
                                "id": 14005,
                                "name": "BinaryOperation",
                                "src": "1929:11:52"
                              }
                            ],
                            "id": 14006,
                            "name": "BinaryOperation",
                            "src": "1905:35:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "referencedDeclaration": null,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 13993,
                                      "type": "bytes memory",
                                      "value": "_intermediateNodes"
                                    },
                                    "id": 14007,
                                    "name": "Identifier",
                                    "src": "1944:18:52"
                                  }
                                ],
                                "id": 14008,
                                "name": "MemberAccess",
                                "src": "1944:25:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 14009,
                                "name": "Literal",
                                "src": "1973:1:52"
                              }
                            ],
                            "id": 14010,
                            "name": "BinaryOperation",
                            "src": "1944:30:52"
                          }
                        ],
                        "id": 14011,
                        "name": "BinaryOperation",
                        "src": "1905:69:52"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 13999
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "74727565",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "true"
                                },
                                "id": 14012,
                                "name": "Literal",
                                "src": "1997:4:52"
                              }
                            ],
                            "id": 14013,
                            "name": "Return",
                            "src": "1990:11:52"
                          }
                        ],
                        "id": 14014,
                        "name": "Block",
                        "src": "1976:36:52"
                      }
                    ],
                    "id": 14015,
                    "name": "IfStatement",
                    "src": "1901:111:52"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        14017
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_proof",
                          "scope": 14030,
                          "stateVariable": false,
                          "storageLocation": "memory",
                          "type": "bytes",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes",
                              "type": "bytes"
                            },
                            "id": 14016,
                            "name": "ElementaryTypeName",
                            "src": "2022:5:52"
                          }
                        ],
                        "id": 14017,
                        "name": "VariableDeclaration",
                        "src": "2022:19:52"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "member_name": "encodePacked",
                              "referencedDeclaration": null,
                              "type": "function () pure returns (bytes memory)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 18347,
                                  "type": "abi",
                                  "value": "abi"
                                },
                                "id": 14018,
                                "name": "Identifier",
                                "src": "2044:3:52"
                              }
                            ],
                            "id": 14019,
                            "name": "MemberAccess",
                            "src": "2044:16:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 13989,
                              "type": "bytes32",
                              "value": "_txid"
                            },
                            "id": 14020,
                            "name": "Identifier",
                            "src": "2061:5:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 13993,
                              "type": "bytes memory",
                              "value": "_intermediateNodes"
                            },
                            "id": 14021,
                            "name": "Identifier",
                            "src": "2068:18:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 13991,
                              "type": "bytes32",
                              "value": "_merkleRoot"
                            },
                            "id": 14022,
                            "name": "Identifier",
                            "src": "2088:11:52"
                          }
                        ],
                        "id": 14023,
                        "name": "FunctionCall",
                        "src": "2044:56:52"
                      }
                    ],
                    "id": 14024,
                    "name": "VariableDeclarationStatement",
                    "src": "2022:78:52"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 13999
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "verifyHash256Merkle",
                              "referencedDeclaration": 13148,
                              "type": "function (bytes memory,uint256) pure returns (bool)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 14017,
                                  "type": "bytes memory",
                                  "value": "_proof"
                                },
                                "id": 14025,
                                "name": "Identifier",
                                "src": "2172:6:52"
                              }
                            ],
                            "id": 14026,
                            "name": "MemberAccess",
                            "src": "2172:26:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 13995,
                              "type": "uint256",
                              "value": "_index"
                            },
                            "id": 14027,
                            "name": "Identifier",
                            "src": "2199:6:52"
                          }
                        ],
                        "id": 14028,
                        "name": "FunctionCall",
                        "src": "2172:34:52"
                      }
                    ],
                    "id": 14029,
                    "name": "Return",
                    "src": "2165:41:52"
                  }
                ],
                "id": 14030,
                "name": "Block",
                "src": "1850:363:52"
              }
            ],
            "id": 14031,
            "name": "FunctionDefinition",
            "src": "1686:527:52"
          },
          {
            "attributes": {
              "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",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "calculateTxId",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_version",
                      "scope": 14055,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14032,
                        "name": "ElementaryTypeName",
                        "src": "2657:5:52"
                      }
                    ],
                    "id": 14033,
                    "name": "VariableDeclaration",
                    "src": "2657:21:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_vin",
                      "scope": 14055,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14034,
                        "name": "ElementaryTypeName",
                        "src": "2688:5:52"
                      }
                    ],
                    "id": 14035,
                    "name": "VariableDeclaration",
                    "src": "2688:17:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_vout",
                      "scope": 14055,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14036,
                        "name": "ElementaryTypeName",
                        "src": "2715:5:52"
                      }
                    ],
                    "id": 14037,
                    "name": "VariableDeclaration",
                    "src": "2715:18:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_locktime",
                      "scope": 14055,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14038,
                        "name": "ElementaryTypeName",
                        "src": "2743:5:52"
                      }
                    ],
                    "id": 14039,
                    "name": "VariableDeclaration",
                    "src": "2743:22:52"
                  }
                ],
                "id": 14040,
                "name": "ParameterList",
                "src": "2647:124:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14055,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14041,
                        "name": "ElementaryTypeName",
                        "src": "2795:7:52"
                      }
                    ],
                    "id": 14042,
                    "name": "VariableDeclaration",
                    "src": "2795:7:52"
                  }
                ],
                "id": 14043,
                "name": "ParameterList",
                "src": "2794:9:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 14043
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "hash256",
                              "referencedDeclaration": 11851,
                              "type": "function (bytes memory) pure returns (bytes32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes memory",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "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"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "member_name": "encodePacked",
                                      "referencedDeclaration": null,
                                      "type": "function () pure returns (bytes memory)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 18347,
                                          "type": "abi",
                                          "value": "abi"
                                        },
                                        "id": 14044,
                                        "name": "Identifier",
                                        "src": "2921:3:52"
                                      }
                                    ],
                                    "id": 14045,
                                    "name": "MemberAccess",
                                    "src": "2921:16:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14033,
                                      "type": "bytes memory",
                                      "value": "_version"
                                    },
                                    "id": 14046,
                                    "name": "Identifier",
                                    "src": "2938:8:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14035,
                                      "type": "bytes memory",
                                      "value": "_vin"
                                    },
                                    "id": 14047,
                                    "name": "Identifier",
                                    "src": "2948:4:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14037,
                                      "type": "bytes memory",
                                      "value": "_vout"
                                    },
                                    "id": 14048,
                                    "name": "Identifier",
                                    "src": "2954:5:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14039,
                                      "type": "bytes memory",
                                      "value": "_locktime"
                                    },
                                    "id": 14049,
                                    "name": "Identifier",
                                    "src": "2961:9:52"
                                  }
                                ],
                                "id": 14050,
                                "name": "FunctionCall",
                                "src": "2921:50:52"
                              }
                            ],
                            "id": 14051,
                            "name": "MemberAccess",
                            "src": "2921:58:52"
                          }
                        ],
                        "id": 14052,
                        "name": "FunctionCall",
                        "src": "2921:60:52"
                      }
                    ],
                    "id": 14053,
                    "name": "Return",
                    "src": "2914:67:52"
                  }
                ],
                "id": 14054,
                "name": "Block",
                "src": "2804:184:52"
              }
            ],
            "id": 14055,
            "name": "FunctionDefinition",
            "src": "2625:363:52"
          },
          {
            "attributes": {
              "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",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "validateHeaderChain",
              "scope": 14207,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 14148,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14056,
                        "name": "ElementaryTypeName",
                        "src": "3337:5:52"
                      }
                    ],
                    "id": 14057,
                    "name": "VariableDeclaration",
                    "src": "3337:21:52"
                  }
                ],
                "id": 14058,
                "name": "ParameterList",
                "src": "3336:23:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_totalDifficulty",
                      "scope": 14148,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14059,
                        "name": "ElementaryTypeName",
                        "src": "3383:7:52"
                      }
                    ],
                    "id": 14060,
                    "name": "VariableDeclaration",
                    "src": "3383:24:52"
                  }
                ],
                "id": 14061,
                "name": "ParameterList",
                "src": "3382:26:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "%",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "referencedDeclaration": null,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14057,
                                      "type": "bytes memory",
                                      "value": "_headers"
                                    },
                                    "id": 14062,
                                    "name": "Identifier",
                                    "src": "3461:8:52"
                                  }
                                ],
                                "id": 14063,
                                "name": "MemberAccess",
                                "src": "3461:15:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "3830",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 80",
                                  "value": "80"
                                },
                                "id": 14064,
                                "name": "Literal",
                                "src": "3479:2:52"
                              }
                            ],
                            "id": 14065,
                            "name": "BinaryOperation",
                            "src": "3461:20:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 14066,
                            "name": "Literal",
                            "src": "3485:1:52"
                          }
                        ],
                        "id": 14067,
                        "name": "BinaryOperation",
                        "src": "3461:25:52"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 14061
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 13957,
                                  "type": "uint256",
                                  "value": "ERR_BAD_LENGTH"
                                },
                                "id": 14068,
                                "name": "Identifier",
                                "src": "3496:14:52"
                              }
                            ],
                            "id": 14069,
                            "name": "Return",
                            "src": "3489:21:52"
                          }
                        ],
                        "id": 14070,
                        "name": "Block",
                        "src": "3488:24:52"
                      }
                    ],
                    "id": 14071,
                    "name": "IfStatement",
                    "src": "3457:55:52"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        14073
                      ],
                      "initialValue": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_digest",
                          "scope": 14147,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 14072,
                            "name": "ElementaryTypeName",
                            "src": "3563:7:52"
                          }
                        ],
                        "id": 14073,
                        "name": "VariableDeclaration",
                        "src": "3563:15:52"
                      }
                    ],
                    "id": 14074,
                    "name": "VariableDeclarationStatement",
                    "src": "3563:15:52"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14060,
                              "type": "uint256",
                              "value": "_totalDifficulty"
                            },
                            "id": 14075,
                            "name": "Identifier",
                            "src": "3589:16:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 14076,
                            "name": "Literal",
                            "src": "3608:1:52"
                          }
                        ],
                        "id": 14077,
                        "name": "Assignment",
                        "src": "3589:20:52"
                      }
                    ],
                    "id": 14078,
                    "name": "ExpressionStatement",
                    "src": "3589:20:52"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "assignments": [
                            14080
                          ]
                        },
                        "children": [
                          {
                            "attributes": {
                              "constant": false,
                              "name": "_start",
                              "scope": 14146,
                              "stateVariable": false,
                              "storageLocation": "default",
                              "type": "uint256",
                              "value": null,
                              "visibility": "internal"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint256",
                                  "type": "uint256"
                                },
                                "id": 14079,
                                "name": "ElementaryTypeName",
                                "src": "3625:7:52"
                              }
                            ],
                            "id": 14080,
                            "name": "VariableDeclaration",
                            "src": "3625:14:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 14081,
                            "name": "Literal",
                            "src": "3642:1:52"
                          }
                        ],
                        "id": 14082,
                        "name": "VariableDeclarationStatement",
                        "src": "3625:18:52"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14080,
                              "type": "uint256",
                              "value": "_start"
                            },
                            "id": 14083,
                            "name": "Identifier",
                            "src": "3645:6:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "referencedDeclaration": null,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 14057,
                                  "type": "bytes memory",
                                  "value": "_headers"
                                },
                                "id": 14084,
                                "name": "Identifier",
                                "src": "3654:8:52"
                              }
                            ],
                            "id": 14085,
                            "name": "MemberAccess",
                            "src": "3654:15:52"
                          }
                        ],
                        "id": 14086,
                        "name": "BinaryOperation",
                        "src": "3645:24:52"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "+=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 14080,
                                  "type": "uint256",
                                  "value": "_start"
                                },
                                "id": 14087,
                                "name": "Identifier",
                                "src": "3671:6:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "3830",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 80",
                                  "value": "80"
                                },
                                "id": 14088,
                                "name": "Literal",
                                "src": "3681:2:52"
                              }
                            ],
                            "id": 14089,
                            "name": "Assignment",
                            "src": "3671:12:52"
                          }
                        ],
                        "id": 14090,
                        "name": "ExpressionStatement",
                        "src": "3671:12:52"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "assignments": [
                                14092
                              ]
                            },
                            "children": [
                              {
                                "attributes": {
                                  "constant": false,
                                  "name": "_header",
                                  "scope": 14145,
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "type": "bytes",
                                  "value": null,
                                  "visibility": "internal"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "bytes",
                                      "type": "bytes"
                                    },
                                    "id": 14091,
                                    "name": "ElementaryTypeName",
                                    "src": "3753:5:52"
                                  }
                                ],
                                "id": 14092,
                                "name": "VariableDeclaration",
                                "src": "3753:20:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes memory",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_80_by_1",
                                          "typeString": "int_const 80"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "slice",
                                      "referencedDeclaration": 13281,
                                      "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 14057,
                                          "type": "bytes memory",
                                          "value": "_headers"
                                        },
                                        "id": 14093,
                                        "name": "Identifier",
                                        "src": "3776:8:52"
                                      }
                                    ],
                                    "id": 14094,
                                    "name": "MemberAccess",
                                    "src": "3776:14:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14080,
                                      "type": "uint256",
                                      "value": "_start"
                                    },
                                    "id": 14095,
                                    "name": "Identifier",
                                    "src": "3791:6:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "3830",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 80",
                                      "value": "80"
                                    },
                                    "id": 14096,
                                    "name": "Literal",
                                    "src": "3799:2:52"
                                  }
                                ],
                                "id": 14097,
                                "name": "FunctionCall",
                                "src": "3776:26:52"
                              }
                            ],
                            "id": 14098,
                            "name": "VariableDeclarationStatement",
                            "src": "3753:49:52"
                          },
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "!=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14080,
                                      "type": "uint256",
                                      "value": "_start"
                                    },
                                    "id": 14099,
                                    "name": "Identifier",
                                    "src": "3894:6:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 14100,
                                    "name": "Literal",
                                    "src": "3904:1:52"
                                  }
                                ],
                                "id": 14101,
                                "name": "BinaryOperation",
                                "src": "3894:11:52"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "falseBody": null
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "!",
                                          "prefix": true,
                                          "type": "bool"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": false,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "type": "bool",
                                              "type_conversion": false
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_bytes_memory_ptr",
                                                      "typeString": "bytes memory"
                                                    },
                                                    {
                                                      "typeIdentifier": "t_bytes32",
                                                      "typeString": "bytes32"
                                                    }
                                                  ],
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 14206,
                                                  "type": "function (bytes memory,bytes32) pure returns (bool)",
                                                  "value": "validateHeaderPrevHash"
                                                },
                                                "id": 14102,
                                                "name": "Identifier",
                                                "src": "3930:22:52"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 14092,
                                                  "type": "bytes memory",
                                                  "value": "_header"
                                                },
                                                "id": 14103,
                                                "name": "Identifier",
                                                "src": "3953:7:52"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 14073,
                                                  "type": "bytes32",
                                                  "value": "_digest"
                                                },
                                                "id": 14104,
                                                "name": "Identifier",
                                                "src": "3962:7:52"
                                              }
                                            ],
                                            "id": 14105,
                                            "name": "FunctionCall",
                                            "src": "3930:40:52"
                                          }
                                        ],
                                        "id": 14106,
                                        "name": "UnaryOperation",
                                        "src": "3929:41:52"
                                      },
                                      {
                                        "children": [
                                          {
                                            "attributes": {
                                              "functionReturnParameters": 14061
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 13960,
                                                  "type": "uint256",
                                                  "value": "ERR_INVALID_CHAIN"
                                                },
                                                "id": 14107,
                                                "name": "Identifier",
                                                "src": "3980:17:52"
                                              }
                                            ],
                                            "id": 14108,
                                            "name": "Return",
                                            "src": "3973:24:52"
                                          }
                                        ],
                                        "id": 14109,
                                        "name": "Block",
                                        "src": "3972:27:52"
                                      }
                                    ],
                                    "id": 14110,
                                    "name": "IfStatement",
                                    "src": "3925:74:52"
                                  }
                                ],
                                "id": 14111,
                                "name": "Block",
                                "src": "3907:106:52"
                              }
                            ],
                            "id": 14112,
                            "name": "IfStatement",
                            "src": "3890:123:52"
                          },
                          {
                            "attributes": {
                              "assignments": [
                                14114
                              ]
                            },
                            "children": [
                              {
                                "attributes": {
                                  "constant": false,
                                  "name": "_target",
                                  "scope": 14145,
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "type": "uint256",
                                  "value": null,
                                  "visibility": "internal"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "uint256",
                                      "type": "uint256"
                                    },
                                    "id": 14113,
                                    "name": "ElementaryTypeName",
                                    "src": "4060:7:52"
                                  }
                                ],
                                "id": 14114,
                                "name": "VariableDeclaration",
                                "src": "4060:15:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "extractTarget",
                                      "referencedDeclaration": 12925,
                                      "type": "function (bytes memory) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 14092,
                                          "type": "bytes memory",
                                          "value": "_header"
                                        },
                                        "id": 14115,
                                        "name": "Identifier",
                                        "src": "4078:7:52"
                                      }
                                    ],
                                    "id": 14116,
                                    "name": "MemberAccess",
                                    "src": "4078:21:52"
                                  }
                                ],
                                "id": 14117,
                                "name": "FunctionCall",
                                "src": "4078:23:52"
                              }
                            ],
                            "id": 14118,
                            "name": "VariableDeclarationStatement",
                            "src": "4060:41:52"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14073,
                                      "type": "bytes32",
                                      "value": "_digest"
                                    },
                                    "id": 14119,
                                    "name": "Identifier",
                                    "src": "4175:7:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes32",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "hash256View",
                                          "referencedDeclaration": 11860,
                                          "type": "function (bytes memory) view returns (bytes32)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 14092,
                                              "type": "bytes memory",
                                              "value": "_header"
                                            },
                                            "id": 14120,
                                            "name": "Identifier",
                                            "src": "4185:7:52"
                                          }
                                        ],
                                        "id": 14121,
                                        "name": "MemberAccess",
                                        "src": "4185:19:52"
                                      }
                                    ],
                                    "id": 14122,
                                    "name": "FunctionCall",
                                    "src": "4185:21:52"
                                  }
                                ],
                                "id": 14123,
                                "name": "Assignment",
                                "src": "4175:31:52"
                              }
                            ],
                            "id": 14124,
                            "name": "ExpressionStatement",
                            "src": "4175:31:52"
                          },
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "reverseUint256",
                                          "referencedDeclaration": 11739,
                                          "type": "function (uint256) pure returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": false,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "type": "uint256",
                                              "type_conversion": true
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_bytes32",
                                                      "typeString": "bytes32"
                                                    }
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "lValueRequested": false,
                                                  "type": "type(uint256)",
                                                  "value": "uint256"
                                                },
                                                "id": 14125,
                                                "name": "ElementaryTypeNameExpression",
                                                "src": "4223:7:52"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 14073,
                                                  "type": "bytes32",
                                                  "value": "_digest"
                                                },
                                                "id": 14126,
                                                "name": "Identifier",
                                                "src": "4231:7:52"
                                              }
                                            ],
                                            "id": 14127,
                                            "name": "FunctionCall",
                                            "src": "4223:16:52"
                                          }
                                        ],
                                        "id": 14128,
                                        "name": "MemberAccess",
                                        "src": "4223:31:52"
                                      }
                                    ],
                                    "id": 14129,
                                    "name": "FunctionCall",
                                    "src": "4223:33:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14114,
                                      "type": "uint256",
                                      "value": "_target"
                                    },
                                    "id": 14130,
                                    "name": "Identifier",
                                    "src": "4259:7:52"
                                  }
                                ],
                                "id": 14131,
                                "name": "BinaryOperation",
                                "src": "4223:43:52"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "functionReturnParameters": 14061
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 13963,
                                          "type": "uint256",
                                          "value": "ERR_LOW_WORK"
                                        },
                                        "id": 14132,
                                        "name": "Identifier",
                                        "src": "4293:12:52"
                                      }
                                    ],
                                    "id": 14133,
                                    "name": "Return",
                                    "src": "4286:19:52"
                                  }
                                ],
                                "id": 14134,
                                "name": "Block",
                                "src": "4268:52:52"
                              }
                            ],
                            "id": 14135,
                            "name": "IfStatement",
                            "src": "4220:100:52"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 14060,
                                      "type": "uint256",
                                      "value": "_totalDifficulty"
                                    },
                                    "id": 14136,
                                    "name": "Identifier",
                                    "src": "4393:16:52"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "add",
                                          "referencedDeclaration": 13920,
                                          "type": "function (uint256,uint256) pure returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 14060,
                                              "type": "uint256",
                                              "value": "_totalDifficulty"
                                            },
                                            "id": 14137,
                                            "name": "Identifier",
                                            "src": "4412:16:52"
                                          }
                                        ],
                                        "id": 14138,
                                        "name": "MemberAccess",
                                        "src": "4412:20:52"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "arguments": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "calculateDifficulty",
                                              "referencedDeclaration": 12938,
                                              "type": "function (uint256) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 14114,
                                                  "type": "uint256",
                                                  "value": "_target"
                                                },
                                                "id": 14139,
                                                "name": "Identifier",
                                                "src": "4433:7:52"
                                              }
                                            ],
                                            "id": 14140,
                                            "name": "MemberAccess",
                                            "src": "4433:27:52"
                                          }
                                        ],
                                        "id": 14141,
                                        "name": "FunctionCall",
                                        "src": "4433:29:52"
                                      }
                                    ],
                                    "id": 14142,
                                    "name": "FunctionCall",
                                    "src": "4412:51:52"
                                  }
                                ],
                                "id": 14143,
                                "name": "Assignment",
                                "src": "4393:70:52"
                              }
                            ],
                            "id": 14144,
                            "name": "ExpressionStatement",
                            "src": "4393:70:52"
                          }
                        ],
                        "id": 14145,
                        "name": "Block",
                        "src": "3685:789:52"
                      }
                    ],
                    "id": 14146,
                    "name": "ForStatement",
                    "src": "3620:854:52"
                  }
                ],
                "id": 14147,
                "name": "Block",
                "src": "3409:1071:52"
              }
            ],
            "id": 14148,
            "name": "FunctionDefinition",
            "src": "3308:1172:52"
          },
          {
            "attributes": {
              "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",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "validateHeaderWork",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 14179,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14149,
                        "name": "ElementaryTypeName",
                        "src": "4738:7:52"
                      }
                    ],
                    "id": 14150,
                    "name": "VariableDeclaration",
                    "src": "4738:15:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_target",
                      "scope": 14179,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14151,
                        "name": "ElementaryTypeName",
                        "src": "4755:7:52"
                      }
                    ],
                    "id": 14152,
                    "name": "VariableDeclaration",
                    "src": "4755:15:52"
                  }
                ],
                "id": 14153,
                "name": "ParameterList",
                "src": "4737:34:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14179,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14154,
                        "name": "ElementaryTypeName",
                        "src": "4795:4:52"
                      }
                    ],
                    "id": 14155,
                    "name": "VariableDeclaration",
                    "src": "4795:4:52"
                  }
                ],
                "id": 14156,
                "name": "ParameterList",
                "src": "4794:6:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14150,
                              "type": "bytes32",
                              "value": "_digest"
                            },
                            "id": 14157,
                            "name": "Identifier",
                            "src": "4815:7:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(bytes32)",
                                  "value": "bytes32"
                                },
                                "id": 14158,
                                "name": "ElementaryTypeNameExpression",
                                "src": "4826:7:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 14159,
                                "name": "Literal",
                                "src": "4834:1:52"
                              }
                            ],
                            "id": 14160,
                            "name": "FunctionCall",
                            "src": "4826:10:52"
                          }
                        ],
                        "id": 14161,
                        "name": "BinaryOperation",
                        "src": "4815:21:52"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 14156
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "66616c7365",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "false"
                                },
                                "id": 14162,
                                "name": "Literal",
                                "src": "4846:5:52"
                              }
                            ],
                            "id": 14163,
                            "name": "Return",
                            "src": "4839:12:52"
                          }
                        ],
                        "id": 14164,
                        "name": "Block",
                        "src": "4838:15:52"
                      }
                    ],
                    "id": 14165,
                    "name": "IfStatement",
                    "src": "4811:42:52"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 14156
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "bytesToUint",
                                      "referencedDeclaration": 11790,
                                      "type": "function (bytes memory) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "arguments": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "bytes memory",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "reverseEndianness",
                                              "referencedDeclaration": 11643,
                                              "type": "function (bytes memory) pure returns (bytes memory)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "isStructConstructorCall": false,
                                                  "lValueRequested": false,
                                                  "names": [
                                                    null
                                                  ],
                                                  "type": "bytes memory",
                                                  "type_conversion": false
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": [
                                                        {
                                                          "typeIdentifier": "t_bytes32",
                                                          "typeString": "bytes32"
                                                        }
                                                      ],
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": true,
                                                      "lValueRequested": false,
                                                      "member_name": "encodePacked",
                                                      "referencedDeclaration": null,
                                                      "type": "function () pure returns (bytes memory)"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 18347,
                                                          "type": "abi",
                                                          "value": "abi"
                                                        },
                                                        "id": 14166,
                                                        "name": "Identifier",
                                                        "src": "4870:3:52"
                                                      }
                                                    ],
                                                    "id": 14167,
                                                    "name": "MemberAccess",
                                                    "src": "4870:16:52"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 14150,
                                                      "type": "bytes32",
                                                      "value": "_digest"
                                                    },
                                                    "id": 14168,
                                                    "name": "Identifier",
                                                    "src": "4887:7:52"
                                                  }
                                                ],
                                                "id": 14169,
                                                "name": "FunctionCall",
                                                "src": "4870:25:52"
                                              }
                                            ],
                                            "id": 14170,
                                            "name": "MemberAccess",
                                            "src": "4870:43:52"
                                          }
                                        ],
                                        "id": 14171,
                                        "name": "FunctionCall",
                                        "src": "4870:45:52"
                                      }
                                    ],
                                    "id": 14172,
                                    "name": "MemberAccess",
                                    "src": "4870:57:52"
                                  }
                                ],
                                "id": 14173,
                                "name": "FunctionCall",
                                "src": "4870:59:52"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 14152,
                                  "type": "uint256",
                                  "value": "_target"
                                },
                                "id": 14174,
                                "name": "Identifier",
                                "src": "4932:7:52"
                              }
                            ],
                            "id": 14175,
                            "name": "BinaryOperation",
                            "src": "4870:69:52"
                          }
                        ],
                        "id": 14176,
                        "name": "TupleExpression",
                        "src": "4869:71:52"
                      }
                    ],
                    "id": 14177,
                    "name": "Return",
                    "src": "4862:78:52"
                  }
                ],
                "id": 14178,
                "name": "Block",
                "src": "4801:146:52"
              }
            ],
            "id": 14179,
            "name": "FunctionDefinition",
            "src": "4710:237:52"
          },
          {
            "attributes": {
              "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 the connect is valid, false otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "validateHeaderPrevHash",
              "scope": 14207,
              "stateMutability": "pure",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_header",
                      "scope": 14206,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14180,
                        "name": "ElementaryTypeName",
                        "src": "5354:5:52"
                      }
                    ],
                    "id": 14181,
                    "name": "VariableDeclaration",
                    "src": "5354:20:52"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_prevHeaderDigest",
                      "scope": 14206,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14182,
                        "name": "ElementaryTypeName",
                        "src": "5376:7:52"
                      }
                    ],
                    "id": 14183,
                    "name": "VariableDeclaration",
                    "src": "5376:25:52"
                  }
                ],
                "id": 14184,
                "name": "ParameterList",
                "src": "5353:49:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14206,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14185,
                        "name": "ElementaryTypeName",
                        "src": "5426:4:52"
                      }
                    ],
                    "id": 14186,
                    "name": "VariableDeclaration",
                    "src": "5426:4:52"
                  }
                ],
                "id": 14187,
                "name": "ParameterList",
                "src": "5425:6:52"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        14189
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_prevHash",
                          "scope": 14205,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 14188,
                            "name": "ElementaryTypeName",
                            "src": "5489:7:52"
                          }
                        ],
                        "id": 14189,
                        "name": "VariableDeclaration",
                        "src": "5489:17:52"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "toBytes32",
                              "referencedDeclaration": 13400,
                              "type": "function (bytes memory) pure returns (bytes32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes memory",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "extractPrevBlockLE",
                                      "referencedDeclaration": 12952,
                                      "type": "function (bytes memory) pure returns (bytes memory)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 14181,
                                          "type": "bytes memory",
                                          "value": "_header"
                                        },
                                        "id": 14190,
                                        "name": "Identifier",
                                        "src": "5509:7:52"
                                      }
                                    ],
                                    "id": 14191,
                                    "name": "MemberAccess",
                                    "src": "5509:26:52"
                                  }
                                ],
                                "id": 14192,
                                "name": "FunctionCall",
                                "src": "5509:28:52"
                              }
                            ],
                            "id": 14193,
                            "name": "MemberAccess",
                            "src": "5509:38:52"
                          }
                        ],
                        "id": 14194,
                        "name": "FunctionCall",
                        "src": "5509:40:52"
                      }
                    ],
                    "id": 14195,
                    "name": "VariableDeclarationStatement",
                    "src": "5489:60:52"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14189,
                              "type": "bytes32",
                              "value": "_prevHash"
                            },
                            "id": 14196,
                            "name": "Identifier",
                            "src": "5638:9:52"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14183,
                              "type": "bytes32",
                              "value": "_prevHeaderDigest"
                            },
                            "id": 14197,
                            "name": "Identifier",
                            "src": "5651:17:52"
                          }
                        ],
                        "id": 14198,
                        "name": "BinaryOperation",
                        "src": "5638:30:52"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 14187
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "66616c7365",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "false"
                                },
                                "id": 14199,
                                "name": "Literal",
                                "src": "5678:5:52"
                              }
                            ],
                            "id": 14200,
                            "name": "Return",
                            "src": "5671:12:52"
                          }
                        ],
                        "id": 14201,
                        "name": "Block",
                        "src": "5670:15:52"
                      }
                    ],
                    "id": 14202,
                    "name": "IfStatement",
                    "src": "5634:51:52"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 14187
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 14203,
                        "name": "Literal",
                        "src": "5702:4:52"
                      }
                    ],
                    "id": 14204,
                    "name": "Return",
                    "src": "5695:11:52"
                  }
                ],
                "id": 14205,
                "name": "Block",
                "src": "5432:281:52"
              }
            ],
            "id": 14206,
            "name": "FunctionDefinition",
            "src": "5322:391:52"
          }
        ],
        "id": 14207,
        "name": "ContractDefinition",
        "src": "218:5497:52"
      }
    ],
    "id": 14208,
    "name": "SourceUnit",
    "src": "0:5716:52"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.17+commit.d19bba13.Emscripten.clang"
  },
  "networks": {
    "3": {
      "events": {},
      "links": {},
      "address": "0xF2F9d033105CBb123A7c5978f4765934EfE97383",
      "transactionHash": "0xdb7d6b49907dd8cae1a8c1c955c499345cd8e8d95bd7eea8f84d0d9ebbe3e058"
    }
  },
  "schemaVersion": "3.3.4",
  "updatedAt": "2021-11-23T12:01:17.124Z",
  "networkType": "ethereum",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}