{
  "contractName": "IWitnetOracle",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "gasPrice",
          "type": "uint256"
        },
        {
          "internalType": "uint16",
          "name": "resultMaxSize",
          "type": "uint16"
        }
      ],
      "name": "estimateBaseFee",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "gasPrice",
          "type": "uint256"
        },
        {
          "internalType": "bytes32",
          "name": "radHash",
          "type": "bytes32"
        }
      ],
      "name": "estimateBaseFee",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "gasPrice",
          "type": "uint256"
        },
        {
          "internalType": "uint24",
          "name": "callbackGasLimit",
          "type": "uint24"
        }
      ],
      "name": "estimateBaseFeeWithCallback",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "fetchQueryResponse",
      "outputs": [
        {
          "components": [
            {
              "internalType": "address",
              "name": "reporter",
              "type": "address"
            },
            {
              "internalType": "uint64",
              "name": "finality",
              "type": "uint64"
            },
            {
              "internalType": "uint32",
              "name": "resultTimestamp",
              "type": "uint32"
            },
            {
              "internalType": "bytes32",
              "name": "resultTallyHash",
              "type": "bytes32"
            },
            {
              "internalType": "bytes",
              "name": "resultCborBytes",
              "type": "bytes"
            }
          ],
          "internalType": "struct WitnetV2.Response",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQuery",
      "outputs": [
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "requester",
                  "type": "address"
                },
                {
                  "internalType": "uint24",
                  "name": "gasCallback",
                  "type": "uint24"
                },
                {
                  "internalType": "uint72",
                  "name": "evmReward",
                  "type": "uint72"
                },
                {
                  "internalType": "bytes",
                  "name": "witnetBytecode",
                  "type": "bytes"
                },
                {
                  "internalType": "bytes32",
                  "name": "witnetRAD",
                  "type": "bytes32"
                },
                {
                  "components": [
                    {
                      "internalType": "uint8",
                      "name": "committeeSize",
                      "type": "uint8"
                    },
                    {
                      "internalType": "uint64",
                      "name": "witnessingFeeNanoWit",
                      "type": "uint64"
                    }
                  ],
                  "internalType": "struct WitnetV2.RadonSLA",
                  "name": "witnetSLA",
                  "type": "tuple"
                }
              ],
              "internalType": "struct WitnetV2.Request",
              "name": "request",
              "type": "tuple"
            },
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "reporter",
                  "type": "address"
                },
                {
                  "internalType": "uint64",
                  "name": "finality",
                  "type": "uint64"
                },
                {
                  "internalType": "uint32",
                  "name": "resultTimestamp",
                  "type": "uint32"
                },
                {
                  "internalType": "bytes32",
                  "name": "resultTallyHash",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes",
                  "name": "resultCborBytes",
                  "type": "bytes"
                }
              ],
              "internalType": "struct WitnetV2.Response",
              "name": "response",
              "type": "tuple"
            }
          ],
          "internalType": "struct WitnetV2.Query",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryEvmReward",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryRequest",
      "outputs": [
        {
          "components": [
            {
              "internalType": "address",
              "name": "requester",
              "type": "address"
            },
            {
              "internalType": "uint24",
              "name": "gasCallback",
              "type": "uint24"
            },
            {
              "internalType": "uint72",
              "name": "evmReward",
              "type": "uint72"
            },
            {
              "internalType": "bytes",
              "name": "witnetBytecode",
              "type": "bytes"
            },
            {
              "internalType": "bytes32",
              "name": "witnetRAD",
              "type": "bytes32"
            },
            {
              "components": [
                {
                  "internalType": "uint8",
                  "name": "committeeSize",
                  "type": "uint8"
                },
                {
                  "internalType": "uint64",
                  "name": "witnessingFeeNanoWit",
                  "type": "uint64"
                }
              ],
              "internalType": "struct WitnetV2.RadonSLA",
              "name": "witnetSLA",
              "type": "tuple"
            }
          ],
          "internalType": "struct WitnetV2.Request",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryResponse",
      "outputs": [
        {
          "components": [
            {
              "internalType": "address",
              "name": "reporter",
              "type": "address"
            },
            {
              "internalType": "uint64",
              "name": "finality",
              "type": "uint64"
            },
            {
              "internalType": "uint32",
              "name": "resultTimestamp",
              "type": "uint32"
            },
            {
              "internalType": "bytes32",
              "name": "resultTallyHash",
              "type": "bytes32"
            },
            {
              "internalType": "bytes",
              "name": "resultCborBytes",
              "type": "bytes"
            }
          ],
          "internalType": "struct WitnetV2.Response",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryResponseStatus",
      "outputs": [
        {
          "internalType": "enum WitnetV2.ResponseStatus",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryResultCborBytes",
      "outputs": [
        {
          "internalType": "bytes",
          "name": "",
          "type": "bytes"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryResultError",
      "outputs": [
        {
          "components": [
            {
              "internalType": "enum Witnet.ResultErrorCodes",
              "name": "code",
              "type": "uint8"
            },
            {
              "internalType": "string",
              "name": "reason",
              "type": "string"
            }
          ],
          "internalType": "struct Witnet.ResultError",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "getQueryStatus",
      "outputs": [
        {
          "internalType": "enum WitnetV2.QueryStatus",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256[]",
          "name": "queryIds",
          "type": "uint256[]"
        }
      ],
      "name": "getQueryStatusBatch",
      "outputs": [
        {
          "internalType": "enum WitnetV2.QueryStatus[]",
          "name": "",
          "type": "uint8[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getNextQueryId",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "queryRAD",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "internalType": "uint8",
              "name": "committeeSize",
              "type": "uint8"
            },
            {
              "internalType": "uint64",
              "name": "witnessingFeeNanoWit",
              "type": "uint64"
            }
          ],
          "internalType": "struct WitnetV2.RadonSLA",
          "name": "querySLA",
          "type": "tuple"
        }
      ],
      "name": "postRequest",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "queryUnverifiedBytecode",
          "type": "bytes"
        },
        {
          "components": [
            {
              "internalType": "uint8",
              "name": "committeeSize",
              "type": "uint8"
            },
            {
              "internalType": "uint64",
              "name": "witnessingFeeNanoWit",
              "type": "uint64"
            }
          ],
          "internalType": "struct WitnetV2.RadonSLA",
          "name": "querySLA",
          "type": "tuple"
        },
        {
          "internalType": "uint24",
          "name": "queryCallbackGasLimit",
          "type": "uint24"
        }
      ],
      "name": "postRequestWithCallback",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "queryRAD",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "internalType": "uint8",
              "name": "committeeSize",
              "type": "uint8"
            },
            {
              "internalType": "uint64",
              "name": "witnessingFeeNanoWit",
              "type": "uint64"
            }
          ],
          "internalType": "struct WitnetV2.RadonSLA",
          "name": "querySLA",
          "type": "tuple"
        },
        {
          "internalType": "uint24",
          "name": "queryCallbackGasLimit",
          "type": "uint24"
        }
      ],
      "name": "postRequestWithCallback",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "queryId",
          "type": "uint256"
        }
      ],
      "name": "upgradeQueryEvmReward",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"resultMaxSize\",\"type\":\"uint16\"}],\"name\":\"estimateBaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"radHash\",\"type\":\"bytes32\"}],\"name\":\"estimateBaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"callbackGasLimit\",\"type\":\"uint24\"}],\"name\":\"estimateBaseFeeWithCallback\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"fetchQueryResponse\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"reporter\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"finality\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"resultTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"resultTallyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"}],\"internalType\":\"struct WitnetV2.Response\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNextQueryId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQuery\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"gasCallback\",\"type\":\"uint24\"},{\"internalType\":\"uint72\",\"name\":\"evmReward\",\"type\":\"uint72\"},{\"internalType\":\"bytes\",\"name\":\"witnetBytecode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"witnetRAD\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"witnetSLA\",\"type\":\"tuple\"}],\"internalType\":\"struct WitnetV2.Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"reporter\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"finality\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"resultTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"resultTallyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"}],\"internalType\":\"struct WitnetV2.Response\",\"name\":\"response\",\"type\":\"tuple\"}],\"internalType\":\"struct WitnetV2.Query\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryEvmReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"gasCallback\",\"type\":\"uint24\"},{\"internalType\":\"uint72\",\"name\":\"evmReward\",\"type\":\"uint72\"},{\"internalType\":\"bytes\",\"name\":\"witnetBytecode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"witnetRAD\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"witnetSLA\",\"type\":\"tuple\"}],\"internalType\":\"struct WitnetV2.Request\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryResponse\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"reporter\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"finality\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"resultTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"resultTallyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"}],\"internalType\":\"struct WitnetV2.Response\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryResponseStatus\",\"outputs\":[{\"internalType\":\"enum WitnetV2.ResponseStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryResultCborBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryResultError\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Witnet.ResultErrorCodes\",\"name\":\"code\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"internalType\":\"struct Witnet.ResultError\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"getQueryStatus\",\"outputs\":[{\"internalType\":\"enum WitnetV2.QueryStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"queryIds\",\"type\":\"uint256[]\"}],\"name\":\"getQueryStatusBatch\",\"outputs\":[{\"internalType\":\"enum WitnetV2.QueryStatus[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"queryRAD\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"querySLA\",\"type\":\"tuple\"}],\"name\":\"postRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"queryUnverifiedBytecode\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"querySLA\",\"type\":\"tuple\"},{\"internalType\":\"uint24\",\"name\":\"queryCallbackGasLimit\",\"type\":\"uint24\"}],\"name\":\"postRequestWithCallback\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"queryRAD\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"querySLA\",\"type\":\"tuple\"},{\"internalType\":\"uint24\",\"name\":\"queryCallbackGasLimit\",\"type\":\"uint24\"}],\"name\":\"postRequestWithCallback\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"upgradeQueryEvmReward\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"estimateBaseFee(uint256,bytes32)\":{\"details\":\"Fails if the RAD hash was not previously verified on the WitnetRequestBytecodes registry.\",\"params\":{\"gasPrice\":\"Expected gas price to pay upon posting the data request.\",\"radHash\":\"The RAD hash of the data request to be solved by Witnet.\"}},\"estimateBaseFee(uint256,uint16)\":{\"details\":\"Underestimates if the size of returned data is greater than `resultMaxSize`. \",\"params\":{\"gasPrice\":\"Expected gas price to pay upon posting the data request.\",\"resultMaxSize\":\"Maximum expected size of returned data (in bytes).  \"}},\"estimateBaseFeeWithCallback(uint256,uint24)\":{\"params\":{\"callbackGasLimit\":\"Maximum gas to be spent when reporting the data request result.\",\"gasPrice\":\"Expected gas price to pay upon posting the data request.\"}},\"fetchQueryResponse(uint256)\":{\"details\":\"Fails if the query was not in 'Reported' status, or called from an address different tothe one that actually posted the given request.\",\"params\":{\"queryId\":\"The unique query identifier.\"}},\"getQueryRequest(uint256)\":{\"params\":{\"queryId\":\"The unique query identifier.\"}},\"getQueryResponse(uint256)\":{\"params\":{\"queryId\":\"The unique query identifier.\"}},\"getQueryResponseStatus(uint256)\":{\"params\":{\"queryId\":\"The unique query identifier.\"}},\"getQueryResultCborBytes(uint256)\":{\"params\":{\"queryId\":\"The unique query identifier.\"}},\"getQueryResultError(uint256)\":{\"params\":{\"queryId\":\"The unique query identifier.\"}},\"postRequest(bytes32,(uint8,uint64))\":{\"details\":\"Reasons to fail:- the RAD hash was not previously verified by the WitnetRequestBytecodes registry;- invalid SLA parameters were provided;- insufficient value is paid as reward.\",\"params\":{\"queryRAD\":\"The RAD hash of the data request to be solved by Witnet.\",\"querySLA\":\"The data query SLA to be fulfilled on the Witnet blockchain.\"},\"returns\":{\"queryId\":\"Unique query identifier.\"}},\"postRequestWithCallback(bytes,(uint8,uint64),uint24)\":{\"details\":\"Reasons to fail:- the caller is not a contract implementing the IWitnetConsumer interface;- the provided bytecode is empty;- invalid SLA parameters were provided;- insufficient value is paid as reward.\",\"params\":{\"queryCallbackGasLimit\":\"Maximum gas to be spent when reporting the data request result.\",\"querySLA\":\"The data query SLA to be fulfilled on the Witnet blockchain.\",\"queryUnverifiedBytecode\":\"The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain.\"},\"returns\":{\"queryId\":\"Unique query identifier.\"}},\"postRequestWithCallback(bytes32,(uint8,uint64),uint24)\":{\"details\":\"Reasons to fail:- the caller is not a contract implementing the IWitnetConsumer interface;- the RAD hash was not previously verified by the WitnetRequestBytecodes registry;- invalid SLA parameters were provided;- insufficient value is paid as reward.\",\"params\":{\"queryCallbackGasLimit\":\"Maximum gas to be spent when reporting the data request result.\",\"queryRAD\":\"The RAD hash of the data request to be solved by Witnet.\",\"querySLA\":\"The data query SLA to be fulfilled on the Witnet blockchain.\"},\"returns\":{\"queryId\":\"Unique query identifier.\"}},\"upgradeQueryEvmReward(uint256)\":{\"params\":{\"queryId\":\"The unique query identifier.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"estimateBaseFee(uint256,bytes32)\":{\"notice\":\"Estimate the minimum reward required for posting a data request.\"},\"estimateBaseFee(uint256,uint16)\":{\"notice\":\"Estimate the minimum reward required for posting a data request.\"},\"estimateBaseFeeWithCallback(uint256,uint24)\":{\"notice\":\"Estimate the minimum reward required for posting a data request with a callback.\"},\"fetchQueryResponse(uint256)\":{\"notice\":\"Retrieves a copy of all Witnet-provable data related to a previously posted request,  removing the whole query from the WRB storage.\"},\"getNextQueryId()\":{\"notice\":\"Returns next query id to be generated by the Witnet Request Board.\"},\"getQuery(uint256)\":{\"notice\":\"Gets the whole Query data contents, if any, no matter its current status.\"},\"getQueryEvmReward(uint256)\":{\"notice\":\"Gets the current EVM reward the report can claim, if not done yet.\"},\"getQueryRequest(uint256)\":{\"notice\":\"Retrieves the RAD hash and SLA parameters of the given query.\"},\"getQueryResponse(uint256)\":{\"notice\":\"Retrieves the whole `Witnet.Response` record referred to a previously posted Witnet Data Request.\"},\"getQueryResponseStatus(uint256)\":{\"notice\":\"Returns query's result current status from a requester's point of view:- 0 => Void: the query is either non-existent or deleted;- 1 => Awaiting: the query has not yet been reported;- 2 => Ready: the query response was finalized, and contains a result with no erros.- 3 => Error: the query response was finalized, and contains a result with errors.\"},\"getQueryResultCborBytes(uint256)\":{\"notice\":\"Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query.\"},\"getQueryResultError(uint256)\":{\"notice\":\"Gets error code identifying some possible failure on the resolution of the given query.\"},\"getQueryStatus(uint256)\":{\"notice\":\"Gets current status of given query.\"},\"getQueryStatusBatch(uint256[])\":{\"notice\":\"Get current status of all given query ids.\"},\"postRequest(bytes32,(uint8,uint64))\":{\"notice\":\"Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provable result to this request.\"},\"postRequestWithCallback(bytes,(uint8,uint64),uint24)\":{\"notice\":\"Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reporteddirectly to the requesting contract. If the report callback fails for any reason, a `WitnetQueryResponseDeliveryFailed`event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result.\"},\"postRequestWithCallback(bytes32,(uint8,uint64),uint24)\":{\"notice\":\"Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reporteddirectly to the requesting contract. If the report callback fails for any reason, an `WitnetQueryResponseDeliveryFailed`will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result.\"},\"upgradeQueryEvmReward(uint256)\":{\"notice\":\"Increments the reward of a previously posted request by adding the transaction value to it.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/IWitnetOracle.sol\":\"IWitnetOracle\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/IWitnetOracle.sol\":{\"keccak256\":\"0x5dbb04fce5e05675325232a735c46617378982b48dac2138aca0c6cc95e6e4d5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7447a70455478239500e16aebe5dce6676dc86307d22f662761d8e9f7c5d1276\",\"dweb:/ipfs/QmVkvA4Mt6G1JXxE8ebxKGAjT1WvNbp5QMKg9sUKdrJjhv\"]},\"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\npragma solidity >=0.7.0 <0.9.0;\r\n\r\nimport \"../libs/WitnetV2.sol\";\r\n\r\ninterface IWitnetOracle {\r\n\r\n    /// @notice Estimate the minimum reward required for posting a data request.\r\n    /// @dev Underestimates if the size of returned data is greater than `resultMaxSize`. \r\n    /// @param gasPrice Expected gas price to pay upon posting the data request.\r\n    /// @param resultMaxSize Maximum expected size of returned data (in bytes).  \r\n    function estimateBaseFee(uint256 gasPrice, uint16 resultMaxSize) external view returns (uint256);\r\n\r\n    /// @notice Estimate the minimum reward required for posting a data request.\r\n    /// @dev Fails if the RAD hash was not previously verified on the WitnetRequestBytecodes registry.\r\n    /// @param gasPrice Expected gas price to pay upon posting the data request.\r\n    /// @param radHash The RAD hash of the data request to be solved by Witnet.\r\n    function estimateBaseFee(uint256 gasPrice, bytes32 radHash) external view returns (uint256);\r\n    \r\n    /// @notice Estimate the minimum reward required for posting a data request with a callback.\r\n    /// @param gasPrice Expected gas price to pay upon posting the data request.\r\n    /// @param callbackGasLimit Maximum gas to be spent when reporting the data request result.\r\n    function estimateBaseFeeWithCallback(uint256 gasPrice, uint24 callbackGasLimit) external view returns (uint256);\r\n       \r\n    /// @notice Retrieves a copy of all Witnet-provable data related to a previously posted request, \r\n    /// removing the whole query from the WRB storage.\r\n    /// @dev Fails if the query was not in 'Reported' status, or called from an address different to\r\n    /// @dev the one that actually posted the given request.\r\n    /// @param queryId The unique query identifier.\r\n    function fetchQueryResponse(uint256 queryId) external returns (WitnetV2.Response memory);\r\n   \r\n    /// @notice Gets the whole Query data contents, if any, no matter its current status.\r\n    function getQuery(uint256 queryId) external view returns (WitnetV2.Query memory);\r\n\r\n    /// @notice Gets the current EVM reward the report can claim, if not done yet.\r\n    function getQueryEvmReward(uint256 queryId) external view returns (uint256);\r\n\r\n    /// @notice Retrieves the RAD hash and SLA parameters of the given query.\r\n    /// @param queryId The unique query identifier.\r\n    function getQueryRequest(uint256 queryId) external view returns (WitnetV2.Request memory);\r\n\r\n    /// @notice Retrieves the whole `Witnet.Response` record referred to a previously posted Witnet Data Request.\r\n    /// @param queryId The unique query identifier.\r\n    function getQueryResponse(uint256 queryId) external view returns (WitnetV2.Response memory);\r\n\r\n    /// @notice Returns query's result current status from a requester's point of view:\r\n    /// @notice   - 0 => Void: the query is either non-existent or deleted;\r\n    /// @notice   - 1 => Awaiting: the query has not yet been reported;\r\n    /// @notice   - 2 => Ready: the query response was finalized, and contains a result with no erros.\r\n    /// @notice   - 3 => Error: the query response was finalized, and contains a result with errors.\r\n    /// @param queryId The unique query identifier.\r\n    function getQueryResponseStatus(uint256 queryId) external view returns (WitnetV2.ResponseStatus);\r\n\r\n    /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query.\r\n    /// @param queryId The unique query identifier.\r\n    function getQueryResultCborBytes(uint256 queryId) external view returns (bytes memory);\r\n\r\n    /// @notice Gets error code identifying some possible failure on the resolution of the given query.\r\n    /// @param queryId The unique query identifier.\r\n    function getQueryResultError(uint256 queryId) external view returns (Witnet.ResultError memory);\r\n\r\n    /// @notice Gets current status of given query.\r\n    function getQueryStatus(uint256 queryId) external view returns (WitnetV2.QueryStatus);\r\n    \r\n    /// @notice Get current status of all given query ids.\r\n    function getQueryStatusBatch(uint256[] calldata queryIds) external view returns (WitnetV2.QueryStatus[] memory);\r\n\r\n    /// @notice Returns next query id to be generated by the Witnet Request Board.\r\n    function getNextQueryId() external view returns (uint256);\r\n\r\n    /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and \r\n    /// @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be \r\n    /// @notice transferred to the reporter who relays back the Witnet-provable result to this request.\r\n    /// @dev Reasons to fail:\r\n    /// @dev - the RAD hash was not previously verified by the WitnetRequestBytecodes registry;\r\n    /// @dev - invalid SLA parameters were provided;\r\n    /// @dev - insufficient value is paid as reward.\r\n    /// @param queryRAD The RAD hash of the data request to be solved by Witnet.\r\n    /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain.\r\n    /// @return queryId Unique query identifier.\r\n    function postRequest(\r\n            bytes32 queryRAD, \r\n            WitnetV2.RadonSLA calldata querySLA\r\n        ) external payable returns (uint256 queryId);\r\n\r\n    /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by \r\n    /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the \r\n    /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported\r\n    /// @notice directly to the requesting contract. If the report callback fails for any reason, an `WitnetQueryResponseDeliveryFailed`\r\n    /// @notice will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result.\r\n    /// @dev Reasons to fail:\r\n    /// @dev - the caller is not a contract implementing the IWitnetConsumer interface;\r\n    /// @dev - the RAD hash was not previously verified by the WitnetRequestBytecodes registry;\r\n    /// @dev - invalid SLA parameters were provided;\r\n    /// @dev - insufficient value is paid as reward.\r\n    /// @param queryRAD The RAD hash of the data request to be solved by Witnet.\r\n    /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain.\r\n    /// @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result.\r\n    /// @return queryId Unique query identifier.\r\n    function postRequestWithCallback(\r\n            bytes32 queryRAD, \r\n            WitnetV2.RadonSLA calldata querySLA, \r\n            uint24 queryCallbackGasLimit\r\n        ) external payable returns (uint256 queryId);\r\n\r\n    /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by \r\n    /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the \r\n    /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported\r\n    /// @notice directly to the requesting contract. If the report callback fails for any reason, a `WitnetQueryResponseDeliveryFailed`\r\n    /// @notice event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result.\r\n    /// @dev Reasons to fail:\r\n    /// @dev - the caller is not a contract implementing the IWitnetConsumer interface;\r\n    /// @dev - the provided bytecode is empty;\r\n    /// @dev - invalid SLA parameters were provided;\r\n    /// @dev - insufficient value is paid as reward.\r\n    /// @param queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain.\r\n    /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain.\r\n    /// @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result.\r\n    /// @return queryId Unique query identifier.\r\n    function postRequestWithCallback(\r\n            bytes calldata queryUnverifiedBytecode,\r\n            WitnetV2.RadonSLA calldata querySLA, \r\n            uint24 queryCallbackGasLimit\r\n        ) external payable returns (uint256 queryId);\r\n\r\n    /// @notice Increments the reward of a previously posted request by adding the transaction value to it.\r\n    /// @param queryId The unique query identifier.\r\n    function upgradeQueryEvmReward(uint256 queryId) external payable;\r\n\r\n}\r\n",
  "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\interfaces\\IWitnetOracle.sol",
  "ast": {
    "absolutePath": "project:/contracts/interfaces/IWitnetOracle.sol",
    "exportedSymbols": {
      "IWitnetOracle": [
        13265
      ],
      "Witnet": [
        17557
      ],
      "WitnetBuffer": [
        19191
      ],
      "WitnetCBOR": [
        20734
      ],
      "WitnetV2": [
        23640
      ]
    },
    "id": 13266,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 13094,
        "literals": [
          "solidity",
          ">=",
          "0.7",
          ".0",
          "<",
          "0.9",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "33:31:49"
      },
      {
        "absolutePath": "project:/contracts/libs/WitnetV2.sol",
        "file": "../libs/WitnetV2.sol",
        "id": 13095,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 13266,
        "sourceUnit": 23641,
        "src": "68:30:49",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "canonicalName": "IWitnetOracle",
        "contractDependencies": [],
        "contractKind": "interface",
        "fullyImplemented": false,
        "id": 13265,
        "linearizedBaseContracts": [
          13265
        ],
        "name": "IWitnetOracle",
        "nameLocation": "112:13:49",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "documentation": {
              "id": 13096,
              "nodeType": "StructuredDocumentation",
              "src": "135:333:49",
              "text": "@notice Estimate the minimum reward required for posting a data request.\n @dev Underestimates if the size of returned data is greater than `resultMaxSize`. \n @param gasPrice Expected gas price to pay upon posting the data request.\n @param resultMaxSize Maximum expected size of returned data (in bytes).  "
            },
            "functionSelector": "7bd88218",
            "id": 13105,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "estimateBaseFee",
            "nameLocation": "483:15:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13098,
                  "mutability": "mutable",
                  "name": "gasPrice",
                  "nameLocation": "507:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13105,
                  "src": "499:16:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13097,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "499:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13100,
                  "mutability": "mutable",
                  "name": "resultMaxSize",
                  "nameLocation": "524:13:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13105,
                  "src": "517:20:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint16",
                    "typeString": "uint16"
                  },
                  "typeName": {
                    "id": 13099,
                    "name": "uint16",
                    "nodeType": "ElementaryTypeName",
                    "src": "517:6:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "498:40:49"
            },
            "returnParameters": {
              "id": 13104,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13103,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13105,
                  "src": "562:7:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13102,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "562:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "561:9:49"
            },
            "scope": 13265,
            "src": "474:97:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13106,
              "nodeType": "StructuredDocumentation",
              "src": "579:343:49",
              "text": "@notice Estimate the minimum reward required for posting a data request.\n @dev Fails if the RAD hash was not previously verified on the WitnetRequestBytecodes registry.\n @param gasPrice Expected gas price to pay upon posting the data request.\n @param radHash The RAD hash of the data request to be solved by Witnet."
            },
            "functionSelector": "9cc56e67",
            "id": 13115,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "estimateBaseFee",
            "nameLocation": "937:15:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13111,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13108,
                  "mutability": "mutable",
                  "name": "gasPrice",
                  "nameLocation": "961:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13115,
                  "src": "953:16:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13107,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "953:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13110,
                  "mutability": "mutable",
                  "name": "radHash",
                  "nameLocation": "979:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13115,
                  "src": "971:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13109,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "971:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "952:35:49"
            },
            "returnParameters": {
              "id": 13114,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13113,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13115,
                  "src": "1011:7:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13112,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1010:9:49"
            },
            "scope": 13265,
            "src": "928:92:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13116,
              "nodeType": "StructuredDocumentation",
              "src": "1032:271:49",
              "text": "@notice Estimate the minimum reward required for posting a data request with a callback.\n @param gasPrice Expected gas price to pay upon posting the data request.\n @param callbackGasLimit Maximum gas to be spent when reporting the data request result."
            },
            "functionSelector": "05e742ef",
            "id": 13125,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "estimateBaseFeeWithCallback",
            "nameLocation": "1318:27:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13121,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13118,
                  "mutability": "mutable",
                  "name": "gasPrice",
                  "nameLocation": "1354:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13125,
                  "src": "1346:16:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13117,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1346:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13120,
                  "mutability": "mutable",
                  "name": "callbackGasLimit",
                  "nameLocation": "1371:16:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13125,
                  "src": "1364:23:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 13119,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "1364:6:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1345:43:49"
            },
            "returnParameters": {
              "id": 13124,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13123,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13125,
                  "src": "1412:7:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13122,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1412:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1411:9:49"
            },
            "scope": 13265,
            "src": "1309:112:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13126,
              "nodeType": "StructuredDocumentation",
              "src": "1436:370:49",
              "text": "@notice Retrieves a copy of all Witnet-provable data related to a previously posted request, \n removing the whole query from the WRB storage.\n @dev Fails if the query was not in 'Reported' status, or called from an address different to\n @dev the one that actually posted the given request.\n @param queryId The unique query identifier."
            },
            "functionSelector": "08b7e85e",
            "id": 13134,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "fetchQueryResponse",
            "nameLocation": "1821:18:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13129,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13128,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "1848:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13134,
                  "src": "1840:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13127,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1840:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1839:17:49"
            },
            "returnParameters": {
              "id": 13133,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13132,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13134,
                  "src": "1875:24:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Response_$23488_memory_ptr",
                    "typeString": "struct WitnetV2.Response"
                  },
                  "typeName": {
                    "id": 13131,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13130,
                      "name": "WitnetV2.Response",
                      "nameLocations": [
                        "1875:8:49",
                        "1884:8:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23488,
                      "src": "1875:17:49"
                    },
                    "referencedDeclaration": 23488,
                    "src": "1875:17:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Response_$23488_storage_ptr",
                      "typeString": "struct WitnetV2.Response"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1874:26:49"
            },
            "scope": 13265,
            "src": "1812:89:49",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13135,
              "nodeType": "StructuredDocumentation",
              "src": "1912:85:49",
              "text": "@notice Gets the whole Query data contents, if any, no matter its current status."
            },
            "functionSelector": "aeb2ffc1",
            "id": 13143,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQuery",
            "nameLocation": "2012:8:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13138,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13137,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "2029:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13143,
                  "src": "2021:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13136,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2021:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2020:17:49"
            },
            "returnParameters": {
              "id": 13142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13141,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13143,
                  "src": "2061:21:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Query_$23455_memory_ptr",
                    "typeString": "struct WitnetV2.Query"
                  },
                  "typeName": {
                    "id": 13140,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13139,
                      "name": "WitnetV2.Query",
                      "nameLocations": [
                        "2061:8:49",
                        "2070:5:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23455,
                      "src": "2061:14:49"
                    },
                    "referencedDeclaration": 23455,
                    "src": "2061:14:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Query_$23455_storage_ptr",
                      "typeString": "struct WitnetV2.Query"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2060:23:49"
            },
            "scope": 13265,
            "src": "2003:81:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13144,
              "nodeType": "StructuredDocumentation",
              "src": "2092:78:49",
              "text": "@notice Gets the current EVM reward the report can claim, if not done yet."
            },
            "functionSelector": "6fdaab7e",
            "id": 13151,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryEvmReward",
            "nameLocation": "2185:17:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13147,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13146,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "2211:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13151,
                  "src": "2203:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13145,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2203:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2202:17:49"
            },
            "returnParameters": {
              "id": 13150,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13149,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13151,
                  "src": "2243:7:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13148,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2243:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2242:9:49"
            },
            "scope": 13265,
            "src": "2176:76:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13152,
              "nodeType": "StructuredDocumentation",
              "src": "2260:126:49",
              "text": "@notice Retrieves the RAD hash and SLA parameters of the given query.\n @param queryId The unique query identifier."
            },
            "functionSelector": "0aa4112a",
            "id": 13160,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryRequest",
            "nameLocation": "2401:15:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13155,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13154,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "2425:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13160,
                  "src": "2417:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13153,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2417:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2416:17:49"
            },
            "returnParameters": {
              "id": 13159,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13158,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13160,
                  "src": "2457:23:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Request_$23476_memory_ptr",
                    "typeString": "struct WitnetV2.Request"
                  },
                  "typeName": {
                    "id": 13157,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13156,
                      "name": "WitnetV2.Request",
                      "nameLocations": [
                        "2457:8:49",
                        "2466:7:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23476,
                      "src": "2457:16:49"
                    },
                    "referencedDeclaration": 23476,
                    "src": "2457:16:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Request_$23476_storage_ptr",
                      "typeString": "struct WitnetV2.Request"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2456:25:49"
            },
            "scope": 13265,
            "src": "2392:90:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13161,
              "nodeType": "StructuredDocumentation",
              "src": "2490:162:49",
              "text": "@notice Retrieves the whole `Witnet.Response` record referred to a previously posted Witnet Data Request.\n @param queryId The unique query identifier."
            },
            "functionSelector": "f61921b2",
            "id": 13169,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryResponse",
            "nameLocation": "2667:16:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13164,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13163,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "2692:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13169,
                  "src": "2684:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13162,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2684:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2683:17:49"
            },
            "returnParameters": {
              "id": 13168,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13167,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13169,
                  "src": "2724:24:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Response_$23488_memory_ptr",
                    "typeString": "struct WitnetV2.Response"
                  },
                  "typeName": {
                    "id": 13166,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13165,
                      "name": "WitnetV2.Response",
                      "nameLocations": [
                        "2724:8:49",
                        "2733:8:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23488,
                      "src": "2724:17:49"
                    },
                    "referencedDeclaration": 23488,
                    "src": "2724:17:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Response_$23488_storage_ptr",
                      "typeString": "struct WitnetV2.Response"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2723:26:49"
            },
            "scope": 13265,
            "src": "2658:92:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13170,
              "nodeType": "StructuredDocumentation",
              "src": "2758:492:49",
              "text": "@notice Returns query's result current status from a requester's point of view:\n @notice   - 0 => Void: the query is either non-existent or deleted;\n @notice   - 1 => Awaiting: the query has not yet been reported;\n @notice   - 2 => Ready: the query response was finalized, and contains a result with no erros.\n @notice   - 3 => Error: the query response was finalized, and contains a result with errors.\n @param queryId The unique query identifier."
            },
            "functionSelector": "234fe6e3",
            "id": 13178,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryResponseStatus",
            "nameLocation": "3265:22:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13173,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13172,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "3296:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13178,
                  "src": "3288:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13171,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3288:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3287:17:49"
            },
            "returnParameters": {
              "id": 13177,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13176,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13178,
                  "src": "3328:23:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                    "typeString": "enum WitnetV2.ResponseStatus"
                  },
                  "typeName": {
                    "id": 13175,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13174,
                      "name": "WitnetV2.ResponseStatus",
                      "nameLocations": [
                        "3328:8:49",
                        "3337:14:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23496,
                      "src": "3328:23:49"
                    },
                    "referencedDeclaration": 23496,
                    "src": "3328:23:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                      "typeString": "enum WitnetV2.ResponseStatus"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3327:25:49"
            },
            "scope": 13265,
            "src": "3256:97:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13179,
              "nodeType": "StructuredDocumentation",
              "src": "3361:156:49",
              "text": "@notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query.\n @param queryId The unique query identifier."
            },
            "functionSelector": "8d3d8b38",
            "id": 13186,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryResultCborBytes",
            "nameLocation": "3532:23:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13182,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13181,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "3564:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13186,
                  "src": "3556:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13180,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3556:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3555:17:49"
            },
            "returnParameters": {
              "id": 13185,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13184,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13186,
                  "src": "3596:12:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 13183,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3596:5:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3595:14:49"
            },
            "scope": 13265,
            "src": "3523:87:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13187,
              "nodeType": "StructuredDocumentation",
              "src": "3618:152:49",
              "text": "@notice Gets error code identifying some possible failure on the resolution of the given query.\n @param queryId The unique query identifier."
            },
            "functionSelector": "a77fc1a4",
            "id": 13195,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryResultError",
            "nameLocation": "3785:19:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13190,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13189,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "3813:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13195,
                  "src": "3805:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13188,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3805:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3804:17:49"
            },
            "returnParameters": {
              "id": 13194,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13193,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13195,
                  "src": "3845:25:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_ResultError_$16055_memory_ptr",
                    "typeString": "struct Witnet.ResultError"
                  },
                  "typeName": {
                    "id": 13192,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13191,
                      "name": "Witnet.ResultError",
                      "nameLocations": [
                        "3845:6:49",
                        "3852:11:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 16055,
                      "src": "3845:18:49"
                    },
                    "referencedDeclaration": 16055,
                    "src": "3845:18:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_ResultError_$16055_storage_ptr",
                      "typeString": "struct Witnet.ResultError"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3844:27:49"
            },
            "scope": 13265,
            "src": "3776:96:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13196,
              "nodeType": "StructuredDocumentation",
              "src": "3880:47:49",
              "text": "@notice Gets current status of given query."
            },
            "functionSelector": "6f07abcc",
            "id": 13204,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryStatus",
            "nameLocation": "3942:14:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13199,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13198,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "3965:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13204,
                  "src": "3957:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13197,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3957:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3956:17:49"
            },
            "returnParameters": {
              "id": 13203,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13202,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13204,
                  "src": "3997:20:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_QueryStatus_$23461",
                    "typeString": "enum WitnetV2.QueryStatus"
                  },
                  "typeName": {
                    "id": 13201,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13200,
                      "name": "WitnetV2.QueryStatus",
                      "nameLocations": [
                        "3997:8:49",
                        "4006:11:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23461,
                      "src": "3997:20:49"
                    },
                    "referencedDeclaration": 23461,
                    "src": "3997:20:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_QueryStatus_$23461",
                      "typeString": "enum WitnetV2.QueryStatus"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3996:22:49"
            },
            "scope": 13265,
            "src": "3933:86:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13205,
              "nodeType": "StructuredDocumentation",
              "src": "4031:54:49",
              "text": "@notice Get current status of all given query ids."
            },
            "functionSelector": "581f5094",
            "id": 13215,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getQueryStatusBatch",
            "nameLocation": "4100:19:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13209,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13208,
                  "mutability": "mutable",
                  "name": "queryIds",
                  "nameLocation": "4139:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13215,
                  "src": "4120:27:49",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                    "typeString": "uint256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 13206,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "4120:7:49",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 13207,
                    "nodeType": "ArrayTypeName",
                    "src": "4120:9:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                      "typeString": "uint256[]"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4119:29:49"
            },
            "returnParameters": {
              "id": 13214,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13213,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13215,
                  "src": "4172:29:49",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_enum$_QueryStatus_$23461_$dyn_memory_ptr",
                    "typeString": "enum WitnetV2.QueryStatus[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 13211,
                      "nodeType": "UserDefinedTypeName",
                      "pathNode": {
                        "id": 13210,
                        "name": "WitnetV2.QueryStatus",
                        "nameLocations": [
                          "4172:8:49",
                          "4181:11:49"
                        ],
                        "nodeType": "IdentifierPath",
                        "referencedDeclaration": 23461,
                        "src": "4172:20:49"
                      },
                      "referencedDeclaration": 23461,
                      "src": "4172:20:49",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_QueryStatus_$23461",
                        "typeString": "enum WitnetV2.QueryStatus"
                      }
                    },
                    "id": 13212,
                    "nodeType": "ArrayTypeName",
                    "src": "4172:22:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_enum$_QueryStatus_$23461_$dyn_storage_ptr",
                      "typeString": "enum WitnetV2.QueryStatus[]"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4171:31:49"
            },
            "scope": 13265,
            "src": "4091:112:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13216,
              "nodeType": "StructuredDocumentation",
              "src": "4211:78:49",
              "text": "@notice Returns next query id to be generated by the Witnet Request Board."
            },
            "functionSelector": "c805dd0f",
            "id": 13221,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getNextQueryId",
            "nameLocation": "4304:14:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13217,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4318:2:49"
            },
            "returnParameters": {
              "id": 13220,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13219,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13221,
                  "src": "4344:7:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13218,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4344:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4343:9:49"
            },
            "scope": 13265,
            "src": "4295:58:49",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13222,
              "nodeType": "StructuredDocumentation",
              "src": "4361:791:49",
              "text": "@notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and \n @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be \n @notice transferred to the reporter who relays back the Witnet-provable result to this request.\n @dev Reasons to fail:\n @dev - the RAD hash was not previously verified by the WitnetRequestBytecodes registry;\n @dev - invalid SLA parameters were provided;\n @dev - insufficient value is paid as reward.\n @param queryRAD The RAD hash of the data request to be solved by Witnet.\n @param querySLA The data query SLA to be fulfilled on the Witnet blockchain.\n @return queryId Unique query identifier."
            },
            "functionSelector": "3dc2b7a2",
            "id": 13232,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "postRequest",
            "nameLocation": "5167:11:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13228,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13224,
                  "mutability": "mutable",
                  "name": "queryRAD",
                  "nameLocation": "5201:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13232,
                  "src": "5193:16:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13223,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "5193:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13227,
                  "mutability": "mutable",
                  "name": "querySLA",
                  "nameLocation": "5252:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13232,
                  "src": "5225:35:49",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_RadonSLA_$23503_calldata_ptr",
                    "typeString": "struct WitnetV2.RadonSLA"
                  },
                  "typeName": {
                    "id": 13226,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13225,
                      "name": "WitnetV2.RadonSLA",
                      "nameLocations": [
                        "5225:8:49",
                        "5234:8:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23503,
                      "src": "5225:17:49"
                    },
                    "referencedDeclaration": 23503,
                    "src": "5225:17:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr",
                      "typeString": "struct WitnetV2.RadonSLA"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5178:93:49"
            },
            "returnParameters": {
              "id": 13231,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13230,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "5306:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13232,
                  "src": "5298:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13229,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5298:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5297:17:49"
            },
            "scope": 13265,
            "src": "5158:157:49",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13233,
              "nodeType": "StructuredDocumentation",
              "src": "5323:1296:49",
              "text": "@notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by \n @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the \n @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported\n @notice directly to the requesting contract. If the report callback fails for any reason, an `WitnetQueryResponseDeliveryFailed`\n @notice will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result.\n @dev Reasons to fail:\n @dev - the caller is not a contract implementing the IWitnetConsumer interface;\n @dev - the RAD hash was not previously verified by the WitnetRequestBytecodes registry;\n @dev - invalid SLA parameters were provided;\n @dev - insufficient value is paid as reward.\n @param queryRAD The RAD hash of the data request to be solved by Witnet.\n @param querySLA The data query SLA to be fulfilled on the Witnet blockchain.\n @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result.\n @return queryId Unique query identifier."
            },
            "functionSelector": "e900aa33",
            "id": 13245,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "postRequestWithCallback",
            "nameLocation": "6634:23:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13241,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13235,
                  "mutability": "mutable",
                  "name": "queryRAD",
                  "nameLocation": "6680:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13245,
                  "src": "6672:16:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13234,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6672:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13238,
                  "mutability": "mutable",
                  "name": "querySLA",
                  "nameLocation": "6731:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13245,
                  "src": "6704:35:49",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_RadonSLA_$23503_calldata_ptr",
                    "typeString": "struct WitnetV2.RadonSLA"
                  },
                  "typeName": {
                    "id": 13237,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13236,
                      "name": "WitnetV2.RadonSLA",
                      "nameLocations": [
                        "6704:8:49",
                        "6713:8:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23503,
                      "src": "6704:17:49"
                    },
                    "referencedDeclaration": 23503,
                    "src": "6704:17:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr",
                      "typeString": "struct WitnetV2.RadonSLA"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13240,
                  "mutability": "mutable",
                  "name": "queryCallbackGasLimit",
                  "nameLocation": "6762:21:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13245,
                  "src": "6755:28:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 13239,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "6755:6:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6657:137:49"
            },
            "returnParameters": {
              "id": 13244,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13243,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "6829:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13245,
                  "src": "6821:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13242,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6821:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6820:17:49"
            },
            "scope": 13265,
            "src": "6625:213:49",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13246,
              "nodeType": "StructuredDocumentation",
              "src": "6846:1303:49",
              "text": "@notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by \n @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the \n @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported\n @notice directly to the requesting contract. If the report callback fails for any reason, a `WitnetQueryResponseDeliveryFailed`\n @notice event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result.\n @dev Reasons to fail:\n @dev - the caller is not a contract implementing the IWitnetConsumer interface;\n @dev - the provided bytecode is empty;\n @dev - invalid SLA parameters were provided;\n @dev - insufficient value is paid as reward.\n @param queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain.\n @param querySLA The data query SLA to be fulfilled on the Witnet blockchain.\n @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result.\n @return queryId Unique query identifier."
            },
            "functionSelector": "a3ff5b00",
            "id": 13258,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "postRequestWithCallback",
            "nameLocation": "8164:23:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13254,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13248,
                  "mutability": "mutable",
                  "name": "queryUnverifiedBytecode",
                  "nameLocation": "8217:23:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13258,
                  "src": "8202:38:49",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 13247,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8202:5:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13251,
                  "mutability": "mutable",
                  "name": "querySLA",
                  "nameLocation": "8282:8:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13258,
                  "src": "8255:35:49",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_RadonSLA_$23503_calldata_ptr",
                    "typeString": "struct WitnetV2.RadonSLA"
                  },
                  "typeName": {
                    "id": 13250,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13249,
                      "name": "WitnetV2.RadonSLA",
                      "nameLocations": [
                        "8255:8:49",
                        "8264:8:49"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23503,
                      "src": "8255:17:49"
                    },
                    "referencedDeclaration": 23503,
                    "src": "8255:17:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr",
                      "typeString": "struct WitnetV2.RadonSLA"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13253,
                  "mutability": "mutable",
                  "name": "queryCallbackGasLimit",
                  "nameLocation": "8313:21:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13258,
                  "src": "8306:28:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 13252,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "8306:6:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8187:158:49"
            },
            "returnParameters": {
              "id": 13257,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13256,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "8380:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13258,
                  "src": "8372:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13255,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8372:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8371:17:49"
            },
            "scope": 13265,
            "src": "8155:234:49",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13259,
              "nodeType": "StructuredDocumentation",
              "src": "8397:156:49",
              "text": "@notice Increments the reward of a previously posted request by adding the transaction value to it.\n @param queryId The unique query identifier."
            },
            "functionSelector": "ec5946db",
            "id": 13264,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "upgradeQueryEvmReward",
            "nameLocation": "8568:21:49",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13262,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13261,
                  "mutability": "mutable",
                  "name": "queryId",
                  "nameLocation": "8598:7:49",
                  "nodeType": "VariableDeclaration",
                  "scope": 13264,
                  "src": "8590:15:49",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13260,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8590:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8589:17:49"
            },
            "returnParameters": {
              "id": 13263,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8623:0:49"
            },
            "scope": 13265,
            "src": "8559:65:49",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          }
        ],
        "scope": 13266,
        "src": "102:8527:49",
        "usedErrors": [],
        "usedEvents": []
      }
    ],
    "src": "33:8598:49"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.25+commit.b61c2a91.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2024-12-05T09:36:04.500Z",
  "devdoc": {
    "kind": "dev",
    "methods": {
      "estimateBaseFee(uint256,bytes32)": {
        "details": "Fails if the RAD hash was not previously verified on the WitnetRequestBytecodes registry.",
        "params": {
          "gasPrice": "Expected gas price to pay upon posting the data request.",
          "radHash": "The RAD hash of the data request to be solved by Witnet."
        }
      },
      "estimateBaseFee(uint256,uint16)": {
        "details": "Underestimates if the size of returned data is greater than `resultMaxSize`. ",
        "params": {
          "gasPrice": "Expected gas price to pay upon posting the data request.",
          "resultMaxSize": "Maximum expected size of returned data (in bytes).  "
        }
      },
      "estimateBaseFeeWithCallback(uint256,uint24)": {
        "params": {
          "callbackGasLimit": "Maximum gas to be spent when reporting the data request result.",
          "gasPrice": "Expected gas price to pay upon posting the data request."
        }
      },
      "fetchQueryResponse(uint256)": {
        "details": "Fails if the query was not in 'Reported' status, or called from an address different tothe one that actually posted the given request.",
        "params": {
          "queryId": "The unique query identifier."
        }
      },
      "getQueryRequest(uint256)": {
        "params": {
          "queryId": "The unique query identifier."
        }
      },
      "getQueryResponse(uint256)": {
        "params": {
          "queryId": "The unique query identifier."
        }
      },
      "getQueryResponseStatus(uint256)": {
        "params": {
          "queryId": "The unique query identifier."
        }
      },
      "getQueryResultCborBytes(uint256)": {
        "params": {
          "queryId": "The unique query identifier."
        }
      },
      "getQueryResultError(uint256)": {
        "params": {
          "queryId": "The unique query identifier."
        }
      },
      "postRequest(bytes32,(uint8,uint64))": {
        "details": "Reasons to fail:- the RAD hash was not previously verified by the WitnetRequestBytecodes registry;- invalid SLA parameters were provided;- insufficient value is paid as reward.",
        "params": {
          "queryRAD": "The RAD hash of the data request to be solved by Witnet.",
          "querySLA": "The data query SLA to be fulfilled on the Witnet blockchain."
        },
        "returns": {
          "queryId": "Unique query identifier."
        }
      },
      "postRequestWithCallback(bytes,(uint8,uint64),uint24)": {
        "details": "Reasons to fail:- the caller is not a contract implementing the IWitnetConsumer interface;- the provided bytecode is empty;- invalid SLA parameters were provided;- insufficient value is paid as reward.",
        "params": {
          "queryCallbackGasLimit": "Maximum gas to be spent when reporting the data request result.",
          "querySLA": "The data query SLA to be fulfilled on the Witnet blockchain.",
          "queryUnverifiedBytecode": "The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain."
        },
        "returns": {
          "queryId": "Unique query identifier."
        }
      },
      "postRequestWithCallback(bytes32,(uint8,uint64),uint24)": {
        "details": "Reasons to fail:- the caller is not a contract implementing the IWitnetConsumer interface;- the RAD hash was not previously verified by the WitnetRequestBytecodes registry;- invalid SLA parameters were provided;- insufficient value is paid as reward.",
        "params": {
          "queryCallbackGasLimit": "Maximum gas to be spent when reporting the data request result.",
          "queryRAD": "The RAD hash of the data request to be solved by Witnet.",
          "querySLA": "The data query SLA to be fulfilled on the Witnet blockchain."
        },
        "returns": {
          "queryId": "Unique query identifier."
        }
      },
      "upgradeQueryEvmReward(uint256)": {
        "params": {
          "queryId": "The unique query identifier."
        }
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {
      "estimateBaseFee(uint256,bytes32)": {
        "notice": "Estimate the minimum reward required for posting a data request."
      },
      "estimateBaseFee(uint256,uint16)": {
        "notice": "Estimate the minimum reward required for posting a data request."
      },
      "estimateBaseFeeWithCallback(uint256,uint24)": {
        "notice": "Estimate the minimum reward required for posting a data request with a callback."
      },
      "fetchQueryResponse(uint256)": {
        "notice": "Retrieves a copy of all Witnet-provable data related to a previously posted request,  removing the whole query from the WRB storage."
      },
      "getNextQueryId()": {
        "notice": "Returns next query id to be generated by the Witnet Request Board."
      },
      "getQuery(uint256)": {
        "notice": "Gets the whole Query data contents, if any, no matter its current status."
      },
      "getQueryEvmReward(uint256)": {
        "notice": "Gets the current EVM reward the report can claim, if not done yet."
      },
      "getQueryRequest(uint256)": {
        "notice": "Retrieves the RAD hash and SLA parameters of the given query."
      },
      "getQueryResponse(uint256)": {
        "notice": "Retrieves the whole `Witnet.Response` record referred to a previously posted Witnet Data Request."
      },
      "getQueryResponseStatus(uint256)": {
        "notice": "Returns query's result current status from a requester's point of view:- 0 => Void: the query is either non-existent or deleted;- 1 => Awaiting: the query has not yet been reported;- 2 => Ready: the query response was finalized, and contains a result with no erros.- 3 => Error: the query response was finalized, and contains a result with errors."
      },
      "getQueryResultCborBytes(uint256)": {
        "notice": "Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query."
      },
      "getQueryResultError(uint256)": {
        "notice": "Gets error code identifying some possible failure on the resolution of the given query."
      },
      "getQueryStatus(uint256)": {
        "notice": "Gets current status of given query."
      },
      "getQueryStatusBatch(uint256[])": {
        "notice": "Get current status of all given query ids."
      },
      "postRequest(bytes32,(uint8,uint64))": {
        "notice": "Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provable result to this request."
      },
      "postRequestWithCallback(bytes,(uint8,uint64),uint24)": {
        "notice": "Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reporteddirectly to the requesting contract. If the report callback fails for any reason, a `WitnetQueryResponseDeliveryFailed`event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result."
      },
      "postRequestWithCallback(bytes32,(uint8,uint64),uint24)": {
        "notice": "Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reporteddirectly to the requesting contract. If the report callback fails for any reason, an `WitnetQueryResponseDeliveryFailed`will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result."
      },
      "upgradeQueryEvmReward(uint256)": {
        "notice": "Increments the reward of a previously posted request by adding the transaction value to it."
      }
    },
    "version": 1
  }
}