{
  "contractName": "WitnetOracle",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmReward",
          "type": "uint256"
        },
        {
          "components": [
            {
              "internalType": "uint8",
              "name": "committeeSize",
              "type": "uint8"
            },
            {
              "internalType": "uint64",
              "name": "witnessingFeeNanoWit",
              "type": "uint64"
            }
          ],
          "indexed": false,
          "internalType": "struct WitnetV2.RadonSLA",
          "name": "witnetSLA",
          "type": "tuple"
        }
      ],
      "name": "WitnetQuery",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        }
      ],
      "name": "WitnetQueryResponse",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmCallbackGas",
          "type": "uint256"
        }
      ],
      "name": "WitnetQueryResponseDelivered",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "resultCborBytes",
          "type": "bytes"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmCallbackActualGas",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "string",
          "name": "evmCallbackRevertReason",
          "type": "string"
        }
      ],
      "name": "WitnetQueryResponseDeliveryFailed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "evmReward",
          "type": "uint256"
        }
      ],
      "name": "WitnetQueryRewardUpgraded",
      "type": "event"
    },
    {
      "inputs": [
        {
          "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"
    },
    {
      "inputs": [],
      "name": "class",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "channel",
      "outputs": [
        {
          "internalType": "bytes4",
          "name": "",
          "type": "bytes4"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "factory",
      "outputs": [
        {
          "internalType": "contract WitnetRequestFactory",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "registry",
      "outputs": [
        {
          "internalType": "contract WitnetRequestBytecodes",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "specs",
      "outputs": [
        {
          "internalType": "bytes4",
          "name": "",
          "type": "bytes4"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmReward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"witnetSLA\",\"type\":\"tuple\"}],\"name\":\"WitnetQuery\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryResponse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmCallbackGas\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryResponseDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmCallbackActualGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"evmCallbackRevertReason\",\"type\":\"string\"}],\"name\":\"WitnetQueryResponseDeliveryFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmReward\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryRewardUpgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"channel\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"class\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract WitnetRequestFactory\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract WitnetRequestBytecodes\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"specs\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queryId\",\"type\":\"uint256\"}],\"name\":\"upgradeQueryEvmReward\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Witnet Foundation.\",\"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.\"}}},\"title\":\"Witnet Request Board functionality base contract.\",\"version\":1},\"userdoc\":{\"events\":{\"WitnetQuery(uint256,uint256,(uint8,uint64))\":{\"notice\":\"Emitted every time a new query containing some verified data request is posted to the WRB.\"},\"WitnetQueryResponse(uint256,uint256)\":{\"notice\":\"Emitted when a query with no callback gets reported into the WRB.\"},\"WitnetQueryResponseDelivered(uint256,uint256,uint256)\":{\"notice\":\"Emitted when a query with a callback gets successfully reported into the WRB.\"},\"WitnetQueryResponseDeliveryFailed(uint256,bytes,uint256,uint256,string)\":{\"notice\":\"Emitted when a query with a callback cannot get reported into the WRB.\"},\"WitnetQueryRewardUpgraded(uint256,uint256)\":{\"notice\":\"Emitted when the reward of some not-yet reported query is upgraded.\"}},\"kind\":\"user\",\"methods\":{\"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/WitnetOracle.sol\":\"WitnetOracle\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/WitnetOracle.sol\":{\"keccak256\":\"0x84ef8d2ebcba273e4bc23a5ee414a1213df55d1b4e496197a146031fea3a4874\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c4a6e31964ed08c4c9dfe5279b4ffe9eeba6e759f15901e080e174e98e96a7f5\",\"dweb:/ipfs/QmTghzVFf2EHnfnHejgFGRBjanXYcstK9ftVaYmHWJfk8w\"]},\"project:/contracts/WitnetRequestBytecodes.sol\":{\"keccak256\":\"0x2a79d919dd79c0e3f857e6bee08368ad0b463188aced4a52de29270ed0f5f3d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://290d6013ee9f75fedbbb7726527a637ea2ae7a5da0ad118ecc43b298846f0bb0\",\"dweb:/ipfs/QmU8AZtPyctrrvxdmH297p595ZMS6DgcD6djSFKNxAqYMs\"]},\"project:/contracts/WitnetRequestFactory.sol\":{\"keccak256\":\"0x3c66f27d7c1db0e662c37d98005c4cbd871ceb75e97079d7bf673fb75d59c858\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://52adb318b870d0825718125e94fdbdd0e968ced09926420e2543b0ca4c6eb579\",\"dweb:/ipfs/QmYack87Q2UTfQb8KLLEPFBrMJgN2o6PaPqPNSc95McPVH\"]},\"project:/contracts/interfaces/IWitnetOracle.sol\":{\"keccak256\":\"0x5dbb04fce5e05675325232a735c46617378982b48dac2138aca0c6cc95e6e4d5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7447a70455478239500e16aebe5dce6676dc86307d22f662761d8e9f7c5d1276\",\"dweb:/ipfs/QmVkvA4Mt6G1JXxE8ebxKGAjT1WvNbp5QMKg9sUKdrJjhv\"]},\"project:/contracts/interfaces/IWitnetOracleEvents.sol\":{\"keccak256\":\"0x0442f474f253dc1f6bd6a4f153c3adb2abe5f6f0f24c76d1baf666185e61e659\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://535e8efcfc5693669d9bd2b6f62e6fc65aca19b7de355a27152e4362b410540d\",\"dweb:/ipfs/QmVZRXgku1cZewhoucebaiBKAyUjF2dmEzYrzGvjPzbwN9\"]},\"project:/contracts/interfaces/IWitnetRequestBytecodes.sol\":{\"keccak256\":\"0x8da168bee9a78442216965976b1f29087f760f37dcb09337283242599ed1cbca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e120623262ee0559913bdae56c0a7921147dfe08ada7ea81061b14e2fc38c5e1\",\"dweb:/ipfs/Qmbxe8XRrH6ZjJHiR6YYzcZV1jnSWwo9iBYz5r6GJ6To5G\"]},\"project:/contracts/interfaces/IWitnetRequestFactory.sol\":{\"keccak256\":\"0x3b19ec4a976745ba2646e7e1886d647ef30ad678460a712c93bbfb4405b57f1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa759ae15b7d4da622a81d50933474910959ac490d8b63ea2e7ed8608859a9c9\",\"dweb:/ipfs/QmRckCu7eBBP5fn9ff6djs7VbdhFc7sxYb2yqDr4go66jV\"]},\"project:/contracts/libs/Witnet.sol\":{\"keccak256\":\"0x65a87375dd79d63a83fb454b7199b6c999bd59c50b3b59d521c5c4d45a7d3cc3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ca865b681d810c2fc5c3672ea6343c3bdf6fd71764ab824d25994744dc85866b\",\"dweb:/ipfs/QmPGcP3xGTNZfsQ9GSKdujNLRVs8dWDdubyUko1rbQqJNv\"]},\"project:/contracts/libs/WitnetBuffer.sol\":{\"keccak256\":\"0xa14570492eb5a313ddbacae0185c850ec99c67211eb33989a5e21d31bf06a150\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e83c11edb49cab6a767c0b685825bc22ece0d3d2897e0d54fe1923df5cc76ba5\",\"dweb:/ipfs/QmdLDgCc3tnKbgRrXwfNzsg6uUDirNmjvBB8V3iMmnD69a\"]},\"project:/contracts/libs/WitnetCBOR.sol\":{\"keccak256\":\"0xb346547ff731163beea2c657c52675cdf7936691d566a76a045577cf9c34ade0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d4b5b6424a033584b41f1204d635db98fda9ca9bd2a614c9d82539a3e4e6529\",\"dweb:/ipfs/QmW6Qy3wWpzHSECYaCPaf9LWGfPqWDKVoP2kPSNNQu7LMQ\"]},\"project:/contracts/libs/WitnetV2.sol\":{\"keccak256\":\"0xb276a6da373bfbe9cd942dd7e59979cda898215d1e36ab3df95a6d6cc6ff770f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc4890876b9bc64f501ccdd48408bb63724865cb2ce8d2057f6b318540adce7c\",\"dweb:/ipfs/QmPMHPdbCsKBavhiLcaDgQ9EjNSvwwzv8TKffotcCv1ctP\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.7.0 <0.9.0;\r\n\r\nimport \"./WitnetRequestBytecodes.sol\";\r\nimport \"./WitnetRequestFactory.sol\";\r\nimport \"./interfaces/IWitnetOracle.sol\";\r\nimport \"./interfaces/IWitnetOracleEvents.sol\";\r\n\r\n/// @title Witnet Request Board functionality base contract.\r\n/// @author The Witnet Foundation.\r\nabstract contract WitnetOracle\r\n    is\r\n        IWitnetOracle,\r\n        IWitnetOracleEvents\r\n{\r\n    function class() virtual external view returns (string memory) {\r\n        return type(WitnetOracle).name;\r\n    }\r\n    function channel() virtual external view returns (bytes4);\r\n    function factory() virtual external view returns (WitnetRequestFactory);\r\n    function registry() virtual external view returns (WitnetRequestBytecodes);\r\n    function specs() virtual external view returns (bytes4);\r\n}",
  "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\WitnetOracle.sol",
  "ast": {
    "absolutePath": "project:/contracts/WitnetOracle.sol",
    "exportedSymbols": {
      "IWitnetOracle": [
        13265
      ],
      "IWitnetOracleEvents": [
        13315
      ],
      "IWitnetRequestBytecodes": [
        13979
      ],
      "IWitnetRequestFactory": [
        14002
      ],
      "Witnet": [
        17557
      ],
      "WitnetBuffer": [
        19191
      ],
      "WitnetCBOR": [
        20734
      ],
      "WitnetOracle": [
        749
      ],
      "WitnetRequestBytecodes": [
        849
      ],
      "WitnetRequestFactory": [
        880
      ],
      "WitnetV2": [
        23640
      ]
    },
    "id": 750,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 706,
        "literals": [
          "solidity",
          ">=",
          "0.7",
          ".0",
          "<",
          "0.9",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "35:31:9"
      },
      {
        "absolutePath": "project:/contracts/WitnetRequestBytecodes.sol",
        "file": "./WitnetRequestBytecodes.sol",
        "id": 707,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 750,
        "sourceUnit": 850,
        "src": "70:38:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/WitnetRequestFactory.sol",
        "file": "./WitnetRequestFactory.sol",
        "id": 708,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 750,
        "sourceUnit": 881,
        "src": "110:36:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/interfaces/IWitnetOracle.sol",
        "file": "./interfaces/IWitnetOracle.sol",
        "id": 709,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 750,
        "sourceUnit": 13266,
        "src": "148:40:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/interfaces/IWitnetOracleEvents.sol",
        "file": "./interfaces/IWitnetOracleEvents.sol",
        "id": 710,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 750,
        "sourceUnit": 13316,
        "src": "190:46:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 712,
              "name": "IWitnetOracle",
              "nameLocations": [
                "386:13:9"
              ],
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 13265,
              "src": "386:13:9"
            },
            "id": 713,
            "nodeType": "InheritanceSpecifier",
            "src": "386:13:9"
          },
          {
            "baseName": {
              "id": 714,
              "name": "IWitnetOracleEvents",
              "nameLocations": [
                "410:19:9"
              ],
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 13315,
              "src": "410:19:9"
            },
            "id": 715,
            "nodeType": "InheritanceSpecifier",
            "src": "410:19:9"
          }
        ],
        "canonicalName": "WitnetOracle",
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 711,
          "nodeType": "StructuredDocumentation",
          "src": "240:98:9",
          "text": "@title Witnet Request Board functionality base contract.\n @author The Witnet Foundation."
        },
        "fullyImplemented": false,
        "id": 749,
        "linearizedBaseContracts": [
          749,
          13315,
          13265
        ],
        "name": "WitnetOracle",
        "nameLocation": "356:12:9",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 725,
              "nodeType": "Block",
              "src": "501:49:9",
              "statements": [
                {
                  "expression": {
                    "expression": {
                      "arguments": [
                        {
                          "id": 721,
                          "name": "WitnetOracle",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 749,
                          "src": "524:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_WitnetOracle_$749_$",
                            "typeString": "type(contract WitnetOracle)"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_type$_t_contract$_WitnetOracle_$749_$",
                            "typeString": "type(contract WitnetOracle)"
                          }
                        ],
                        "id": 720,
                        "name": "type",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4294967269,
                        "src": "519:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                          "typeString": "function () pure"
                        }
                      },
                      "id": 722,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "nameLocations": [],
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "519:18:9",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetOracle_$749",
                        "typeString": "type(contract WitnetOracle)"
                      }
                    },
                    "id": 723,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberLocation": "538:4:9",
                    "memberName": "name",
                    "nodeType": "MemberAccess",
                    "src": "519:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_memory_ptr",
                      "typeString": "string memory"
                    }
                  },
                  "functionReturnParameters": 719,
                  "id": 724,
                  "nodeType": "Return",
                  "src": "512:30:9"
                }
              ]
            },
            "functionSelector": "bff852fa",
            "id": 726,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "class",
            "nameLocation": "447:5:9",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 716,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "452:2:9"
            },
            "returnParameters": {
              "id": 719,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 718,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 726,
                  "src": "486:13:9",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 717,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "486:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "485:15:9"
            },
            "scope": 749,
            "src": "438:112:9",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "external"
          },
          {
            "functionSelector": "7bbdb96e",
            "id": 731,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "channel",
            "nameLocation": "565:7:9",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 727,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "572:2:9"
            },
            "returnParameters": {
              "id": 730,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 729,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 731,
                  "src": "606:6:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes4",
                    "typeString": "bytes4"
                  },
                  "typeName": {
                    "id": 728,
                    "name": "bytes4",
                    "nodeType": "ElementaryTypeName",
                    "src": "606:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes4",
                      "typeString": "bytes4"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "605:8:9"
            },
            "scope": 749,
            "src": "556:58:9",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "external"
          },
          {
            "functionSelector": "c45a0155",
            "id": 737,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "factory",
            "nameLocation": "629:7:9",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 732,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "636:2:9"
            },
            "returnParameters": {
              "id": 736,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 735,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 737,
                  "src": "670:20:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_WitnetRequestFactory_$880",
                    "typeString": "contract WitnetRequestFactory"
                  },
                  "typeName": {
                    "id": 734,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 733,
                      "name": "WitnetRequestFactory",
                      "nameLocations": [
                        "670:20:9"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 880,
                      "src": "670:20:9"
                    },
                    "referencedDeclaration": 880,
                    "src": "670:20:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetRequestFactory_$880",
                      "typeString": "contract WitnetRequestFactory"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "669:22:9"
            },
            "scope": 749,
            "src": "620:72:9",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "external"
          },
          {
            "functionSelector": "7b103999",
            "id": 743,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "registry",
            "nameLocation": "707:8:9",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 738,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "715:2:9"
            },
            "returnParameters": {
              "id": 742,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 741,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 743,
                  "src": "749:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849",
                    "typeString": "contract WitnetRequestBytecodes"
                  },
                  "typeName": {
                    "id": 740,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 739,
                      "name": "WitnetRequestBytecodes",
                      "nameLocations": [
                        "749:22:9"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 849,
                      "src": "749:22:9"
                    },
                    "referencedDeclaration": 849,
                    "src": "749:22:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849",
                      "typeString": "contract WitnetRequestBytecodes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "748:24:9"
            },
            "scope": 749,
            "src": "698:75:9",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "external"
          },
          {
            "functionSelector": "adb7c3f7",
            "id": 748,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "specs",
            "nameLocation": "788:5:9",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 744,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "793:2:9"
            },
            "returnParameters": {
              "id": 747,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 746,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 748,
                  "src": "827:6:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes4",
                    "typeString": "bytes4"
                  },
                  "typeName": {
                    "id": 745,
                    "name": "bytes4",
                    "nodeType": "ElementaryTypeName",
                    "src": "827:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes4",
                      "typeString": "bytes4"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "826:8:9"
            },
            "scope": 749,
            "src": "779:56:9",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "external"
          }
        ],
        "scope": 750,
        "src": "338:500:9",
        "usedErrors": [],
        "usedEvents": [
          13278,
          13285,
          13294,
          13307,
          13314
        ]
      }
    ],
    "src": "35:803:9"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.25+commit.b61c2a91.Emscripten.clang"
  },
  "networks": {
    "321": {
      "events": {},
      "links": {},
      "address": "0x77703aE126B971c9946d562F41Dd47071dA00777"
    },
    "322": {
      "events": {},
      "links": {},
      "address": "0x77703aE126B971c9946d562F41Dd47071dA00777"
    },
    "11155111": {
      "events": {},
      "links": {},
      "address": "0x77703aE126B971c9946d562F41Dd47071dA00777"
    }
  },
  "schemaVersion": "3.4.16",
  "updatedAt": "2024-12-05T09:36:04.151Z",
  "devdoc": {
    "author": "The Witnet Foundation.",
    "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."
        }
      }
    },
    "title": "Witnet Request Board functionality base contract.",
    "version": 1
  },
  "userdoc": {
    "events": {
      "WitnetQuery(uint256,uint256,(uint8,uint64))": {
        "notice": "Emitted every time a new query containing some verified data request is posted to the WRB."
      },
      "WitnetQueryResponse(uint256,uint256)": {
        "notice": "Emitted when a query with no callback gets reported into the WRB."
      },
      "WitnetQueryResponseDelivered(uint256,uint256,uint256)": {
        "notice": "Emitted when a query with a callback gets successfully reported into the WRB."
      },
      "WitnetQueryResponseDeliveryFailed(uint256,bytes,uint256,uint256,string)": {
        "notice": "Emitted when a query with a callback cannot get reported into the WRB."
      },
      "WitnetQueryRewardUpgraded(uint256,uint256)": {
        "notice": "Emitted when the reward of some not-yet reported query is upgraded."
      }
    },
    "kind": "user",
    "methods": {
      "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
  }
}