{
  "contractName": "ISPVRequestManager",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "_requester",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_requestID",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint64",
          "name": "_paysValue",
          "type": "uint64"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "_spends",
          "type": "bytes"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "_pays",
          "type": "bytes"
        }
      ],
      "name": "NewProofRequest",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_requestID",
          "type": "uint256"
        }
      ],
      "name": "RequestClosed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "_txid",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_requestID",
          "type": "uint256"
        }
      ],
      "name": "RequestFilled",
      "type": "event"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "bytes",
          "name": "_spends",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "_pays",
          "type": "bytes"
        },
        {
          "internalType": "uint64",
          "name": "_paysValue",
          "type": "uint64"
        },
        {
          "internalType": "address",
          "name": "_consumer",
          "type": "address"
        },
        {
          "internalType": "uint8",
          "name": "_numConfs",
          "type": "uint8"
        },
        {
          "internalType": "uint256",
          "name": "_notBefore",
          "type": "uint256"
        }
      ],
      "name": "request",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_requestID",
          "type": "uint256"
        }
      ],
      "name": "cancelRequest",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_requestID",
          "type": "uint256"
        }
      ],
      "name": "getRequest",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "spends",
          "type": "bytes32"
        },
        {
          "internalType": "bytes32",
          "name": "pays",
          "type": "bytes32"
        },
        {
          "internalType": "uint64",
          "name": "paysValue",
          "type": "uint64"
        },
        {
          "internalType": "uint8",
          "name": "state",
          "type": "uint8"
        },
        {
          "internalType": "address",
          "name": "consumer",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "uint8",
          "name": "numConfs",
          "type": "uint8"
        },
        {
          "internalType": "uint256",
          "name": "notBefore",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_paysValue\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_spends\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_pays\",\"type\":\"bytes\"}],\"name\":\"NewProofRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestID\",\"type\":\"uint256\"}],\"name\":\"RequestClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_txid\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestID\",\"type\":\"uint256\"}],\"name\":\"RequestFilled\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestID\",\"type\":\"uint256\"}],\"name\":\"cancelRequest\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestID\",\"type\":\"uint256\"}],\"name\":\"getRequest\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"spends\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"pays\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"paysValue\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"numConfs\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"notBefore\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_spends\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_pays\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_paysValue\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_consumer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_numConfs\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_notBefore\",\"type\":\"uint256\"}],\"name\":\"request\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Summa (https://summa.one)\",\"details\":\"Manage subscriptions to Bitcoin events. Register callbacks to             be called whenever specific Bitcoin transactions are made.\",\"methods\":{\"cancelRequest(uint256)\":{\"details\":\"Prevents the relay from forwarding tx information\",\"params\":{\"_requestID\":\"The ID of the request to be cancelled\"},\"return\":\"True if succesful, error otherwise\"},\"getRequest(uint256)\":{\"details\":\"Requests ids are numerical\",\"params\":{\"_requestID\":\"The numerical ID of the request\"},\"return\":\"A tuple representation of the request struct.                     To save space`spends` and `pays` are stored as keccak256                     hashes of the original information. The `state` is                     `0` for \\\"does not exist\\\", `1` for \\\"active\\\" and `2` for                     \\\"cancelled.\\\"\"},\"request(bytes,bytes,uint64,address,uint8,uint256)\":{\"details\":\"The request can be a spent utxo and/or a created utxo.     ///                     The contract allows users to register a \\\"consumer\\\" contract                     that implements ISPVConsumer to handle Bitcoin events.     ///                     Bitcoin transactions are composed of a vector of inputs,                     and a vector of outputs. The `_spends` parameter allows consumers                     to watch a specific UTXO, and receive an event when it is spent.     ///                     The `_pays` and `_paysValue` param allow the user to watch specific                     Bitcoin output scripts. An output script is typically encoded                     as an address, but an address is not an in-protocol construction.                     In other words, consumers will receive an event whenever a specific                     address receives funds, or when a specific OP_RETURN is created.     ///                     Either `_spends` or `_pays` MUST be set. Both MAY be set.                     If both are set, only notifications meeting both criteria                     will be triggered. \",\"params\":{\"_consumer\":\"The address of a contract that implements the `ISPVConsumer` interface.                     Whenever events are available, the Relay will validate inclusion                     and confirmation, then call the `spv` function on the consumer. \",\"_notBefore\":\"An Ethereum timestamp before which proofs will not be accepted.                     Used to control app flow for specific users. \",\"_numConfs\":\"The number of headers that must confirm the block                     containing the transaction. Used as a security parameter.                     More confirmations means less likely to revert due to a                     chain reorganization. Note that 1 confirmation is required,                     so the general \\\"6 confirmation\\\" rule would be expressed                     as `5` when calling this function \",\"_pays\":\"An output script to watch for events. A filter with `_pays` set will                     validate any number of events that create new UTXOs with a specific                     output script.     ///                     This is useful for watching an address and responding to incoming                     payments. \",\"_paysValue\":\"A minimum value in satoshi that must be paid to the output script.                     If this is set no any non-0 number, the Relay will only forward                     `_pays` notifications to the consumer if the value of the new UTXO is                     at least `_paysValue`. \",\"_spends\":\"An outpoint that must be spent in acceptable transactions.                     The outpoint must be exactly 36 bytes, and composed of a                     LE txid (32 bytes), and an 4-byte LE-encoded index integer.                     In other words, the precise serialization format used in a                     serialized Bitcoin TxIn.     ///                     Note that while we might expect a `_spends` event to fire at most                     one time, that expectation becomes invalid in long Bitcoin reorgs                     if there is a double-spend or a disconfirmation followed by                     reconfirmation. \"},\"return\":\"A unique request ID.\"}},\"title\":\"ISPVRequestManager\"},\"userdoc\":{\"methods\":{\"cancelRequest(uint256)\":{\"notice\":\"Cancel an active bitcoin event request.\"},\"getRequest(uint256)\":{\"notice\":\"Retrieve info about a request\"},\"request(bytes,bytes,uint64,address,uint8,uint256)\":{\"notice\":\"Subscribe to a feed of Bitcoin transactions matching a request\"}},\"notice\":\"The interface for using the OnDemandSPV system. This interface             allows you to subscribe to Bitcoin events.\"}},\"settings\":{\"compilationTarget\":{\"@summa-tx/relay-sol/contracts/Interfaces.sol\":\"ISPVRequestManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@summa-tx/relay-sol/contracts/Interfaces.sol\":{\"keccak256\":\"0x6f2698f8aab5cee319f36d69438b6870496a5523e7ccac4b465cdb38661242fa\",\"urls\":[\"bzz-raw://7f854c72db81631d1df800ae0c5fb0a50dc9efd97b0e6593b063c9fb1c61ef9e\",\"dweb:/ipfs/QmUMSQhzYKRSkLTGcHekjqvw1mLpeUULZkfffRdN521NBg\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "pragma solidity ^0.5.10;\n\n/// @title      ISPVConsumer\n/// @author     Summa (https://summa.one)\n/// @notice     This interface consumes validated transaction information.\n///             It is the primary way that user contracts accept\n/// @dev        Implement this interface to process transactions provided by\n///             the Relay system.\ninterface ISPVConsumer {\n    /// @notice     A consumer for Bitcoin transaction information.\n    /// @dev        Users must implement this function. It handles Bitcoin\n    ///             events that have been validated by the Relay contract.\n    ///             It is VERY IMPORTANT that this function validates the\n    ///             msg.sender. The callee must check the origin of the data\n    ///             or risk accepting spurious information.\n    /// @param _txid        The LE(!) txid of the bitcoin transaction that\n    ///                     triggered the notification.\n    /// @param _vin         The length-prefixed input vector of the bitcoin tx\n    ///                     that triggered the notification.\n    /// @param _vout        The length-prefixed output vector of the bitcoin tx\n    ///                     that triggered the notification.\n    /// @param _requestID   The ID of the event request that this notification\n    ///                     satisfies. The ID is returned by\n    ///                     OnDemandSPV.request and should be locally stored by\n    ///                     any contract that makes more than one request.\n    /// @param _inputIndex  The index of the input in the _vin that triggered\n    ///                     the notification.\n    /// @param _outputIndex The index of the output in the _vout that triggered\n    ///                     the notification. Useful for subscribing to transactions\n    ///                     that spend the newly-created UTXO.\n    function spv(\n        bytes32 _txid,\n        bytes calldata _vin,\n        bytes calldata _vout,\n        uint256 _requestID,\n        uint8 _inputIndex,\n        uint8 _outputIndex) external;\n}\n\n/// @title      ISPVRequestManager\n/// @author     Summa (https://summa.one)\n/// @notice     The interface for using the OnDemandSPV system. This interface\n///             allows you to subscribe to Bitcoin events.\n/// @dev        Manage subscriptions to Bitcoin events. Register callbacks to\n///             be called whenever specific Bitcoin transactions are made.\ninterface ISPVRequestManager {\n    event NewProofRequest (\n        address indexed _requester,\n        uint256 indexed _requestID,\n        uint64 _paysValue,\n        bytes _spends,\n        bytes _pays\n    );\n\n    event RequestClosed(uint256 indexed _requestID);\n    event RequestFilled(bytes32 indexed _txid, uint256 indexed _requestID);\n\n    /// @notice             Subscribe to a feed of Bitcoin transactions matching a request\n    /// @dev                The request can be a spent utxo and/or a created utxo.\n    ///\n    ///                     The contract allows users to register a \"consumer\" contract\n    ///                     that implements ISPVConsumer to handle Bitcoin events.\n    ///\n    ///                     Bitcoin transactions are composed of a vector of inputs,\n    ///                     and a vector of outputs. The `_spends` parameter allows consumers\n    ///                     to watch a specific UTXO, and receive an event when it is spent.\n    ///\n    ///                     The `_pays` and `_paysValue` param allow the user to watch specific\n    ///                     Bitcoin output scripts. An output script is typically encoded\n    ///                     as an address, but an address is not an in-protocol construction.\n    ///                     In other words, consumers will receive an event whenever a specific\n    ///                     address receives funds, or when a specific OP_RETURN is created.\n    ///\n    ///                     Either `_spends` or `_pays` MUST be set. Both MAY be set.\n    ///                     If both are set, only notifications meeting both criteria\n    ///                     will be triggered.\n    ///\n    /// @param  _spends     An outpoint that must be spent in acceptable transactions.\n    ///                     The outpoint must be exactly 36 bytes, and composed of a\n    ///                     LE txid (32 bytes), and an 4-byte LE-encoded index integer.\n    ///                     In other words, the precise serialization format used in a\n    ///                     serialized Bitcoin TxIn.\n    ///\n    ///                     Note that while we might expect a `_spends` event to fire at most\n    ///                     one time, that expectation becomes invalid in long Bitcoin reorgs\n    ///                     if there is a double-spend or a disconfirmation followed by\n    ///                     reconfirmation.\n    ///\n    /// @param  _pays       An output script to watch for events. A filter with `_pays` set will\n    ///                     validate any number of events that create new UTXOs with a specific\n    ///                     output script.\n    ///\n    ///                     This is useful for watching an address and responding to incoming\n    ///                     payments.\n    ///\n    /// @param  _paysValue  A minimum value in satoshi that must be paid to the output script.\n    ///                     If this is set no any non-0 number, the Relay will only forward\n    ///                     `_pays` notifications to the consumer if the value of the new UTXO is\n    ///                     at least `_paysValue`.\n    ///\n    /// @param  _consumer   The address of a contract that implements the `ISPVConsumer` interface.\n    ///                     Whenever events are available, the Relay will validate inclusion\n    ///                     and confirmation, then call the `spv` function on the consumer.\n    ///\n    /// @param  _numConfs   The number of headers that must confirm the block\n    ///                     containing the transaction. Used as a security parameter.\n    ///                     More confirmations means less likely to revert due to a\n    ///                     chain reorganization. Note that 1 confirmation is required,\n    ///                     so the general \"6 confirmation\" rule would be expressed\n    ///                     as `5` when calling this function\n    ///\n    /// @param  _notBefore  An Ethereum timestamp before which proofs will not be accepted.\n    ///                     Used to control app flow for specific users.\n    ///\n    /// @return             A unique request ID.\n    function request(\n        bytes calldata _spends,\n        bytes calldata _pays,\n        uint64 _paysValue,\n        address _consumer,\n        uint8 _numConfs,\n        uint256 _notBefore\n    ) external returns (uint256);\n\n    /// @notice                 Cancel an active bitcoin event request.\n    /// @dev                    Prevents the relay from forwarding tx information\n    /// @param  _requestID      The ID of the request to be cancelled\n    /// @return                 True if succesful, error otherwise\n    function cancelRequest(uint256 _requestID) external returns (bool);\n\n    /// @notice             Retrieve info about a request\n    /// @dev                Requests ids are numerical\n    /// @param  _requestID  The numerical ID of the request\n    /// @return             A tuple representation of the request struct.\n    ///                     To save space`spends` and `pays` are stored as keccak256\n    ///                     hashes of the original information. The `state` is\n    ///                     `0` for \"does not exist\", `1` for \"active\" and `2` for\n    ///                     \"cancelled.\"\n    function getRequest(\n        uint256 _requestID\n    ) external view returns (\n        bytes32 spends,\n        bytes32 pays,\n        uint64 paysValue,\n        uint8 state,\n        address consumer,\n        address owner,\n        uint8 numConfs,\n        uint256 notBefore\n    );\n}\n\n\n\ninterface IRelay {\n    event Extension(bytes32 indexed _first, bytes32 indexed _last);\n    event NewTip(bytes32 indexed _from, bytes32 indexed _to, bytes32 indexed _gcd);\n\n    function getCurrentEpochDifficulty() external view returns (uint256);\n    function getPrevEpochDifficulty() external view returns (uint256);\n    function getRelayGenesis() external view returns (bytes32);\n    function getBestKnownDigest() external view returns (bytes32);\n    function getLastReorgCommonAncestor() external view returns (bytes32);\n\n    function findHeight(bytes32 _digest) external view returns (uint256);\n\n    function findAncestor(bytes32 _digest, uint256 _offset) external view returns (bytes32);\n\n    function isAncestor(bytes32 _ancestor, bytes32 _descendant, uint256 _limit) external view returns (bool);\n\n    function addHeaders(bytes calldata _anchor, bytes calldata _headers) external returns (bool);\n\n    function addHeadersWithRetarget(\n        bytes calldata _oldPeriodStartHeader,\n        bytes calldata _oldPeriodEndHeader,\n        bytes calldata _headers\n    ) external returns (bool);\n\n    function markNewHeaviest(\n        bytes32 _ancestor,\n        bytes calldata _currentBest,\n        bytes calldata _newBest,\n        uint256 _limit\n    ) external returns (bool);\n}\n",
  "sourcePath": "@summa-tx/relay-sol/contracts/Interfaces.sol",
  "ast": {
    "absolutePath": "@summa-tx/relay-sol/contracts/Interfaces.sol",
    "exportedSymbols": {
      "IRelay": [
        14393
      ],
      "ISPVConsumer": [
        14225
      ],
      "ISPVRequestManager": [
        14293
      ]
    },
    "id": 14394,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 14209,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".10"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:53"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": "@title      ISPVConsumer\n @author     Summa (https://summa.one)\n @notice     This interface consumes validated transaction information.\n             It is the primary way that user contracts accept\n @dev        Implement this interface to process transactions provided by\n             the Relay system.",
        "fullyImplemented": false,
        "id": 14225,
        "linearizedBaseContracts": [
          14225
        ],
        "name": "ISPVConsumer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": "@notice     A consumer for Bitcoin transaction information.\n @dev        Users must implement this function. It handles Bitcoin\n             events that have been validated by the Relay contract.\n             It is VERY IMPORTANT that this function validates the\n             msg.sender. The callee must check the origin of the data\n             or risk accepting spurious information.\n @param _txid        The LE(!) txid of the bitcoin transaction that\n                     triggered the notification.\n @param _vin         The length-prefixed input vector of the bitcoin tx\n                     that triggered the notification.\n @param _vout        The length-prefixed output vector of the bitcoin tx\n                     that triggered the notification.\n @param _requestID   The ID of the event request that this notification\n                     satisfies. The ID is returned by\n                     OnDemandSPV.request and should be locally stored by\n                     any contract that makes more than one request.\n @param _inputIndex  The index of the input in the _vin that triggered\n                     the notification.\n @param _outputIndex The index of the output in the _vout that triggered\n                     the notification. Useful for subscribing to transactions\n                     that spend the newly-created UTXO.",
            "id": 14224,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "spv",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14222,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14211,
                  "name": "_txid",
                  "nodeType": "VariableDeclaration",
                  "scope": 14224,
                  "src": "1887:13:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14210,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1887:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14213,
                  "name": "_vin",
                  "nodeType": "VariableDeclaration",
                  "scope": 14224,
                  "src": "1910:19:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14212,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1910:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14215,
                  "name": "_vout",
                  "nodeType": "VariableDeclaration",
                  "scope": 14224,
                  "src": "1939:20:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14214,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1939:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14217,
                  "name": "_requestID",
                  "nodeType": "VariableDeclaration",
                  "scope": 14224,
                  "src": "1969:18:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14216,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1969:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14219,
                  "name": "_inputIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 14224,
                  "src": "1997:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 14218,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "1997:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14221,
                  "name": "_outputIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 14224,
                  "src": "2024:18:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 14220,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "2024:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1877:166:53"
            },
            "returnParameters": {
              "id": 14223,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2052:0:53"
            },
            "scope": 14225,
            "src": "1865:188:53",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 14394,
        "src": "348:1707:53"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": "@title      ISPVRequestManager\n @author     Summa (https://summa.one)\n @notice     The interface for using the OnDemandSPV system. This interface\n             allows you to subscribe to Bitcoin events.\n @dev        Manage subscriptions to Bitcoin events. Register callbacks to\n             be called whenever specific Bitcoin transactions are made.",
        "fullyImplemented": false,
        "id": 14293,
        "linearizedBaseContracts": [
          14293
        ],
        "name": "ISPVRequestManager",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "documentation": null,
            "id": 14237,
            "name": "NewProofRequest",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 14236,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14227,
                  "indexed": true,
                  "name": "_requester",
                  "nodeType": "VariableDeclaration",
                  "scope": 14237,
                  "src": "2492:26:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 14226,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2492:7:53",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14229,
                  "indexed": true,
                  "name": "_requestID",
                  "nodeType": "VariableDeclaration",
                  "scope": 14237,
                  "src": "2528:26:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14228,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2528:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14231,
                  "indexed": false,
                  "name": "_paysValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 14237,
                  "src": "2564:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 14230,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "2564:6:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14233,
                  "indexed": false,
                  "name": "_spends",
                  "nodeType": "VariableDeclaration",
                  "scope": 14237,
                  "src": "2591:13:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14232,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2591:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14235,
                  "indexed": false,
                  "name": "_pays",
                  "nodeType": "VariableDeclaration",
                  "scope": 14237,
                  "src": "2614:11:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14234,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2614:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2482:149:53"
            },
            "src": "2460:172:53"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 14241,
            "name": "RequestClosed",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 14240,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14239,
                  "indexed": true,
                  "name": "_requestID",
                  "nodeType": "VariableDeclaration",
                  "scope": 14241,
                  "src": "2658:26:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14238,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2658:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2657:28:53"
            },
            "src": "2638:48:53"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 14247,
            "name": "RequestFilled",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 14246,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14243,
                  "indexed": true,
                  "name": "_txid",
                  "nodeType": "VariableDeclaration",
                  "scope": 14247,
                  "src": "2711:21:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14242,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2711:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14245,
                  "indexed": true,
                  "name": "_requestID",
                  "nodeType": "VariableDeclaration",
                  "scope": 14247,
                  "src": "2734:26:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14244,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2734:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2710:51:53"
            },
            "src": "2691:71:53"
          },
          {
            "body": null,
            "documentation": "@notice             Subscribe to a feed of Bitcoin transactions matching a request\n @dev                The request can be a spent utxo and/or a created utxo.\n\n    ///                     The contract allows users to register a \"consumer\" contract\n                     that implements ISPVConsumer to handle Bitcoin events.\n\n    ///                     Bitcoin transactions are composed of a vector of inputs,\n                     and a vector of outputs. The `_spends` parameter allows consumers\n                     to watch a specific UTXO, and receive an event when it is spent.\n\n    ///                     The `_pays` and `_paysValue` param allow the user to watch specific\n                     Bitcoin output scripts. An output script is typically encoded\n                     as an address, but an address is not an in-protocol construction.\n                     In other words, consumers will receive an event whenever a specific\n                     address receives funds, or when a specific OP_RETURN is created.\n\n    ///                     Either `_spends` or `_pays` MUST be set. Both MAY be set.\n                     If both are set, only notifications meeting both criteria\n                     will be triggered.\n\n    /// @param  _spends     An outpoint that must be spent in acceptable transactions.\n                     The outpoint must be exactly 36 bytes, and composed of a\n                     LE txid (32 bytes), and an 4-byte LE-encoded index integer.\n                     In other words, the precise serialization format used in a\n                     serialized Bitcoin TxIn.\n\n    ///                     Note that while we might expect a `_spends` event to fire at most\n                     one time, that expectation becomes invalid in long Bitcoin reorgs\n                     if there is a double-spend or a disconfirmation followed by\n                     reconfirmation.\n\n    /// @param  _pays       An output script to watch for events. A filter with `_pays` set will\n                     validate any number of events that create new UTXOs with a specific\n                     output script.\n\n    ///                     This is useful for watching an address and responding to incoming\n                     payments.\n\n    /// @param  _paysValue  A minimum value in satoshi that must be paid to the output script.\n                     If this is set no any non-0 number, the Relay will only forward\n                     `_pays` notifications to the consumer if the value of the new UTXO is\n                     at least `_paysValue`.\n\n    /// @param  _consumer   The address of a contract that implements the `ISPVConsumer` interface.\n                     Whenever events are available, the Relay will validate inclusion\n                     and confirmation, then call the `spv` function on the consumer.\n\n    /// @param  _numConfs   The number of headers that must confirm the block\n                     containing the transaction. Used as a security parameter.\n                     More confirmations means less likely to revert due to a\n                     chain reorganization. Note that 1 confirmation is required,\n                     so the general \"6 confirmation\" rule would be expressed\n                     as `5` when calling this function\n\n    /// @param  _notBefore  An Ethereum timestamp before which proofs will not be accepted.\n                     Used to control app flow for specific users.\n\n    /// @return             A unique request ID.",
            "id": 14264,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "request",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14260,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14249,
                  "name": "_spends",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6608:22:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14248,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "6608:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14251,
                  "name": "_pays",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6640:20:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14250,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "6640:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14253,
                  "name": "_paysValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6670:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 14252,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "6670:6:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14255,
                  "name": "_consumer",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6697:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 14254,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6697:7:53",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14257,
                  "name": "_numConfs",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6724:15:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 14256,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6724:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14259,
                  "name": "_notBefore",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6749:18:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14258,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6749:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6598:175:53"
            },
            "returnParameters": {
              "id": 14263,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14262,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14264,
                  "src": "6792:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14261,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6792:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6791:9:53"
            },
            "scope": 14293,
            "src": "6582:219:53",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice                 Cancel an active bitcoin event request.\n @dev                    Prevents the relay from forwarding tx information\n @param  _requestID      The ID of the request to be cancelled\n @return                 True if succesful, error otherwise",
            "id": 14271,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "cancelRequest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14267,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14266,
                  "name": "_requestID",
                  "nodeType": "VariableDeclaration",
                  "scope": 14271,
                  "src": "7121:18:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14265,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7121:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7120:20:53"
            },
            "returnParameters": {
              "id": 14270,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14269,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14271,
                  "src": "7159:4:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14268,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "7159:4:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7158:6:53"
            },
            "scope": 14293,
            "src": "7098:67:53",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice             Retrieve info about a request\n @dev                Requests ids are numerical\n @param  _requestID  The numerical ID of the request\n @return             A tuple representation of the request struct.\n                     To save space`spends` and `pays` are stored as keccak256\n                     hashes of the original information. The `state` is\n                     `0` for \"does not exist\", `1` for \"active\" and `2` for\n                     \"cancelled.\"",
            "id": 14292,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRequest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14274,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14273,
                  "name": "_requestID",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7735:18:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14272,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7735:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7725:34:53"
            },
            "returnParameters": {
              "id": 14291,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14276,
                  "name": "spends",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7792:14:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14275,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "7792:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14278,
                  "name": "pays",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7816:12:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14277,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "7816:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14280,
                  "name": "paysValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7838:16:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 14279,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "7838:6:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14282,
                  "name": "state",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7864:11:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 14281,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "7864:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14284,
                  "name": "consumer",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7885:16:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 14283,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7885:7:53",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14286,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7911:13:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 14285,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7911:7:53",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14288,
                  "name": "numConfs",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7934:14:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 14287,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "7934:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14290,
                  "name": "notBefore",
                  "nodeType": "VariableDeclaration",
                  "scope": 14292,
                  "src": "7958:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14289,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7958:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7782:199:53"
            },
            "scope": 14293,
            "src": "7706:276:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 14394,
        "src": "2425:5559:53"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": null,
        "fullyImplemented": false,
        "id": 14393,
        "linearizedBaseContracts": [
          14393
        ],
        "name": "IRelay",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "documentation": null,
            "id": 14299,
            "name": "Extension",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 14298,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14295,
                  "indexed": true,
                  "name": "_first",
                  "nodeType": "VariableDeclaration",
                  "scope": 14299,
                  "src": "8027:22:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14294,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8027:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14297,
                  "indexed": true,
                  "name": "_last",
                  "nodeType": "VariableDeclaration",
                  "scope": 14299,
                  "src": "8051:21:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14296,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8051:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8026:47:53"
            },
            "src": "8011:63:53"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 14307,
            "name": "NewTip",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 14306,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14301,
                  "indexed": true,
                  "name": "_from",
                  "nodeType": "VariableDeclaration",
                  "scope": 14307,
                  "src": "8092:21:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14300,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8092:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14303,
                  "indexed": true,
                  "name": "_to",
                  "nodeType": "VariableDeclaration",
                  "scope": 14307,
                  "src": "8115:19:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14302,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8115:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14305,
                  "indexed": true,
                  "name": "_gcd",
                  "nodeType": "VariableDeclaration",
                  "scope": 14307,
                  "src": "8136:20:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14304,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8136:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8091:66:53"
            },
            "src": "8079:79:53"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14312,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getCurrentEpochDifficulty",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14308,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8198:2:53"
            },
            "returnParameters": {
              "id": 14311,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14310,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14312,
                  "src": "8224:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14309,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8224:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8223:9:53"
            },
            "scope": 14393,
            "src": "8164:69:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14317,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getPrevEpochDifficulty",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14313,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8269:2:53"
            },
            "returnParameters": {
              "id": 14316,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14315,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14317,
                  "src": "8295:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14314,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8295:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8294:9:53"
            },
            "scope": 14393,
            "src": "8238:66:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14322,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRelayGenesis",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14318,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8333:2:53"
            },
            "returnParameters": {
              "id": 14321,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14320,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14322,
                  "src": "8359:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14319,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8359:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8358:9:53"
            },
            "scope": 14393,
            "src": "8309:59:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14327,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getBestKnownDigest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14323,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8400:2:53"
            },
            "returnParameters": {
              "id": 14326,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14325,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14327,
                  "src": "8426:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14324,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8426:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8425:9:53"
            },
            "scope": 14393,
            "src": "8373:62:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14332,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getLastReorgCommonAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14328,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8475:2:53"
            },
            "returnParameters": {
              "id": 14331,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14330,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14332,
                  "src": "8501:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14329,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8501:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8500:9:53"
            },
            "scope": 14393,
            "src": "8440:70:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14339,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "findHeight",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14335,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14334,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 14339,
                  "src": "8536:15:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14333,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8536:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8535:17:53"
            },
            "returnParameters": {
              "id": 14338,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14337,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14339,
                  "src": "8576:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14336,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8576:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8575:9:53"
            },
            "scope": 14393,
            "src": "8516:69:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14348,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "findAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14344,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14341,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 14348,
                  "src": "8613:15:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14340,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8613:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14343,
                  "name": "_offset",
                  "nodeType": "VariableDeclaration",
                  "scope": 14348,
                  "src": "8630:15:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14342,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8630:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8612:34:53"
            },
            "returnParameters": {
              "id": 14347,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14346,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14348,
                  "src": "8670:7:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14345,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8670:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8669:9:53"
            },
            "scope": 14393,
            "src": "8591:88:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14359,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "isAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14355,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14350,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 14359,
                  "src": "8705:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14349,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8705:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14352,
                  "name": "_descendant",
                  "nodeType": "VariableDeclaration",
                  "scope": 14359,
                  "src": "8724:19:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14351,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8724:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14354,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 14359,
                  "src": "8745:14:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14353,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8745:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8704:56:53"
            },
            "returnParameters": {
              "id": 14358,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14357,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14359,
                  "src": "8784:4:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14356,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "8784:4:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8783:6:53"
            },
            "scope": 14393,
            "src": "8685:105:53",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14368,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "addHeaders",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14364,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14361,
                  "name": "_anchor",
                  "nodeType": "VariableDeclaration",
                  "scope": 14368,
                  "src": "8816:22:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14360,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8816:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14363,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 14368,
                  "src": "8840:23:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14362,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8840:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8815:49:53"
            },
            "returnParameters": {
              "id": 14367,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14366,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14368,
                  "src": "8883:4:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14365,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "8883:4:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8882:6:53"
            },
            "scope": 14393,
            "src": "8796:93:53",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14379,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "addHeadersWithRetarget",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14375,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14370,
                  "name": "_oldPeriodStartHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 14379,
                  "src": "8936:36:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14369,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8936:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14372,
                  "name": "_oldPeriodEndHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 14379,
                  "src": "8982:34:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14371,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8982:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14374,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 14379,
                  "src": "9026:23:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14373,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "9026:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8926:129:53"
            },
            "returnParameters": {
              "id": 14378,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14377,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14379,
                  "src": "9074:4:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14376,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "9074:4:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9073:6:53"
            },
            "scope": 14393,
            "src": "8895:185:53",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 14392,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "markNewHeaviest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 14388,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14381,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 14392,
                  "src": "9120:17:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 14380,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "9120:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14383,
                  "name": "_currentBest",
                  "nodeType": "VariableDeclaration",
                  "scope": 14392,
                  "src": "9147:27:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14382,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "9147:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14385,
                  "name": "_newBest",
                  "nodeType": "VariableDeclaration",
                  "scope": 14392,
                  "src": "9184:23:53",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 14384,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "9184:5:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 14387,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 14392,
                  "src": "9217:14:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 14386,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9217:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9110:127:53"
            },
            "returnParameters": {
              "id": 14391,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 14390,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 14392,
                  "src": "9256:4:53",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 14389,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "9256:4:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9255:6:53"
            },
            "scope": 14393,
            "src": "9086:176:53",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 14394,
        "src": "7988:1276:53"
      }
    ],
    "src": "0:9265:53"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "@summa-tx/relay-sol/contracts/Interfaces.sol",
      "exportedSymbols": {
        "IRelay": [
          14393
        ],
        "ISPVConsumer": [
          14225
        ],
        "ISPVRequestManager": [
          14293
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.5",
            ".10"
          ]
        },
        "id": 14209,
        "name": "PragmaDirective",
        "src": "0:24:53"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "interface",
          "documentation": "@title      ISPVConsumer\n @author     Summa (https://summa.one)\n @notice     This interface consumes validated transaction information.\n             It is the primary way that user contracts accept\n @dev        Implement this interface to process transactions provided by\n             the Relay system.",
          "fullyImplemented": false,
          "linearizedBaseContracts": [
            14225
          ],
          "name": "ISPVConsumer",
          "scope": 14394
        },
        "children": [
          {
            "attributes": {
              "body": null,
              "documentation": "@notice     A consumer for Bitcoin transaction information.\n @dev        Users must implement this function. It handles Bitcoin\n             events that have been validated by the Relay contract.\n             It is VERY IMPORTANT that this function validates the\n             msg.sender. The callee must check the origin of the data\n             or risk accepting spurious information.\n @param _txid        The LE(!) txid of the bitcoin transaction that\n                     triggered the notification.\n @param _vin         The length-prefixed input vector of the bitcoin tx\n                     that triggered the notification.\n @param _vout        The length-prefixed output vector of the bitcoin tx\n                     that triggered the notification.\n @param _requestID   The ID of the event request that this notification\n                     satisfies. The ID is returned by\n                     OnDemandSPV.request and should be locally stored by\n                     any contract that makes more than one request.\n @param _inputIndex  The index of the input in the _vin that triggered\n                     the notification.\n @param _outputIndex The index of the output in the _vout that triggered\n                     the notification. Useful for subscribing to transactions\n                     that spend the newly-created UTXO.",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "spv",
              "scope": 14225,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_txid",
                      "scope": 14224,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14210,
                        "name": "ElementaryTypeName",
                        "src": "1887:7:53"
                      }
                    ],
                    "id": 14211,
                    "name": "VariableDeclaration",
                    "src": "1887:13:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_vin",
                      "scope": 14224,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14212,
                        "name": "ElementaryTypeName",
                        "src": "1910:5:53"
                      }
                    ],
                    "id": 14213,
                    "name": "VariableDeclaration",
                    "src": "1910:19:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_vout",
                      "scope": 14224,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14214,
                        "name": "ElementaryTypeName",
                        "src": "1939:5:53"
                      }
                    ],
                    "id": 14215,
                    "name": "VariableDeclaration",
                    "src": "1939:20:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_requestID",
                      "scope": 14224,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14216,
                        "name": "ElementaryTypeName",
                        "src": "1969:7:53"
                      }
                    ],
                    "id": 14217,
                    "name": "VariableDeclaration",
                    "src": "1969:18:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_inputIndex",
                      "scope": 14224,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 14218,
                        "name": "ElementaryTypeName",
                        "src": "1997:5:53"
                      }
                    ],
                    "id": 14219,
                    "name": "VariableDeclaration",
                    "src": "1997:17:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_outputIndex",
                      "scope": 14224,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 14220,
                        "name": "ElementaryTypeName",
                        "src": "2024:5:53"
                      }
                    ],
                    "id": 14221,
                    "name": "VariableDeclaration",
                    "src": "2024:18:53"
                  }
                ],
                "id": 14222,
                "name": "ParameterList",
                "src": "1877:166:53"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 14223,
                "name": "ParameterList",
                "src": "2052:0:53"
              }
            ],
            "id": 14224,
            "name": "FunctionDefinition",
            "src": "1865:188:53"
          }
        ],
        "id": 14225,
        "name": "ContractDefinition",
        "src": "348:1707:53"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "interface",
          "documentation": "@title      ISPVRequestManager\n @author     Summa (https://summa.one)\n @notice     The interface for using the OnDemandSPV system. This interface\n             allows you to subscribe to Bitcoin events.\n @dev        Manage subscriptions to Bitcoin events. Register callbacks to\n             be called whenever specific Bitcoin transactions are made.",
          "fullyImplemented": false,
          "linearizedBaseContracts": [
            14293
          ],
          "name": "ISPVRequestManager",
          "scope": 14394
        },
        "children": [
          {
            "attributes": {
              "anonymous": false,
              "documentation": null,
              "name": "NewProofRequest"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_requester",
                      "scope": 14237,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 14226,
                        "name": "ElementaryTypeName",
                        "src": "2492:7:53"
                      }
                    ],
                    "id": 14227,
                    "name": "VariableDeclaration",
                    "src": "2492:26:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_requestID",
                      "scope": 14237,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14228,
                        "name": "ElementaryTypeName",
                        "src": "2528:7:53"
                      }
                    ],
                    "id": 14229,
                    "name": "VariableDeclaration",
                    "src": "2528:26:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "name": "_paysValue",
                      "scope": 14237,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint64",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint64",
                          "type": "uint64"
                        },
                        "id": 14230,
                        "name": "ElementaryTypeName",
                        "src": "2564:6:53"
                      }
                    ],
                    "id": 14231,
                    "name": "VariableDeclaration",
                    "src": "2564:17:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "name": "_spends",
                      "scope": 14237,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14232,
                        "name": "ElementaryTypeName",
                        "src": "2591:5:53"
                      }
                    ],
                    "id": 14233,
                    "name": "VariableDeclaration",
                    "src": "2591:13:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "name": "_pays",
                      "scope": 14237,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14234,
                        "name": "ElementaryTypeName",
                        "src": "2614:5:53"
                      }
                    ],
                    "id": 14235,
                    "name": "VariableDeclaration",
                    "src": "2614:11:53"
                  }
                ],
                "id": 14236,
                "name": "ParameterList",
                "src": "2482:149:53"
              }
            ],
            "id": 14237,
            "name": "EventDefinition",
            "src": "2460:172:53"
          },
          {
            "attributes": {
              "anonymous": false,
              "documentation": null,
              "name": "RequestClosed"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_requestID",
                      "scope": 14241,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14238,
                        "name": "ElementaryTypeName",
                        "src": "2658:7:53"
                      }
                    ],
                    "id": 14239,
                    "name": "VariableDeclaration",
                    "src": "2658:26:53"
                  }
                ],
                "id": 14240,
                "name": "ParameterList",
                "src": "2657:28:53"
              }
            ],
            "id": 14241,
            "name": "EventDefinition",
            "src": "2638:48:53"
          },
          {
            "attributes": {
              "anonymous": false,
              "documentation": null,
              "name": "RequestFilled"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_txid",
                      "scope": 14247,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14242,
                        "name": "ElementaryTypeName",
                        "src": "2711:7:53"
                      }
                    ],
                    "id": 14243,
                    "name": "VariableDeclaration",
                    "src": "2711:21:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_requestID",
                      "scope": 14247,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14244,
                        "name": "ElementaryTypeName",
                        "src": "2734:7:53"
                      }
                    ],
                    "id": 14245,
                    "name": "VariableDeclaration",
                    "src": "2734:26:53"
                  }
                ],
                "id": 14246,
                "name": "ParameterList",
                "src": "2710:51:53"
              }
            ],
            "id": 14247,
            "name": "EventDefinition",
            "src": "2691:71:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": "@notice             Subscribe to a feed of Bitcoin transactions matching a request\n @dev                The request can be a spent utxo and/or a created utxo.\n\n    ///                     The contract allows users to register a \"consumer\" contract\n                     that implements ISPVConsumer to handle Bitcoin events.\n\n    ///                     Bitcoin transactions are composed of a vector of inputs,\n                     and a vector of outputs. The `_spends` parameter allows consumers\n                     to watch a specific UTXO, and receive an event when it is spent.\n\n    ///                     The `_pays` and `_paysValue` param allow the user to watch specific\n                     Bitcoin output scripts. An output script is typically encoded\n                     as an address, but an address is not an in-protocol construction.\n                     In other words, consumers will receive an event whenever a specific\n                     address receives funds, or when a specific OP_RETURN is created.\n\n    ///                     Either `_spends` or `_pays` MUST be set. Both MAY be set.\n                     If both are set, only notifications meeting both criteria\n                     will be triggered.\n\n    /// @param  _spends     An outpoint that must be spent in acceptable transactions.\n                     The outpoint must be exactly 36 bytes, and composed of a\n                     LE txid (32 bytes), and an 4-byte LE-encoded index integer.\n                     In other words, the precise serialization format used in a\n                     serialized Bitcoin TxIn.\n\n    ///                     Note that while we might expect a `_spends` event to fire at most\n                     one time, that expectation becomes invalid in long Bitcoin reorgs\n                     if there is a double-spend or a disconfirmation followed by\n                     reconfirmation.\n\n    /// @param  _pays       An output script to watch for events. A filter with `_pays` set will\n                     validate any number of events that create new UTXOs with a specific\n                     output script.\n\n    ///                     This is useful for watching an address and responding to incoming\n                     payments.\n\n    /// @param  _paysValue  A minimum value in satoshi that must be paid to the output script.\n                     If this is set no any non-0 number, the Relay will only forward\n                     `_pays` notifications to the consumer if the value of the new UTXO is\n                     at least `_paysValue`.\n\n    /// @param  _consumer   The address of a contract that implements the `ISPVConsumer` interface.\n                     Whenever events are available, the Relay will validate inclusion\n                     and confirmation, then call the `spv` function on the consumer.\n\n    /// @param  _numConfs   The number of headers that must confirm the block\n                     containing the transaction. Used as a security parameter.\n                     More confirmations means less likely to revert due to a\n                     chain reorganization. Note that 1 confirmation is required,\n                     so the general \"6 confirmation\" rule would be expressed\n                     as `5` when calling this function\n\n    /// @param  _notBefore  An Ethereum timestamp before which proofs will not be accepted.\n                     Used to control app flow for specific users.\n\n    /// @return             A unique request ID.",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "request",
              "scope": 14293,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_spends",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14248,
                        "name": "ElementaryTypeName",
                        "src": "6608:5:53"
                      }
                    ],
                    "id": 14249,
                    "name": "VariableDeclaration",
                    "src": "6608:22:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_pays",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14250,
                        "name": "ElementaryTypeName",
                        "src": "6640:5:53"
                      }
                    ],
                    "id": 14251,
                    "name": "VariableDeclaration",
                    "src": "6640:20:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_paysValue",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint64",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint64",
                          "type": "uint64"
                        },
                        "id": 14252,
                        "name": "ElementaryTypeName",
                        "src": "6670:6:53"
                      }
                    ],
                    "id": 14253,
                    "name": "VariableDeclaration",
                    "src": "6670:17:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_consumer",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 14254,
                        "name": "ElementaryTypeName",
                        "src": "6697:7:53"
                      }
                    ],
                    "id": 14255,
                    "name": "VariableDeclaration",
                    "src": "6697:17:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_numConfs",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 14256,
                        "name": "ElementaryTypeName",
                        "src": "6724:5:53"
                      }
                    ],
                    "id": 14257,
                    "name": "VariableDeclaration",
                    "src": "6724:15:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_notBefore",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14258,
                        "name": "ElementaryTypeName",
                        "src": "6749:7:53"
                      }
                    ],
                    "id": 14259,
                    "name": "VariableDeclaration",
                    "src": "6749:18:53"
                  }
                ],
                "id": 14260,
                "name": "ParameterList",
                "src": "6598:175:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14264,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14261,
                        "name": "ElementaryTypeName",
                        "src": "6792:7:53"
                      }
                    ],
                    "id": 14262,
                    "name": "VariableDeclaration",
                    "src": "6792:7:53"
                  }
                ],
                "id": 14263,
                "name": "ParameterList",
                "src": "6791:9:53"
              }
            ],
            "id": 14264,
            "name": "FunctionDefinition",
            "src": "6582:219:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": "@notice                 Cancel an active bitcoin event request.\n @dev                    Prevents the relay from forwarding tx information\n @param  _requestID      The ID of the request to be cancelled\n @return                 True if succesful, error otherwise",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "cancelRequest",
              "scope": 14293,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_requestID",
                      "scope": 14271,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14265,
                        "name": "ElementaryTypeName",
                        "src": "7121:7:53"
                      }
                    ],
                    "id": 14266,
                    "name": "VariableDeclaration",
                    "src": "7121:18:53"
                  }
                ],
                "id": 14267,
                "name": "ParameterList",
                "src": "7120:20:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14271,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14268,
                        "name": "ElementaryTypeName",
                        "src": "7159:4:53"
                      }
                    ],
                    "id": 14269,
                    "name": "VariableDeclaration",
                    "src": "7159:4:53"
                  }
                ],
                "id": 14270,
                "name": "ParameterList",
                "src": "7158:6:53"
              }
            ],
            "id": 14271,
            "name": "FunctionDefinition",
            "src": "7098:67:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": "@notice             Retrieve info about a request\n @dev                Requests ids are numerical\n @param  _requestID  The numerical ID of the request\n @return             A tuple representation of the request struct.\n                     To save space`spends` and `pays` are stored as keccak256\n                     hashes of the original information. The `state` is\n                     `0` for \"does not exist\", `1` for \"active\" and `2` for\n                     \"cancelled.\"",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getRequest",
              "scope": 14293,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_requestID",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14272,
                        "name": "ElementaryTypeName",
                        "src": "7735:7:53"
                      }
                    ],
                    "id": 14273,
                    "name": "VariableDeclaration",
                    "src": "7735:18:53"
                  }
                ],
                "id": 14274,
                "name": "ParameterList",
                "src": "7725:34:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "spends",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14275,
                        "name": "ElementaryTypeName",
                        "src": "7792:7:53"
                      }
                    ],
                    "id": 14276,
                    "name": "VariableDeclaration",
                    "src": "7792:14:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "pays",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14277,
                        "name": "ElementaryTypeName",
                        "src": "7816:7:53"
                      }
                    ],
                    "id": 14278,
                    "name": "VariableDeclaration",
                    "src": "7816:12:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "paysValue",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint64",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint64",
                          "type": "uint64"
                        },
                        "id": 14279,
                        "name": "ElementaryTypeName",
                        "src": "7838:6:53"
                      }
                    ],
                    "id": 14280,
                    "name": "VariableDeclaration",
                    "src": "7838:16:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "state",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 14281,
                        "name": "ElementaryTypeName",
                        "src": "7864:5:53"
                      }
                    ],
                    "id": 14282,
                    "name": "VariableDeclaration",
                    "src": "7864:11:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "consumer",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 14283,
                        "name": "ElementaryTypeName",
                        "src": "7885:7:53"
                      }
                    ],
                    "id": 14284,
                    "name": "VariableDeclaration",
                    "src": "7885:16:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "owner",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 14285,
                        "name": "ElementaryTypeName",
                        "src": "7911:7:53"
                      }
                    ],
                    "id": 14286,
                    "name": "VariableDeclaration",
                    "src": "7911:13:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "numConfs",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 14287,
                        "name": "ElementaryTypeName",
                        "src": "7934:5:53"
                      }
                    ],
                    "id": 14288,
                    "name": "VariableDeclaration",
                    "src": "7934:14:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "notBefore",
                      "scope": 14292,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14289,
                        "name": "ElementaryTypeName",
                        "src": "7958:7:53"
                      }
                    ],
                    "id": 14290,
                    "name": "VariableDeclaration",
                    "src": "7958:17:53"
                  }
                ],
                "id": 14291,
                "name": "ParameterList",
                "src": "7782:199:53"
              }
            ],
            "id": 14292,
            "name": "FunctionDefinition",
            "src": "7706:276:53"
          }
        ],
        "id": 14293,
        "name": "ContractDefinition",
        "src": "2425:5559:53"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "interface",
          "documentation": null,
          "fullyImplemented": false,
          "linearizedBaseContracts": [
            14393
          ],
          "name": "IRelay",
          "scope": 14394
        },
        "children": [
          {
            "attributes": {
              "anonymous": false,
              "documentation": null,
              "name": "Extension"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_first",
                      "scope": 14299,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14294,
                        "name": "ElementaryTypeName",
                        "src": "8027:7:53"
                      }
                    ],
                    "id": 14295,
                    "name": "VariableDeclaration",
                    "src": "8027:22:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_last",
                      "scope": 14299,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14296,
                        "name": "ElementaryTypeName",
                        "src": "8051:7:53"
                      }
                    ],
                    "id": 14297,
                    "name": "VariableDeclaration",
                    "src": "8051:21:53"
                  }
                ],
                "id": 14298,
                "name": "ParameterList",
                "src": "8026:47:53"
              }
            ],
            "id": 14299,
            "name": "EventDefinition",
            "src": "8011:63:53"
          },
          {
            "attributes": {
              "anonymous": false,
              "documentation": null,
              "name": "NewTip"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_from",
                      "scope": 14307,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14300,
                        "name": "ElementaryTypeName",
                        "src": "8092:7:53"
                      }
                    ],
                    "id": 14301,
                    "name": "VariableDeclaration",
                    "src": "8092:21:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_to",
                      "scope": 14307,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14302,
                        "name": "ElementaryTypeName",
                        "src": "8115:7:53"
                      }
                    ],
                    "id": 14303,
                    "name": "VariableDeclaration",
                    "src": "8115:19:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": true,
                      "name": "_gcd",
                      "scope": 14307,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14304,
                        "name": "ElementaryTypeName",
                        "src": "8136:7:53"
                      }
                    ],
                    "id": 14305,
                    "name": "VariableDeclaration",
                    "src": "8136:20:53"
                  }
                ],
                "id": 14306,
                "name": "ParameterList",
                "src": "8091:66:53"
              }
            ],
            "id": 14307,
            "name": "EventDefinition",
            "src": "8079:79:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getCurrentEpochDifficulty",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 14308,
                "name": "ParameterList",
                "src": "8198:2:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14312,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14309,
                        "name": "ElementaryTypeName",
                        "src": "8224:7:53"
                      }
                    ],
                    "id": 14310,
                    "name": "VariableDeclaration",
                    "src": "8224:7:53"
                  }
                ],
                "id": 14311,
                "name": "ParameterList",
                "src": "8223:9:53"
              }
            ],
            "id": 14312,
            "name": "FunctionDefinition",
            "src": "8164:69:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getPrevEpochDifficulty",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 14313,
                "name": "ParameterList",
                "src": "8269:2:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14317,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14314,
                        "name": "ElementaryTypeName",
                        "src": "8295:7:53"
                      }
                    ],
                    "id": 14315,
                    "name": "VariableDeclaration",
                    "src": "8295:7:53"
                  }
                ],
                "id": 14316,
                "name": "ParameterList",
                "src": "8294:9:53"
              }
            ],
            "id": 14317,
            "name": "FunctionDefinition",
            "src": "8238:66:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getRelayGenesis",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 14318,
                "name": "ParameterList",
                "src": "8333:2:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14322,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14319,
                        "name": "ElementaryTypeName",
                        "src": "8359:7:53"
                      }
                    ],
                    "id": 14320,
                    "name": "VariableDeclaration",
                    "src": "8359:7:53"
                  }
                ],
                "id": 14321,
                "name": "ParameterList",
                "src": "8358:9:53"
              }
            ],
            "id": 14322,
            "name": "FunctionDefinition",
            "src": "8309:59:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getBestKnownDigest",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 14323,
                "name": "ParameterList",
                "src": "8400:2:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14327,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14324,
                        "name": "ElementaryTypeName",
                        "src": "8426:7:53"
                      }
                    ],
                    "id": 14325,
                    "name": "VariableDeclaration",
                    "src": "8426:7:53"
                  }
                ],
                "id": 14326,
                "name": "ParameterList",
                "src": "8425:9:53"
              }
            ],
            "id": 14327,
            "name": "FunctionDefinition",
            "src": "8373:62:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getLastReorgCommonAncestor",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 14328,
                "name": "ParameterList",
                "src": "8475:2:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14332,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14329,
                        "name": "ElementaryTypeName",
                        "src": "8501:7:53"
                      }
                    ],
                    "id": 14330,
                    "name": "VariableDeclaration",
                    "src": "8501:7:53"
                  }
                ],
                "id": 14331,
                "name": "ParameterList",
                "src": "8500:9:53"
              }
            ],
            "id": 14332,
            "name": "FunctionDefinition",
            "src": "8440:70:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "findHeight",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 14339,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14333,
                        "name": "ElementaryTypeName",
                        "src": "8536:7:53"
                      }
                    ],
                    "id": 14334,
                    "name": "VariableDeclaration",
                    "src": "8536:15:53"
                  }
                ],
                "id": 14335,
                "name": "ParameterList",
                "src": "8535:17:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14339,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14336,
                        "name": "ElementaryTypeName",
                        "src": "8576:7:53"
                      }
                    ],
                    "id": 14337,
                    "name": "VariableDeclaration",
                    "src": "8576:7:53"
                  }
                ],
                "id": 14338,
                "name": "ParameterList",
                "src": "8575:9:53"
              }
            ],
            "id": 14339,
            "name": "FunctionDefinition",
            "src": "8516:69:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "findAncestor",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 14348,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14340,
                        "name": "ElementaryTypeName",
                        "src": "8613:7:53"
                      }
                    ],
                    "id": 14341,
                    "name": "VariableDeclaration",
                    "src": "8613:15:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_offset",
                      "scope": 14348,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14342,
                        "name": "ElementaryTypeName",
                        "src": "8630:7:53"
                      }
                    ],
                    "id": 14343,
                    "name": "VariableDeclaration",
                    "src": "8630:15:53"
                  }
                ],
                "id": 14344,
                "name": "ParameterList",
                "src": "8612:34:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14348,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14345,
                        "name": "ElementaryTypeName",
                        "src": "8670:7:53"
                      }
                    ],
                    "id": 14346,
                    "name": "VariableDeclaration",
                    "src": "8670:7:53"
                  }
                ],
                "id": 14347,
                "name": "ParameterList",
                "src": "8669:9:53"
              }
            ],
            "id": 14348,
            "name": "FunctionDefinition",
            "src": "8591:88:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "isAncestor",
              "scope": 14393,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 14359,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14349,
                        "name": "ElementaryTypeName",
                        "src": "8705:7:53"
                      }
                    ],
                    "id": 14350,
                    "name": "VariableDeclaration",
                    "src": "8705:17:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_descendant",
                      "scope": 14359,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14351,
                        "name": "ElementaryTypeName",
                        "src": "8724:7:53"
                      }
                    ],
                    "id": 14352,
                    "name": "VariableDeclaration",
                    "src": "8724:19:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 14359,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14353,
                        "name": "ElementaryTypeName",
                        "src": "8745:7:53"
                      }
                    ],
                    "id": 14354,
                    "name": "VariableDeclaration",
                    "src": "8745:14:53"
                  }
                ],
                "id": 14355,
                "name": "ParameterList",
                "src": "8704:56:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14359,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14356,
                        "name": "ElementaryTypeName",
                        "src": "8784:4:53"
                      }
                    ],
                    "id": 14357,
                    "name": "VariableDeclaration",
                    "src": "8784:4:53"
                  }
                ],
                "id": 14358,
                "name": "ParameterList",
                "src": "8783:6:53"
              }
            ],
            "id": 14359,
            "name": "FunctionDefinition",
            "src": "8685:105:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "addHeaders",
              "scope": 14393,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_anchor",
                      "scope": 14368,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14360,
                        "name": "ElementaryTypeName",
                        "src": "8816:5:53"
                      }
                    ],
                    "id": 14361,
                    "name": "VariableDeclaration",
                    "src": "8816:22:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 14368,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14362,
                        "name": "ElementaryTypeName",
                        "src": "8840:5:53"
                      }
                    ],
                    "id": 14363,
                    "name": "VariableDeclaration",
                    "src": "8840:23:53"
                  }
                ],
                "id": 14364,
                "name": "ParameterList",
                "src": "8815:49:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14368,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14365,
                        "name": "ElementaryTypeName",
                        "src": "8883:4:53"
                      }
                    ],
                    "id": 14366,
                    "name": "VariableDeclaration",
                    "src": "8883:4:53"
                  }
                ],
                "id": 14367,
                "name": "ParameterList",
                "src": "8882:6:53"
              }
            ],
            "id": 14368,
            "name": "FunctionDefinition",
            "src": "8796:93:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "addHeadersWithRetarget",
              "scope": 14393,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_oldPeriodStartHeader",
                      "scope": 14379,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14369,
                        "name": "ElementaryTypeName",
                        "src": "8936:5:53"
                      }
                    ],
                    "id": 14370,
                    "name": "VariableDeclaration",
                    "src": "8936:36:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_oldPeriodEndHeader",
                      "scope": 14379,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14371,
                        "name": "ElementaryTypeName",
                        "src": "8982:5:53"
                      }
                    ],
                    "id": 14372,
                    "name": "VariableDeclaration",
                    "src": "8982:34:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 14379,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14373,
                        "name": "ElementaryTypeName",
                        "src": "9026:5:53"
                      }
                    ],
                    "id": 14374,
                    "name": "VariableDeclaration",
                    "src": "9026:23:53"
                  }
                ],
                "id": 14375,
                "name": "ParameterList",
                "src": "8926:129:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14379,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14376,
                        "name": "ElementaryTypeName",
                        "src": "9074:4:53"
                      }
                    ],
                    "id": 14377,
                    "name": "VariableDeclaration",
                    "src": "9074:4:53"
                  }
                ],
                "id": 14378,
                "name": "ParameterList",
                "src": "9073:6:53"
              }
            ],
            "id": 14379,
            "name": "FunctionDefinition",
            "src": "8895:185:53"
          },
          {
            "attributes": {
              "body": null,
              "documentation": null,
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "markNewHeaviest",
              "scope": 14393,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 14392,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 14380,
                        "name": "ElementaryTypeName",
                        "src": "9120:7:53"
                      }
                    ],
                    "id": 14381,
                    "name": "VariableDeclaration",
                    "src": "9120:17:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_currentBest",
                      "scope": 14392,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14382,
                        "name": "ElementaryTypeName",
                        "src": "9147:5:53"
                      }
                    ],
                    "id": 14383,
                    "name": "VariableDeclaration",
                    "src": "9147:27:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_newBest",
                      "scope": 14392,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 14384,
                        "name": "ElementaryTypeName",
                        "src": "9184:5:53"
                      }
                    ],
                    "id": 14385,
                    "name": "VariableDeclaration",
                    "src": "9184:23:53"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 14392,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 14386,
                        "name": "ElementaryTypeName",
                        "src": "9217:7:53"
                      }
                    ],
                    "id": 14387,
                    "name": "VariableDeclaration",
                    "src": "9217:14:53"
                  }
                ],
                "id": 14388,
                "name": "ParameterList",
                "src": "9110:127:53"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 14392,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 14389,
                        "name": "ElementaryTypeName",
                        "src": "9256:4:53"
                      }
                    ],
                    "id": 14390,
                    "name": "VariableDeclaration",
                    "src": "9256:4:53"
                  }
                ],
                "id": 14391,
                "name": "ParameterList",
                "src": "9255:6:53"
              }
            ],
            "id": 14392,
            "name": "FunctionDefinition",
            "src": "9086:176:53"
          }
        ],
        "id": 14393,
        "name": "ContractDefinition",
        "src": "7988:1276:53"
      }
    ],
    "id": 14394,
    "name": "SourceUnit",
    "src": "0:9265:53"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.17+commit.d19bba13.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.4",
  "updatedAt": "2021-11-23T11:52:09.424Z",
  "devdoc": {
    "author": "Summa (https://summa.one)",
    "details": "Manage subscriptions to Bitcoin events. Register callbacks to             be called whenever specific Bitcoin transactions are made.",
    "methods": {
      "cancelRequest(uint256)": {
        "details": "Prevents the relay from forwarding tx information",
        "params": {
          "_requestID": "The ID of the request to be cancelled"
        },
        "return": "True if succesful, error otherwise"
      },
      "getRequest(uint256)": {
        "details": "Requests ids are numerical",
        "params": {
          "_requestID": "The numerical ID of the request"
        },
        "return": "A tuple representation of the request struct.                     To save space`spends` and `pays` are stored as keccak256                     hashes of the original information. The `state` is                     `0` for \"does not exist\", `1` for \"active\" and `2` for                     \"cancelled.\""
      },
      "request(bytes,bytes,uint64,address,uint8,uint256)": {
        "details": "The request can be a spent utxo and/or a created utxo.     ///                     The contract allows users to register a \"consumer\" contract                     that implements ISPVConsumer to handle Bitcoin events.     ///                     Bitcoin transactions are composed of a vector of inputs,                     and a vector of outputs. The `_spends` parameter allows consumers                     to watch a specific UTXO, and receive an event when it is spent.     ///                     The `_pays` and `_paysValue` param allow the user to watch specific                     Bitcoin output scripts. An output script is typically encoded                     as an address, but an address is not an in-protocol construction.                     In other words, consumers will receive an event whenever a specific                     address receives funds, or when a specific OP_RETURN is created.     ///                     Either `_spends` or `_pays` MUST be set. Both MAY be set.                     If both are set, only notifications meeting both criteria                     will be triggered. ",
        "params": {
          "_consumer": "The address of a contract that implements the `ISPVConsumer` interface.                     Whenever events are available, the Relay will validate inclusion                     and confirmation, then call the `spv` function on the consumer. ",
          "_notBefore": "An Ethereum timestamp before which proofs will not be accepted.                     Used to control app flow for specific users. ",
          "_numConfs": "The number of headers that must confirm the block                     containing the transaction. Used as a security parameter.                     More confirmations means less likely to revert due to a                     chain reorganization. Note that 1 confirmation is required,                     so the general \"6 confirmation\" rule would be expressed                     as `5` when calling this function ",
          "_pays": "An output script to watch for events. A filter with `_pays` set will                     validate any number of events that create new UTXOs with a specific                     output script.     ///                     This is useful for watching an address and responding to incoming                     payments. ",
          "_paysValue": "A minimum value in satoshi that must be paid to the output script.                     If this is set no any non-0 number, the Relay will only forward                     `_pays` notifications to the consumer if the value of the new UTXO is                     at least `_paysValue`. ",
          "_spends": "An outpoint that must be spent in acceptable transactions.                     The outpoint must be exactly 36 bytes, and composed of a                     LE txid (32 bytes), and an 4-byte LE-encoded index integer.                     In other words, the precise serialization format used in a                     serialized Bitcoin TxIn.     ///                     Note that while we might expect a `_spends` event to fire at most                     one time, that expectation becomes invalid in long Bitcoin reorgs                     if there is a double-spend or a disconfirmation followed by                     reconfirmation. "
        },
        "return": "A unique request ID."
      }
    },
    "title": "ISPVRequestManager"
  },
  "userdoc": {
    "methods": {
      "cancelRequest(uint256)": {
        "notice": "Cancel an active bitcoin event request."
      },
      "getRequest(uint256)": {
        "notice": "Retrieve info about a request"
      },
      "request(bytes,bytes,uint64,address,uint8,uint256)": {
        "notice": "Subscribe to a feed of Bitcoin transactions matching a request"
      }
    },
    "notice": "The interface for using the OnDemandSPV system. This interface             allows you to subscribe to Bitcoin events."
  }
}