{
  "contractName": "UsingWitnet",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmReward",
          "type": "uint256"
        },
        {
          "components": [
            {
              "internalType": "uint8",
              "name": "committeeSize",
              "type": "uint8"
            },
            {
              "internalType": "uint64",
              "name": "witnessingFeeNanoWit",
              "type": "uint64"
            }
          ],
          "indexed": false,
          "internalType": "struct WitnetV2.RadonSLA",
          "name": "witnetSLA",
          "type": "tuple"
        }
      ],
      "name": "WitnetQuery",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        }
      ],
      "name": "WitnetQueryResponse",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmCallbackGas",
          "type": "uint256"
        }
      ],
      "name": "WitnetQueryResponseDelivered",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "resultCborBytes",
          "type": "bytes"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmCallbackActualGas",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "string",
          "name": "evmCallbackRevertReason",
          "type": "string"
        }
      ],
      "name": "WitnetQueryResponseDeliveryFailed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmReward",
          "type": "uint256"
        }
      ],
      "name": "WitnetQueryRewardUpgraded",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "witnet",
      "outputs": [
        {
          "internalType": "contract WitnetOracle",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmReward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"witnetSLA\",\"type\":\"tuple\"}],\"name\":\"WitnetQuery\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryResponse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmCallbackGas\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryResponseDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmCallbackActualGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"evmCallbackRevertReason\",\"type\":\"string\"}],\"name\":\"WitnetQueryResponseDeliveryFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmReward\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryRewardUpgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"witnet\",\"outputs\":[{\"internalType\":\"contract WitnetOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Witnet Foundation.\",\"details\":\"Witnet-aware contracts can inherit from this contract in order to interact with Witnet.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_wrb\":\"Address of the WitnetOracle contract.\"}}},\"stateVariables\":{\"__witnet\":{\"details\":\"Immutable reference to the Witnet Request Board contract.\"},\"__witnetBaseFeeOverheadPercentage\":{\"details\":\"Percentage over base fee to pay on every data request, as to deal with volatility of evmGasPrice and evmWitPrice during the live time of a data request (since being posted until a result gets reported back), at both the EVM and the Witnet blockchain levels, respectivelly. \"},\"__witnetDefaultSLA\":{\"details\":\"Default Security-Level Agreement parameters to be fulfilled by the Witnet blockchainwhen solving a data request.\"}},\"title\":\"The UsingWitnet contract\",\"version\":1},\"userdoc\":{\"events\":{\"WitnetQuery(uint256,uint256,(uint8,uint64))\":{\"notice\":\"Emitted every time a new query containing some verified data request is posted to the WRB.\"},\"WitnetQueryResponse(uint256,uint256)\":{\"notice\":\"Emitted when a query with no callback gets reported into the WRB.\"},\"WitnetQueryResponseDelivered(uint256,uint256,uint256)\":{\"notice\":\"Emitted when a query with a callback gets successfully reported into the WRB.\"},\"WitnetQueryResponseDeliveryFailed(uint256,bytes,uint256,uint256,string)\":{\"notice\":\"Emitted when a query with a callback cannot get reported into the WRB.\"},\"WitnetQueryRewardUpgraded(uint256,uint256)\":{\"notice\":\"Emitted when the reward of some not-yet reported query is upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/apps/UsingWitnet.sol\":\"UsingWitnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/WitnetOracle.sol\":{\"keccak256\":\"0x84ef8d2ebcba273e4bc23a5ee414a1213df55d1b4e496197a146031fea3a4874\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c4a6e31964ed08c4c9dfe5279b4ffe9eeba6e759f15901e080e174e98e96a7f5\",\"dweb:/ipfs/QmTghzVFf2EHnfnHejgFGRBjanXYcstK9ftVaYmHWJfk8w\"]},\"project:/contracts/WitnetRequestBytecodes.sol\":{\"keccak256\":\"0x2a79d919dd79c0e3f857e6bee08368ad0b463188aced4a52de29270ed0f5f3d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://290d6013ee9f75fedbbb7726527a637ea2ae7a5da0ad118ecc43b298846f0bb0\",\"dweb:/ipfs/QmU8AZtPyctrrvxdmH297p595ZMS6DgcD6djSFKNxAqYMs\"]},\"project:/contracts/WitnetRequestFactory.sol\":{\"keccak256\":\"0x3c66f27d7c1db0e662c37d98005c4cbd871ceb75e97079d7bf673fb75d59c858\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://52adb318b870d0825718125e94fdbdd0e968ced09926420e2543b0ca4c6eb579\",\"dweb:/ipfs/QmYack87Q2UTfQb8KLLEPFBrMJgN2o6PaPqPNSc95McPVH\"]},\"project:/contracts/apps/UsingWitnet.sol\":{\"keccak256\":\"0x3fe6f2f1162bd1c128fb6aad2db81eaa1fdf04b5d15a5eeadf3e44bc81e2d4ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://927de4c99298ede8a240305bfd8e9daa5c79a32ed68cef19ece9b7f5bb37860b\",\"dweb:/ipfs/QmeZEbXpCTHegD6H7cVDipyXLYHUE4e3C66XojzYk8CpE4\"]},\"project:/contracts/interfaces/IWitnetOracle.sol\":{\"keccak256\":\"0x5dbb04fce5e05675325232a735c46617378982b48dac2138aca0c6cc95e6e4d5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7447a70455478239500e16aebe5dce6676dc86307d22f662761d8e9f7c5d1276\",\"dweb:/ipfs/QmVkvA4Mt6G1JXxE8ebxKGAjT1WvNbp5QMKg9sUKdrJjhv\"]},\"project:/contracts/interfaces/IWitnetOracleEvents.sol\":{\"keccak256\":\"0x0442f474f253dc1f6bd6a4f153c3adb2abe5f6f0f24c76d1baf666185e61e659\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://535e8efcfc5693669d9bd2b6f62e6fc65aca19b7de355a27152e4362b410540d\",\"dweb:/ipfs/QmVZRXgku1cZewhoucebaiBKAyUjF2dmEzYrzGvjPzbwN9\"]},\"project:/contracts/interfaces/IWitnetRequestBytecodes.sol\":{\"keccak256\":\"0x8da168bee9a78442216965976b1f29087f760f37dcb09337283242599ed1cbca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e120623262ee0559913bdae56c0a7921147dfe08ada7ea81061b14e2fc38c5e1\",\"dweb:/ipfs/Qmbxe8XRrH6ZjJHiR6YYzcZV1jnSWwo9iBYz5r6GJ6To5G\"]},\"project:/contracts/interfaces/IWitnetRequestFactory.sol\":{\"keccak256\":\"0x3b19ec4a976745ba2646e7e1886d647ef30ad678460a712c93bbfb4405b57f1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa759ae15b7d4da622a81d50933474910959ac490d8b63ea2e7ed8608859a9c9\",\"dweb:/ipfs/QmRckCu7eBBP5fn9ff6djs7VbdhFc7sxYb2yqDr4go66jV\"]},\"project:/contracts/libs/Witnet.sol\":{\"keccak256\":\"0x65a87375dd79d63a83fb454b7199b6c999bd59c50b3b59d521c5c4d45a7d3cc3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ca865b681d810c2fc5c3672ea6343c3bdf6fd71764ab824d25994744dc85866b\",\"dweb:/ipfs/QmPGcP3xGTNZfsQ9GSKdujNLRVs8dWDdubyUko1rbQqJNv\"]},\"project:/contracts/libs/WitnetBuffer.sol\":{\"keccak256\":\"0xa14570492eb5a313ddbacae0185c850ec99c67211eb33989a5e21d31bf06a150\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e83c11edb49cab6a767c0b685825bc22ece0d3d2897e0d54fe1923df5cc76ba5\",\"dweb:/ipfs/QmdLDgCc3tnKbgRrXwfNzsg6uUDirNmjvBB8V3iMmnD69a\"]},\"project:/contracts/libs/WitnetCBOR.sol\":{\"keccak256\":\"0xb346547ff731163beea2c657c52675cdf7936691d566a76a045577cf9c34ade0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d4b5b6424a033584b41f1204d635db98fda9ca9bd2a614c9d82539a3e4e6529\",\"dweb:/ipfs/QmW6Qy3wWpzHSECYaCPaf9LWGfPqWDKVoP2kPSNNQu7LMQ\"]},\"project:/contracts/libs/WitnetV2.sol\":{\"keccak256\":\"0xb276a6da373bfbe9cd942dd7e59979cda898215d1e36ab3df95a6d6cc6ff770f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc4890876b9bc64f501ccdd48408bb63724865cb2ce8d2057f6b318540adce7c\",\"dweb:/ipfs/QmPMHPdbCsKBavhiLcaDgQ9EjNSvwwzv8TKffotcCv1ctP\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.7.0 <0.9.0;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"../WitnetOracle.sol\";\r\n\r\n/// @title The UsingWitnet contract\r\n/// @dev Witnet-aware contracts can inherit from this contract in order to interact with Witnet.\r\n/// @author The Witnet Foundation.\r\nabstract contract UsingWitnet\r\n    is\r\n        IWitnetOracleEvents\r\n{\r\n    /// @dev Immutable reference to the Witnet Request Board contract.\r\n    WitnetOracle internal immutable __witnet;\r\n    \r\n    /// @dev Default Security-Level Agreement parameters to be fulfilled by the Witnet blockchain\r\n    /// @dev when solving a data request.\r\n    WitnetV2.RadonSLA internal __witnetDefaultSLA;\r\n\r\n    /// @dev Percentage over base fee to pay on every data request, \r\n    /// @dev as to deal with volatility of evmGasPrice and evmWitPrice during the live time of \r\n    /// @dev a data request (since being posted until a result gets reported back), at both the EVM and \r\n    /// @dev the Witnet blockchain levels, respectivelly. \r\n    uint16 internal __witnetBaseFeeOverheadPercentage;\r\n\r\n    /// @param _wrb Address of the WitnetOracle contract.\r\n    constructor(WitnetOracle _wrb) {\r\n        require(\r\n            _wrb.specs() == type(IWitnetOracle).interfaceId,\r\n            \"UsingWitnet: uncompliant WitnetOracle\"\r\n        );\r\n        __witnet = _wrb;\r\n        __witnetDefaultSLA = WitnetV2.RadonSLA({\r\n            // Number of nodes in the Witnet blockchain that will take part in solving the data request:\r\n            committeeSize: 10,\r\n            // Fee in $nanoWIT paid to every node in the Witnet blockchain involved in solving the data request:\r\n            witnessingFeeNanoWit: 2 * 10 ** 8  // defaults to 0.2 $WIT\r\n        });\r\n        \r\n        __witnetBaseFeeOverheadPercentage = 33; // defaults to 33%\r\n    }\r\n\r\n    /// @dev Provides a convenient way for client contracts extending this to block the execution of the main logic of the\r\n    /// @dev contract until a particular request has been successfully solved and reported by Witnet,\r\n    /// @dev either with an error or successfully.\r\n    modifier witnetQuerySolved(uint256 _witnetQueryId) {\r\n        require(_witnetCheckQueryResultAvailability(_witnetQueryId), \"UsingWitnet: unsolved query\");\r\n        _;\r\n    }\r\n\r\n    function witnet() virtual public view returns (WitnetOracle) {\r\n        return __witnet;\r\n    }\r\n\r\n    /// @notice Check if given query was already reported back from the Witnet oracle.\r\n    /// @param _id The unique identifier of a previously posted data request.\r\n    function _witnetCheckQueryResultAvailability(uint256 _id)\r\n        internal view\r\n        returns (bool)\r\n    {\r\n        return __witnet.getQueryStatus(_id) == WitnetV2.QueryStatus.Reported;\r\n    }\r\n\r\n    /// @notice Estimate the minimum reward required for posting a data request, using `tx.gasprice` as a reference.\r\n    /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. \r\n    /// @param _resultMaxSize Maximum expected size of returned data (in bytes).\r\n    function _witnetEstimateEvmReward(uint16 _resultMaxSize)\r\n        virtual internal view\r\n        returns (uint256)\r\n    {\r\n        return (\r\n            (100 + __witnetBaseFeeOverheadPercentage)\r\n                * __witnet.estimateBaseFee(tx.gasprice, _resultMaxSize) \r\n        ) / 100;\r\n    }\r\n\r\n    function _witnetCheckQueryResponseStatus(uint256 _witnetQueryId)\r\n        internal view\r\n        returns (WitnetV2.ResponseStatus)\r\n    {\r\n        return __witnet.getQueryResponseStatus(_witnetQueryId);\r\n    }\r\n\r\n    function _witnetCheckQueryResultError(uint256 _witnetQueryId)\r\n        internal view\r\n        returns (Witnet.ResultError memory)\r\n    {\r\n        return __witnet.getQueryResultError(_witnetQueryId);\r\n    }\r\n}\r\n",
  "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\apps\\UsingWitnet.sol",
  "ast": {
    "absolutePath": "project:/contracts/apps/UsingWitnet.sol",
    "exportedSymbols": {
      "IWitnetOracle": [
        13265
      ],
      "IWitnetOracleEvents": [
        13315
      ],
      "IWitnetRequestBytecodes": [
        13979
      ],
      "IWitnetRequestFactory": [
        14002
      ],
      "UsingWitnet": [
        1157
      ],
      "Witnet": [
        17557
      ],
      "WitnetBuffer": [
        19191
      ],
      "WitnetCBOR": [
        20734
      ],
      "WitnetOracle": [
        749
      ],
      "WitnetRequestBytecodes": [
        849
      ],
      "WitnetRequestFactory": [
        880
      ],
      "WitnetV2": [
        23640
      ]
    },
    "id": 1158,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1007,
        "literals": [
          "solidity",
          ">=",
          "0.7",
          ".0",
          "<",
          "0.9",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "35:31:16"
      },
      {
        "id": 1008,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "68:33:16"
      },
      {
        "absolutePath": "project:/contracts/WitnetOracle.sol",
        "file": "../WitnetOracle.sol",
        "id": 1009,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1158,
        "sourceUnit": 750,
        "src": "105:29:16",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 1011,
              "name": "IWitnetOracleEvents",
              "nameLocations": [
                "356:19:16"
              ],
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 13315,
              "src": "356:19:16"
            },
            "id": 1012,
            "nodeType": "InheritanceSpecifier",
            "src": "356:19:16"
          }
        ],
        "canonicalName": "UsingWitnet",
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 1010,
          "nodeType": "StructuredDocumentation",
          "src": "138:171:16",
          "text": "@title The UsingWitnet contract\n @dev Witnet-aware contracts can inherit from this contract in order to interact with Witnet.\n @author The Witnet Foundation."
        },
        "fullyImplemented": true,
        "id": 1157,
        "linearizedBaseContracts": [
          1157,
          13315
        ],
        "name": "UsingWitnet",
        "nameLocation": "327:11:16",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "documentation": {
              "id": 1013,
              "nodeType": "StructuredDocumentation",
              "src": "384:66:16",
              "text": "@dev Immutable reference to the Witnet Request Board contract."
            },
            "id": 1016,
            "mutability": "immutable",
            "name": "__witnet",
            "nameLocation": "488:8:16",
            "nodeType": "VariableDeclaration",
            "scope": 1157,
            "src": "456:40:16",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_WitnetOracle_$749",
              "typeString": "contract WitnetOracle"
            },
            "typeName": {
              "id": 1015,
              "nodeType": "UserDefinedTypeName",
              "pathNode": {
                "id": 1014,
                "name": "WitnetOracle",
                "nameLocations": [
                  "456:12:16"
                ],
                "nodeType": "IdentifierPath",
                "referencedDeclaration": 749,
                "src": "456:12:16"
              },
              "referencedDeclaration": 749,
              "src": "456:12:16",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_WitnetOracle_$749",
                "typeString": "contract WitnetOracle"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "documentation": {
              "id": 1017,
              "nodeType": "StructuredDocumentation",
              "src": "509:136:16",
              "text": "@dev Default Security-Level Agreement parameters to be fulfilled by the Witnet blockchain\n @dev when solving a data request."
            },
            "id": 1020,
            "mutability": "mutable",
            "name": "__witnetDefaultSLA",
            "nameLocation": "678:18:16",
            "nodeType": "VariableDeclaration",
            "scope": 1157,
            "src": "651:45:16",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_struct$_RadonSLA_$23503_storage",
              "typeString": "struct WitnetV2.RadonSLA"
            },
            "typeName": {
              "id": 1019,
              "nodeType": "UserDefinedTypeName",
              "pathNode": {
                "id": 1018,
                "name": "WitnetV2.RadonSLA",
                "nameLocations": [
                  "651:8:16",
                  "660:8:16"
                ],
                "nodeType": "IdentifierPath",
                "referencedDeclaration": 23503,
                "src": "651:17:16"
              },
              "referencedDeclaration": 23503,
              "src": "651:17:16",
              "typeDescriptions": {
                "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr",
                "typeString": "struct WitnetV2.RadonSLA"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "documentation": {
              "id": 1021,
              "nodeType": "StructuredDocumentation",
              "src": "705:327:16",
              "text": "@dev Percentage over base fee to pay on every data request, \n @dev as to deal with volatility of evmGasPrice and evmWitPrice during the live time of \n @dev a data request (since being posted until a result gets reported back), at both the EVM and \n @dev the Witnet blockchain levels, respectivelly. "
            },
            "id": 1023,
            "mutability": "mutable",
            "name": "__witnetBaseFeeOverheadPercentage",
            "nameLocation": "1054:33:16",
            "nodeType": "VariableDeclaration",
            "scope": 1157,
            "src": "1038:49:16",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint16",
              "typeString": "uint16"
            },
            "typeName": {
              "id": 1022,
              "name": "uint16",
              "nodeType": "ElementaryTypeName",
              "src": "1038:6:16",
              "typeDescriptions": {
                "typeIdentifier": "t_uint16",
                "typeString": "uint16"
              }
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1062,
              "nodeType": "Block",
              "src": "1186:644:16",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        "id": 1038,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 1031,
                              "name": "_wrb",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1027,
                              "src": "1219:4:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_WitnetOracle_$749",
                                "typeString": "contract WitnetOracle"
                              }
                            },
                            "id": 1032,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberLocation": "1224:5:16",
                            "memberName": "specs",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 748,
                            "src": "1219:10:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_bytes4_$",
                              "typeString": "function () view external returns (bytes4)"
                            }
                          },
                          "id": 1033,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "nameLocations": [],
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1219:12:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes4",
                            "typeString": "bytes4"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 1035,
                                "name": "IWitnetOracle",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13265,
                                "src": "1240:13:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IWitnetOracle_$13265_$",
                                  "typeString": "type(contract IWitnetOracle)"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_contract$_IWitnetOracle_$13265_$",
                                  "typeString": "type(contract IWitnetOracle)"
                                }
                              ],
                              "id": 1034,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "1235:4:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 1036,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "nameLocations": [],
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1235:19:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_contract$_IWitnetOracle_$13265",
                              "typeString": "type(contract IWitnetOracle)"
                            }
                          },
                          "id": 1037,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberLocation": "1255:11:16",
                          "memberName": "interfaceId",
                          "nodeType": "MemberAccess",
                          "src": "1235:31:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes4",
                            "typeString": "bytes4"
                          }
                        },
                        "src": "1219:47:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "5573696e675769746e65743a20756e636f6d706c69616e74205769746e65744f7261636c65",
                        "id": 1039,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1281:39:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_57d830abe71d02a02e5da4295b2a41f780665da6ca2ca2ca1e1e440e807c06d7",
                          "typeString": "literal_string \"UsingWitnet: uncompliant WitnetOracle\""
                        },
                        "value": "UsingWitnet: uncompliant WitnetOracle"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_57d830abe71d02a02e5da4295b2a41f780665da6ca2ca2ca1e1e440e807c06d7",
                          "typeString": "literal_string \"UsingWitnet: uncompliant WitnetOracle\""
                        }
                      ],
                      "id": 1030,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1197:7:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1040,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "nameLocations": [],
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1197:134:16",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1041,
                  "nodeType": "ExpressionStatement",
                  "src": "1197:134:16"
                },
                {
                  "expression": {
                    "id": 1044,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1042,
                      "name": "__witnet",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1016,
                      "src": "1342:8:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_WitnetOracle_$749",
                        "typeString": "contract WitnetOracle"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1043,
                      "name": "_wrb",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1027,
                      "src": "1353:4:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_WitnetOracle_$749",
                        "typeString": "contract WitnetOracle"
                      }
                    },
                    "src": "1342:15:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetOracle_$749",
                      "typeString": "contract WitnetOracle"
                    }
                  },
                  "id": 1045,
                  "nodeType": "ExpressionStatement",
                  "src": "1342:15:16"
                },
                {
                  "expression": {
                    "id": 1056,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1046,
                      "name": "__witnetDefaultSLA",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1020,
                      "src": "1368:18:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_RadonSLA_$23503_storage",
                        "typeString": "struct WitnetV2.RadonSLA storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "hexValue": "3130",
                          "id": 1049,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1543:2:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_10_by_1",
                            "typeString": "int_const 10"
                          },
                          "value": "10"
                        },
                        {
                          "commonType": {
                            "typeIdentifier": "t_rational_200000000_by_1",
                            "typeString": "int_const 200000000"
                          },
                          "id": 1054,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "hexValue": "32",
                            "id": 1050,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1696:1:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "*",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_100000000_by_1",
                              "typeString": "int_const 100000000"
                            },
                            "id": 1053,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3130",
                              "id": 1051,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1700:2:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_10_by_1",
                                "typeString": "int_const 10"
                              },
                              "value": "10"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "hexValue": "38",
                              "id": 1052,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1706:1:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "src": "1700:7:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_100000000_by_1",
                              "typeString": "int_const 100000000"
                            }
                          },
                          "src": "1696:11:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_200000000_by_1",
                            "typeString": "int_const 200000000"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_10_by_1",
                            "typeString": "int_const 10"
                          },
                          {
                            "typeIdentifier": "t_rational_200000000_by_1",
                            "typeString": "int_const 200000000"
                          }
                        ],
                        "expression": {
                          "id": 1047,
                          "name": "WitnetV2",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 23640,
                          "src": "1389:8:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23640_$",
                            "typeString": "type(library WitnetV2)"
                          }
                        },
                        "id": 1048,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberLocation": "1398:8:16",
                        "memberName": "RadonSLA",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 23503,
                        "src": "1389:17:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_struct$_RadonSLA_$23503_storage_ptr_$",
                          "typeString": "type(struct WitnetV2.RadonSLA storage pointer)"
                        }
                      },
                      "id": 1055,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "structConstructorCall",
                      "lValueRequested": false,
                      "nameLocations": [
                        "1528:13:16",
                        "1674:20:16"
                      ],
                      "names": [
                        "committeeSize",
                        "witnessingFeeNanoWit"
                      ],
                      "nodeType": "FunctionCall",
                      "src": "1389:355:16",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_RadonSLA_$23503_memory_ptr",
                        "typeString": "struct WitnetV2.RadonSLA memory"
                      }
                    },
                    "src": "1368:376:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_RadonSLA_$23503_storage",
                      "typeString": "struct WitnetV2.RadonSLA storage ref"
                    }
                  },
                  "id": 1057,
                  "nodeType": "ExpressionStatement",
                  "src": "1368:376:16"
                },
                {
                  "expression": {
                    "id": 1060,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1058,
                      "name": "__witnetBaseFeeOverheadPercentage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1023,
                      "src": "1765:33:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint16",
                        "typeString": "uint16"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "hexValue": "3333",
                      "id": 1059,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1801:2:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_33_by_1",
                        "typeString": "int_const 33"
                      },
                      "value": "33"
                    },
                    "src": "1765:38:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "id": 1061,
                  "nodeType": "ExpressionStatement",
                  "src": "1765:38:16"
                }
              ]
            },
            "documentation": {
              "id": 1024,
              "nodeType": "StructuredDocumentation",
              "src": "1096:53:16",
              "text": "@param _wrb Address of the WitnetOracle contract."
            },
            "id": 1063,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nameLocation": "-1:-1:-1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1028,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1027,
                  "mutability": "mutable",
                  "name": "_wrb",
                  "nameLocation": "1180:4:16",
                  "nodeType": "VariableDeclaration",
                  "scope": 1063,
                  "src": "1167:17:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_WitnetOracle_$749",
                    "typeString": "contract WitnetOracle"
                  },
                  "typeName": {
                    "id": 1026,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 1025,
                      "name": "WitnetOracle",
                      "nameLocations": [
                        "1167:12:16"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 749,
                      "src": "1167:12:16"
                    },
                    "referencedDeclaration": 749,
                    "src": "1167:12:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetOracle_$749",
                      "typeString": "contract WitnetOracle"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1166:19:16"
            },
            "returnParameters": {
              "id": 1029,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1186:0:16"
            },
            "scope": 1157,
            "src": "1155:675:16",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1076,
              "nodeType": "Block",
              "src": "2168:122:16",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1070,
                            "name": "_witnetQueryId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1066,
                            "src": "2223:14:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 1069,
                          "name": "_witnetCheckQueryResultAvailability",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1104,
                          "src": "2187:35:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (uint256) view returns (bool)"
                          }
                        },
                        "id": 1071,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "nameLocations": [],
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2187:51:16",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "5573696e675769746e65743a20756e736f6c766564207175657279",
                        "id": 1072,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2240:29:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_41822fe0d93e920c011d422560ffb80affb6a9a88f642a07ec69b494d09368bb",
                          "typeString": "literal_string \"UsingWitnet: unsolved query\""
                        },
                        "value": "UsingWitnet: unsolved query"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_41822fe0d93e920c011d422560ffb80affb6a9a88f642a07ec69b494d09368bb",
                          "typeString": "literal_string \"UsingWitnet: unsolved query\""
                        }
                      ],
                      "id": 1068,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "2179:7:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1073,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "nameLocations": [],
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2179:91:16",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1074,
                  "nodeType": "ExpressionStatement",
                  "src": "2179:91:16"
                },
                {
                  "id": 1075,
                  "nodeType": "PlaceholderStatement",
                  "src": "2281:1:16"
                }
              ]
            },
            "documentation": {
              "id": 1064,
              "nodeType": "StructuredDocumentation",
              "src": "1838:273:16",
              "text": "@dev Provides a convenient way for client contracts extending this to block the execution of the main logic of the\n @dev contract until a particular request has been successfully solved and reported by Witnet,\n @dev either with an error or successfully."
            },
            "id": 1077,
            "name": "witnetQuerySolved",
            "nameLocation": "2126:17:16",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1067,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1066,
                  "mutability": "mutable",
                  "name": "_witnetQueryId",
                  "nameLocation": "2152:14:16",
                  "nodeType": "VariableDeclaration",
                  "scope": 1077,
                  "src": "2144:22:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1065,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2144:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2143:24:16"
            },
            "src": "2117:173:16",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1085,
              "nodeType": "Block",
              "src": "2359:34:16",
              "statements": [
                {
                  "expression": {
                    "id": 1083,
                    "name": "__witnet",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1016,
                    "src": "2377:8:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetOracle_$749",
                      "typeString": "contract WitnetOracle"
                    }
                  },
                  "functionReturnParameters": 1082,
                  "id": 1084,
                  "nodeType": "Return",
                  "src": "2370:15:16"
                }
              ]
            },
            "functionSelector": "46d1d21a",
            "id": 1086,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "witnet",
            "nameLocation": "2307:6:16",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1078,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2313:2:16"
            },
            "returnParameters": {
              "id": 1082,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1081,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1086,
                  "src": "2345:12:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_WitnetOracle_$749",
                    "typeString": "contract WitnetOracle"
                  },
                  "typeName": {
                    "id": 1080,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 1079,
                      "name": "WitnetOracle",
                      "nameLocations": [
                        "2345:12:16"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 749,
                      "src": "2345:12:16"
                    },
                    "referencedDeclaration": 749,
                    "src": "2345:12:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetOracle_$749",
                      "typeString": "contract WitnetOracle"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2344:14:16"
            },
            "scope": 1157,
            "src": "2298:95:16",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1103,
              "nodeType": "Block",
              "src": "2678:87:16",
              "statements": [
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_enum$_QueryStatus_$23461",
                      "typeString": "enum WitnetV2.QueryStatus"
                    },
                    "id": 1101,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "arguments": [
                        {
                          "id": 1096,
                          "name": "_id",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1089,
                          "src": "2720:3:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "id": 1094,
                          "name": "__witnet",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1016,
                          "src": "2696:8:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_WitnetOracle_$749",
                            "typeString": "contract WitnetOracle"
                          }
                        },
                        "id": 1095,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberLocation": "2705:14:16",
                        "memberName": "getQueryStatus",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 13204,
                        "src": "2696:23:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_QueryStatus_$23461_$",
                          "typeString": "function (uint256) view external returns (enum WitnetV2.QueryStatus)"
                        }
                      },
                      "id": 1097,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "nameLocations": [],
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2696:28:16",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_QueryStatus_$23461",
                        "typeString": "enum WitnetV2.QueryStatus"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "expression": {
                        "expression": {
                          "id": 1098,
                          "name": "WitnetV2",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 23640,
                          "src": "2728:8:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23640_$",
                            "typeString": "type(library WitnetV2)"
                          }
                        },
                        "id": 1099,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberLocation": "2737:11:16",
                        "memberName": "QueryStatus",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 23461,
                        "src": "2728:20:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_QueryStatus_$23461_$",
                          "typeString": "type(enum WitnetV2.QueryStatus)"
                        }
                      },
                      "id": 1100,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberLocation": "2749:8:16",
                      "memberName": "Reported",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 23459,
                      "src": "2728:29:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_QueryStatus_$23461",
                        "typeString": "enum WitnetV2.QueryStatus"
                      }
                    },
                    "src": "2696:61:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1093,
                  "id": 1102,
                  "nodeType": "Return",
                  "src": "2689:68:16"
                }
              ]
            },
            "documentation": {
              "id": 1087,
              "nodeType": "StructuredDocumentation",
              "src": "2401:161:16",
              "text": "@notice Check if given query was already reported back from the Witnet oracle.\n @param _id The unique identifier of a previously posted data request."
            },
            "id": 1104,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_witnetCheckQueryResultAvailability",
            "nameLocation": "2577:35:16",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1090,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1089,
                  "mutability": "mutable",
                  "name": "_id",
                  "nameLocation": "2621:3:16",
                  "nodeType": "VariableDeclaration",
                  "scope": 1104,
                  "src": "2613:11:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1088,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2613:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2612:13:16"
            },
            "returnParameters": {
              "id": 1093,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1092,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1104,
                  "src": "2667:4:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1091,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2667:4:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2666:6:16"
            },
            "scope": 1157,
            "src": "2568:197:16",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1127,
              "nodeType": "Block",
              "src": "3186:173:16",
              "statements": [
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1125,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "components": [
                        {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1122,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint16",
                                  "typeString": "uint16"
                                },
                                "id": 1114,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "hexValue": "313030",
                                  "id": 1112,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3220:3:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_100_by_1",
                                    "typeString": "int_const 100"
                                  },
                                  "value": "100"
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "id": 1113,
                                  "name": "__witnetBaseFeeOverheadPercentage",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1023,
                                  "src": "3226:33:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint16",
                                    "typeString": "uint16"
                                  }
                                },
                                "src": "3220:39:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint16",
                                  "typeString": "uint16"
                                }
                              }
                            ],
                            "id": 1115,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "3219:41:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint16",
                              "typeString": "uint16"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "*",
                          "rightExpression": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 1118,
                                  "name": "tx",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967270,
                                  "src": "3305:2:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_transaction",
                                    "typeString": "tx"
                                  }
                                },
                                "id": 1119,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberLocation": "3308:8:16",
                                "memberName": "gasprice",
                                "nodeType": "MemberAccess",
                                "src": "3305:11:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 1120,
                                "name": "_resultMaxSize",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1107,
                                "src": "3318:14:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint16",
                                  "typeString": "uint16"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint16",
                                  "typeString": "uint16"
                                }
                              ],
                              "expression": {
                                "id": 1116,
                                "name": "__witnet",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1016,
                                "src": "3280:8:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_WitnetOracle_$749",
                                  "typeString": "contract WitnetOracle"
                                }
                              },
                              "id": 1117,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberLocation": "3289:15:16",
                              "memberName": "estimateBaseFee",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 13105,
                              "src": "3280:24:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint16_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint16) view external returns (uint256)"
                              }
                            },
                            "id": 1121,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "nameLocations": [],
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3280:53:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3219:114:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 1123,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "3204:141:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "hexValue": "313030",
                      "id": 1124,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3348:3:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_100_by_1",
                        "typeString": "int_const 100"
                      },
                      "value": "100"
                    },
                    "src": "3204:147:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1111,
                  "id": 1126,
                  "nodeType": "Return",
                  "src": "3197:154:16"
                }
              ]
            },
            "documentation": {
              "id": 1105,
              "nodeType": "StructuredDocumentation",
              "src": "2773:287:16",
              "text": "@notice Estimate the minimum reward required for posting a data request, using `tx.gasprice` as a reference.\n @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. \n @param _resultMaxSize Maximum expected size of returned data (in bytes)."
            },
            "id": 1128,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_witnetEstimateEvmReward",
            "nameLocation": "3075:24:16",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1108,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1107,
                  "mutability": "mutable",
                  "name": "_resultMaxSize",
                  "nameLocation": "3107:14:16",
                  "nodeType": "VariableDeclaration",
                  "scope": 1128,
                  "src": "3100:21:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint16",
                    "typeString": "uint16"
                  },
                  "typeName": {
                    "id": 1106,
                    "name": "uint16",
                    "nodeType": "ElementaryTypeName",
                    "src": "3100:6:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3099:23:16"
            },
            "returnParameters": {
              "id": 1111,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1110,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1128,
                  "src": "3172:7:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1109,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3172:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3171:9:16"
            },
            "scope": 1157,
            "src": "3066:293:16",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1141,
              "nodeType": "Block",
              "src": "3503:73:16",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1138,
                        "name": "_witnetQueryId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1130,
                        "src": "3553:14:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "id": 1136,
                        "name": "__witnet",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1016,
                        "src": "3521:8:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_WitnetOracle_$749",
                          "typeString": "contract WitnetOracle"
                        }
                      },
                      "id": 1137,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberLocation": "3530:22:16",
                      "memberName": "getQueryResponseStatus",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13178,
                      "src": "3521:31:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ResponseStatus_$23496_$",
                        "typeString": "function (uint256) view external returns (enum WitnetV2.ResponseStatus)"
                      }
                    },
                    "id": 1139,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "nameLocations": [],
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3521:47:16",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                      "typeString": "enum WitnetV2.ResponseStatus"
                    }
                  },
                  "functionReturnParameters": 1135,
                  "id": 1140,
                  "nodeType": "Return",
                  "src": "3514:54:16"
                }
              ]
            },
            "id": 1142,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_witnetCheckQueryResponseStatus",
            "nameLocation": "3376:31:16",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1131,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1130,
                  "mutability": "mutable",
                  "name": "_witnetQueryId",
                  "nameLocation": "3416:14:16",
                  "nodeType": "VariableDeclaration",
                  "scope": 1142,
                  "src": "3408:22:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1129,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3408:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3407:24:16"
            },
            "returnParameters": {
              "id": 1135,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1134,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1142,
                  "src": "3473:23:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                    "typeString": "enum WitnetV2.ResponseStatus"
                  },
                  "typeName": {
                    "id": 1133,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 1132,
                      "name": "WitnetV2.ResponseStatus",
                      "nameLocations": [
                        "3473:8:16",
                        "3482:14:16"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23496,
                      "src": "3473:23:16"
                    },
                    "referencedDeclaration": 23496,
                    "src": "3473:23:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                      "typeString": "enum WitnetV2.ResponseStatus"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3472:25:16"
            },
            "scope": 1157,
            "src": "3367:209:16",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1155,
              "nodeType": "Block",
              "src": "3719:70:16",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1152,
                        "name": "_witnetQueryId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1144,
                        "src": "3766:14:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "id": 1150,
                        "name": "__witnet",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1016,
                        "src": "3737:8:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_WitnetOracle_$749",
                          "typeString": "contract WitnetOracle"
                        }
                      },
                      "id": 1151,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberLocation": "3746:19:16",
                      "memberName": "getQueryResultError",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13195,
                      "src": "3737:28:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_ResultError_$16055_memory_ptr_$",
                        "typeString": "function (uint256) view external returns (struct Witnet.ResultError memory)"
                      }
                    },
                    "id": 1153,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "nameLocations": [],
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3737:44:16",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_ResultError_$16055_memory_ptr",
                      "typeString": "struct Witnet.ResultError memory"
                    }
                  },
                  "functionReturnParameters": 1149,
                  "id": 1154,
                  "nodeType": "Return",
                  "src": "3730:51:16"
                }
              ]
            },
            "id": 1156,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_witnetCheckQueryResultError",
            "nameLocation": "3593:28:16",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1145,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1144,
                  "mutability": "mutable",
                  "name": "_witnetQueryId",
                  "nameLocation": "3630:14:16",
                  "nodeType": "VariableDeclaration",
                  "scope": 1156,
                  "src": "3622:22:16",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1143,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3622:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3621:24:16"
            },
            "returnParameters": {
              "id": 1149,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1148,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1156,
                  "src": "3687:25:16",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_ResultError_$16055_memory_ptr",
                    "typeString": "struct Witnet.ResultError"
                  },
                  "typeName": {
                    "id": 1147,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 1146,
                      "name": "Witnet.ResultError",
                      "nameLocations": [
                        "3687:6:16",
                        "3694:11:16"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 16055,
                      "src": "3687:18:16"
                    },
                    "referencedDeclaration": 16055,
                    "src": "3687:18:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_ResultError_$16055_storage_ptr",
                      "typeString": "struct Witnet.ResultError"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3686:27:16"
            },
            "scope": 1157,
            "src": "3584:205:16",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 1158,
        "src": "309:3483:16",
        "usedErrors": [],
        "usedEvents": [
          13278,
          13285,
          13294,
          13307,
          13314
        ]
      }
    ],
    "src": "35:3759:16"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.25+commit.b61c2a91.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2024-12-05T09:36:04.166Z",
  "devdoc": {
    "author": "The Witnet Foundation.",
    "details": "Witnet-aware contracts can inherit from this contract in order to interact with Witnet.",
    "kind": "dev",
    "methods": {
      "constructor": {
        "params": {
          "_wrb": "Address of the WitnetOracle contract."
        }
      }
    },
    "stateVariables": {
      "__witnet": {
        "details": "Immutable reference to the Witnet Request Board contract."
      },
      "__witnetBaseFeeOverheadPercentage": {
        "details": "Percentage over base fee to pay on every data request, as to deal with volatility of evmGasPrice and evmWitPrice during the live time of a data request (since being posted until a result gets reported back), at both the EVM and the Witnet blockchain levels, respectivelly. "
      },
      "__witnetDefaultSLA": {
        "details": "Default Security-Level Agreement parameters to be fulfilled by the Witnet blockchainwhen solving a data request."
      }
    },
    "title": "The UsingWitnet contract",
    "version": 1
  },
  "userdoc": {
    "events": {
      "WitnetQuery(uint256,uint256,(uint8,uint64))": {
        "notice": "Emitted every time a new query containing some verified data request is posted to the WRB."
      },
      "WitnetQueryResponse(uint256,uint256)": {
        "notice": "Emitted when a query with no callback gets reported into the WRB."
      },
      "WitnetQueryResponseDelivered(uint256,uint256,uint256)": {
        "notice": "Emitted when a query with a callback gets successfully reported into the WRB."
      },
      "WitnetQueryResponseDeliveryFailed(uint256,bytes,uint256,uint256,string)": {
        "notice": "Emitted when a query with a callback cannot get reported into the WRB."
      },
      "WitnetQueryRewardUpgraded(uint256,uint256)": {
        "notice": "Emitted when the reward of some not-yet reported query is upgraded."
      }
    },
    "kind": "user",
    "methods": {},
    "version": 1
  }
}