{
  "contractName": "IWitnetRandomness",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "evmGasPrice",
          "type": "uint256"
        }
      ],
      "name": "estimateRandomizeFee",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "fetchRandomnessAfter",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "fetchRandomnessAfterProof",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "witnetResultRandomness",
          "type": "bytes32"
        },
        {
          "internalType": "uint64",
          "name": "witnetResultTimestamp",
          "type": "uint64"
        },
        {
          "internalType": "bytes32",
          "name": "witnetResultTallyHash",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "witnetResultFinalityBlock",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getLastRandomizeBlock",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "getRandomizeData",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "witnetQueryId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "prevRandomizeBlock",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "nextRandomizeBlock",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "getRandomizeNextBlock",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "getRandomizePrevBlock",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "getRandomizeStatus",
      "outputs": [
        {
          "internalType": "enum WitnetV2.ResponseStatus",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "isRandomized",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint32",
          "name": "range",
          "type": "uint32"
        },
        {
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "blockNumber",
          "type": "uint256"
        }
      ],
      "name": "random",
      "outputs": [
        {
          "internalType": "uint32",
          "name": "",
          "type": "uint32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "randomize",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "witnet",
      "outputs": [
        {
          "internalType": "contract WitnetOracle",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "witnetQuerySLA",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint8",
              "name": "committeeSize",
              "type": "uint8"
            },
            {
              "internalType": "uint64",
              "name": "witnessingFeeNanoWit",
              "type": "uint64"
            }
          ],
          "internalType": "struct WitnetV2.RadonSLA",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "witnetRadHash",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"}],\"name\":\"estimateRandomizeFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"fetchRandomnessAfter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"fetchRandomnessAfterProof\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"witnetResultRandomness\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"witnetResultTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"witnetResultTallyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"witnetResultFinalityBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastRandomizeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizeData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"witnetQueryId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"prevRandomizeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nextRandomizeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizeNextBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizePrevBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizeStatus\",\"outputs\":[{\"internalType\":\"enum WitnetV2.ResponseStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"isRandomized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"range\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"random\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnet\",\"outputs\":[{\"internalType\":\"contract WitnetOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnetQuerySLA\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnetRadHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Witnet Foundation.\",\"kind\":\"dev\",\"methods\":{\"fetchRandomnessAfter(uint256)\":{\"details\":\"Reverts if:i.   no `randomize()` was requested on neither the given block, nor afterwards.ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.\",\"params\":{\"blockNumber\":\"Block number from which the search will start.\"}},\"fetchRandomnessAfterProof(uint256)\":{\"details\":\"Reverts if:i.   no `randomize()` was requested on neither the given block, nor afterwards.ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.\",\"params\":{\"blockNumber\":\"Block number from which the search will start.\"},\"returns\":{\"witnetResultFinalityBlock\":\"EVM block number from which the provided randomness can be considered to be final.\",\"witnetResultRandomness\":\"Random value provided by the Witnet blockchain and used for solving randomness after given block.\",\"witnetResultTallyHash\":\"Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.\",\"witnetResultTimestamp\":\"Timestamp at which the randomness value was generated by the Witnet blockchain.\"}},\"getRandomizeData(uint256)\":{\"details\":\"Returns zero values if no randomize request was actually posted on the given block.\",\"returns\":{\"nextRandomizeBlock\":\"Block number in which a randomize request got posted just after this one, 0 if none.\",\"prevRandomizeBlock\":\"Block number in which a randomize request got posted just before this one. 0 if none.\",\"witnetQueryId\":\"Identifier of the underlying Witnet query created on the given block number. \"}},\"getRandomizeNextBlock(uint256)\":{\"params\":{\"blockNumber\":\"Block number from which the search will start.\"},\"returns\":{\"_0\":\"Number of the first block found after the given one, or `0` otherwise.\"}},\"getRandomizePrevBlock(uint256)\":{\"params\":{\"blockNumber\":\"Block number from which the search will start.\"},\"returns\":{\"_0\":\"First block found before the given one, or `0` otherwise.\"}},\"getRandomizeStatus(uint256)\":{\"details\":\"Possible values:- 0 -> Void: no randomize request was actually posted on or after the given block number.- 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.- 2 -> Ready: a successfull randomize value was reported and ready to be read.- 3 -> Error: all randomize resolutions after the given block were solved with errors.- 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final.  \"},\"random(uint32,uint256,uint256)\":{\"details\":\"Fails under same conditions as `getRandomnessAfter(uint256)` does.\",\"params\":{\"blockNumber\":\"Block number from which the search for the first randomize request solved aftewards will start.\",\"nonce\":\"Nonce value enabling multiple random numbers from the same randomness value.\",\"range\":\"Range within which the uniformly-distributed random number will be generated.\"}},\"randomize()\":{\"details\":\"Only one randomness request per block will be actually posted to the Witnet Oracle. Unused funds will be transfered back to the `msg.sender`. \",\"returns\":{\"_0\":\"Funds actually paid as randomize fee. \"}}},\"title\":\"The Witnet Randomness generator interface.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"estimateRandomizeFee(uint256)\":{\"notice\":\"Returns amount of wei required to be paid as a fee when requesting randomization with a  transaction gas price as the one given.\"},\"fetchRandomnessAfter(uint256)\":{\"notice\":\"Retrieves the result of keccak256-hashing the given block number with the randomness value generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved after such block number.\"},\"fetchRandomnessAfterProof(uint256)\":{\"notice\":\"Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that tookplace in the Witnet Oracle blockchain in response to the first non-errored randomize requestsolved after the given block number.\"},\"getLastRandomizeBlock()\":{\"notice\":\"Returns last block number on which a randomize was requested.\"},\"getRandomizeData(uint256)\":{\"notice\":\"Retrieves metadata related to the randomize request that got posted to the Witnet Oracle contract on the given block number.\"},\"getRandomizeNextBlock(uint256)\":{\"notice\":\"Returns the number of the next block in which a randomize request was posted after the given one. \"},\"getRandomizePrevBlock(uint256)\":{\"notice\":\"Returns the number of the previous block in which a randomize request was posted before the given one.\"},\"getRandomizeStatus(uint256)\":{\"notice\":\"Gets current status of the first non-errored randomize request posted on or after the given block number.\"},\"isRandomized(uint256)\":{\"notice\":\"Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first non-errored randomize request posted on or after the given block number.\"},\"random(uint32,uint256,uint256)\":{\"notice\":\"Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. \"},\"randomize()\":{\"notice\":\"Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. \"},\"witnet()\":{\"notice\":\"Returns address of the Witnet Oracle bridging contract being used for solving randomness requests.\"},\"witnetQuerySLA()\":{\"notice\":\"Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill when solving randomness requests:- number of witnessing nodes contributing to randomness generation- reward in $nanoWIT received per witnessing node in the Witnet blockchain\"},\"witnetRadHash()\":{\"notice\":\"Returns the unique identifier of the Witnet-compliant data request being used for solving randomness.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/IWitnetRandomness.sol\":\"IWitnetRandomness\"},\"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/IWitnetRandomness.sol\":{\"keccak256\":\"0xe1dece4459bee43e03cbc83e3feb455de406e633c778ac70e3da5d0c65402d68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8d79acbdbddc0882e6067d4722184423102b78fa1ca9fd94e4d0b9c6dd9f4485\",\"dweb:/ipfs/QmVs5it4bV2cqZPfdCejmHh3SybxciuQoKE8pswUWqPc1R\"]},\"project:/contracts/interfaces/IWitnetRequestBytecodes.sol\":{\"keccak256\":\"0x8da168bee9a78442216965976b1f29087f760f37dcb09337283242599ed1cbca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e120623262ee0559913bdae56c0a7921147dfe08ada7ea81061b14e2fc38c5e1\",\"dweb:/ipfs/Qmbxe8XRrH6ZjJHiR6YYzcZV1jnSWwo9iBYz5r6GJ6To5G\"]},\"project:/contracts/interfaces/IWitnetRequestFactory.sol\":{\"keccak256\":\"0x3b19ec4a976745ba2646e7e1886d647ef30ad678460a712c93bbfb4405b57f1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa759ae15b7d4da622a81d50933474910959ac490d8b63ea2e7ed8608859a9c9\",\"dweb:/ipfs/QmRckCu7eBBP5fn9ff6djs7VbdhFc7sxYb2yqDr4go66jV\"]},\"project:/contracts/libs/Witnet.sol\":{\"keccak256\":\"0x65a87375dd79d63a83fb454b7199b6c999bd59c50b3b59d521c5c4d45a7d3cc3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ca865b681d810c2fc5c3672ea6343c3bdf6fd71764ab824d25994744dc85866b\",\"dweb:/ipfs/QmPGcP3xGTNZfsQ9GSKdujNLRVs8dWDdubyUko1rbQqJNv\"]},\"project:/contracts/libs/WitnetBuffer.sol\":{\"keccak256\":\"0xa14570492eb5a313ddbacae0185c850ec99c67211eb33989a5e21d31bf06a150\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e83c11edb49cab6a767c0b685825bc22ece0d3d2897e0d54fe1923df5cc76ba5\",\"dweb:/ipfs/QmdLDgCc3tnKbgRrXwfNzsg6uUDirNmjvBB8V3iMmnD69a\"]},\"project:/contracts/libs/WitnetCBOR.sol\":{\"keccak256\":\"0xb346547ff731163beea2c657c52675cdf7936691d566a76a045577cf9c34ade0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d4b5b6424a033584b41f1204d635db98fda9ca9bd2a614c9d82539a3e4e6529\",\"dweb:/ipfs/QmW6Qy3wWpzHSECYaCPaf9LWGfPqWDKVoP2kPSNNQu7LMQ\"]},\"project:/contracts/libs/WitnetV2.sol\":{\"keccak256\":\"0xb276a6da373bfbe9cd942dd7e59979cda898215d1e36ab3df95a6d6cc6ff770f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc4890876b9bc64f501ccdd48408bb63724865cb2ce8d2057f6b318540adce7c\",\"dweb:/ipfs/QmPMHPdbCsKBavhiLcaDgQ9EjNSvwwzv8TKffotcCv1ctP\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.7.0 <0.9.0;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"../WitnetOracle.sol\";\r\n\r\n/// @title The Witnet Randomness generator interface.\r\n/// @author Witnet Foundation.\r\ninterface IWitnetRandomness {\r\n    \r\n    /// @notice Returns amount of wei required to be paid as a fee when requesting randomization with a \r\n    /// transaction gas price as the one given.\r\n    function estimateRandomizeFee(uint256 evmGasPrice) external view returns (uint256);\r\n\r\n    /// @notice Retrieves the result of keccak256-hashing the given block number with the randomness value \r\n    /// @notice generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved \r\n    /// @notice after such block number.\r\n    /// @dev Reverts if:\r\n    /// @dev   i.   no `randomize()` was requested on neither the given block, nor afterwards.\r\n    /// @dev   ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.\r\n    /// @dev   iii. all `randomize()` requests that took place on or after the given block were solved with errors.\r\n    /// @param blockNumber Block number from which the search will start.\r\n    function fetchRandomnessAfter(uint256 blockNumber) external view returns (bytes32);\r\n\r\n    /// @notice Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that took\r\n    /// @notice place in the Witnet Oracle blockchain in response to the first non-errored randomize request\r\n    /// @notice solved after the given block number.\r\n    /// @dev Reverts if:\r\n    /// @dev   i.   no `randomize()` was requested on neither the given block, nor afterwards.\r\n    /// @dev   ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.\r\n    /// @dev   iii. all `randomize()` requests that took place on or after the given block were solved with errors.\r\n    /// @param blockNumber Block number from which the search will start.\r\n    /// @return witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block.\r\n    /// @return witnetResultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain.\r\n    /// @return witnetResultTallyHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.\r\n    /// @return witnetResultFinalityBlock EVM block number from which the provided randomness can be considered to be final.\r\n    function fetchRandomnessAfterProof(uint256 blockNumber) external view returns (\r\n            bytes32 witnetResultRandomness,\r\n            uint64  witnetResultTimestamp, \r\n            bytes32 witnetResultTallyHash,\r\n            uint256 witnetResultFinalityBlock\r\n        ); \r\n\r\n    /// @notice Returns last block number on which a randomize was requested.\r\n    function getLastRandomizeBlock() external view returns (uint256);\r\n\r\n    /// @notice Retrieves metadata related to the randomize request that got posted to the \r\n    /// @notice Witnet Oracle contract on the given block number.\r\n    /// @dev Returns zero values if no randomize request was actually posted on the given block.\r\n    /// @return witnetQueryId Identifier of the underlying Witnet query created on the given block number. \r\n    /// @return prevRandomizeBlock Block number in which a randomize request got posted just before this one. 0 if none.\r\n    /// @return nextRandomizeBlock Block number in which a randomize request got posted just after this one, 0 if none.\r\n    function getRandomizeData(uint256 blockNumber) external view returns (\r\n            uint256 witnetQueryId,\r\n            uint256 prevRandomizeBlock, \r\n            uint256 nextRandomizeBlock\r\n        );\r\n    \r\n    /// @notice Returns the number of the next block in which a randomize request was posted after the given one. \r\n    /// @param blockNumber Block number from which the search will start.\r\n    /// @return Number of the first block found after the given one, or `0` otherwise.\r\n    function getRandomizeNextBlock(uint256 blockNumber) external view returns (uint256); \r\n\r\n    /// @notice Returns the number of the previous block in which a randomize request was posted before the given one.\r\n    /// @param blockNumber Block number from which the search will start.\r\n    /// @return First block found before the given one, or `0` otherwise.\r\n    function getRandomizePrevBlock(uint256 blockNumber) external view returns (uint256);\r\n\r\n    /// @notice Gets current status of the first non-errored randomize request posted on or after the given block number.\r\n    /// @dev Possible values:\r\n    /// @dev - 0 -> Void: no randomize request was actually posted on or after the given block number.\r\n    /// @dev - 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.\r\n    /// @dev - 2 -> Ready: a successfull randomize value was reported and ready to be read.\r\n    /// @dev - 3 -> Error: all randomize resolutions after the given block were solved with errors.\r\n    /// @dev - 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final.  \r\n    function getRandomizeStatus(uint256 blockNumber) external view returns (WitnetV2.ResponseStatus);\r\n\r\n    /// @notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first \r\n    /// @notice non-errored randomize request posted on or after the given block number.\r\n    function isRandomized(uint256 blockNumber) external view returns (bool);\r\n\r\n    /// @notice Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using \r\n    /// @notice the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. \r\n    /// @dev Fails under same conditions as `getRandomnessAfter(uint256)` does.\r\n    /// @param range Range within which the uniformly-distributed random number will be generated.\r\n    /// @param nonce Nonce value enabling multiple random numbers from the same randomness value.\r\n    /// @param blockNumber Block number from which the search for the first randomize request solved aftewards will start.\r\n    function random(uint32 range, uint256 nonce, uint256 blockNumber) external view returns (uint32);\r\n\r\n    /// @notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. \r\n    /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. \r\n    /// @dev Unused funds will be transfered back to the `msg.sender`. \r\n    /// @return Funds actually paid as randomize fee. \r\n    function randomize() external payable returns (uint256);\r\n\r\n    /// @notice Returns address of the Witnet Oracle bridging contract being used for solving randomness requests.\r\n    function witnet() external view returns (WitnetOracle);\r\n\r\n    /// @notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill \r\n    /// @notice when solving randomness requests:\r\n    /// @notice - number of witnessing nodes contributing to randomness generation\r\n    /// @notice - reward in $nanoWIT received per witnessing node in the Witnet blockchain\r\n    function witnetQuerySLA() external view returns (WitnetV2.RadonSLA memory);\r\n\r\n    /// @notice Returns the unique identifier of the Witnet-compliant data request being used for solving randomness.\r\n    function witnetRadHash() external view returns (bytes32);\r\n}\r\n",
  "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\interfaces\\IWitnetRandomness.sol",
  "ast": {
    "absolutePath": "project:/contracts/interfaces/IWitnetRandomness.sol",
    "exportedSymbols": {
      "IWitnetOracle": [
        13265
      ],
      "IWitnetOracleEvents": [
        13315
      ],
      "IWitnetRandomness": [
        13639
      ],
      "IWitnetRequestBytecodes": [
        13979
      ],
      "IWitnetRequestFactory": [
        14002
      ],
      "Witnet": [
        17557
      ],
      "WitnetBuffer": [
        19191
      ],
      "WitnetCBOR": [
        20734
      ],
      "WitnetOracle": [
        749
      ],
      "WitnetRequestBytecodes": [
        849
      ],
      "WitnetRequestFactory": [
        880
      ],
      "WitnetV2": [
        23640
      ]
    },
    "id": 13640,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 13516,
        "literals": [
          "solidity",
          ">=",
          "0.7",
          ".0",
          "<",
          "0.9",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "35:31:55"
      },
      {
        "id": 13517,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "68:33:55"
      },
      {
        "absolutePath": "project:/contracts/WitnetOracle.sol",
        "file": "../WitnetOracle.sol",
        "id": 13518,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 13640,
        "sourceUnit": 750,
        "src": "105:29:55",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "canonicalName": "IWitnetRandomness",
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": {
          "id": 13519,
          "nodeType": "StructuredDocumentation",
          "src": "138:87:55",
          "text": "@title The Witnet Randomness generator interface.\n @author Witnet Foundation."
        },
        "fullyImplemented": false,
        "id": 13639,
        "linearizedBaseContracts": [
          13639
        ],
        "name": "IWitnetRandomness",
        "nameLocation": "235:17:55",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "documentation": {
              "id": 13520,
              "nodeType": "StructuredDocumentation",
              "src": "266:149:55",
              "text": "@notice Returns amount of wei required to be paid as a fee when requesting randomization with a \n transaction gas price as the one given."
            },
            "functionSelector": "a60ee268",
            "id": 13527,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "estimateRandomizeFee",
            "nameLocation": "430:20:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13523,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13522,
                  "mutability": "mutable",
                  "name": "evmGasPrice",
                  "nameLocation": "459:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13527,
                  "src": "451:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13521,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "451:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "450:21:55"
            },
            "returnParameters": {
              "id": 13526,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13525,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13527,
                  "src": "495:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13524,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "495:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "494:9:55"
            },
            "scope": 13639,
            "src": "421:83:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13528,
              "nodeType": "StructuredDocumentation",
              "src": "512:699:55",
              "text": "@notice Retrieves the result of keccak256-hashing the given block number with the randomness value \n @notice generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved \n @notice after such block number.\n @dev Reverts if:\n @dev   i.   no `randomize()` was requested on neither the given block, nor afterwards.\n @dev   ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.\n @dev   iii. all `randomize()` requests that took place on or after the given block were solved with errors.\n @param blockNumber Block number from which the search will start."
            },
            "functionSelector": "82b1c174",
            "id": 13535,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "fetchRandomnessAfter",
            "nameLocation": "1226:20:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13531,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13530,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "1255:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13535,
                  "src": "1247:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13529,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1247:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1246:21:55"
            },
            "returnParameters": {
              "id": 13534,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13533,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13535,
                  "src": "1291:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13532,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1291:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1290:9:55"
            },
            "scope": 13639,
            "src": "1217:83:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13536,
              "nodeType": "StructuredDocumentation",
              "src": "1308:1219:55",
              "text": "@notice Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that took\n @notice place in the Witnet Oracle blockchain in response to the first non-errored randomize request\n @notice solved after the given block number.\n @dev Reverts if:\n @dev   i.   no `randomize()` was requested on neither the given block, nor afterwards.\n @dev   ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.\n @dev   iii. all `randomize()` requests that took place on or after the given block were solved with errors.\n @param blockNumber Block number from which the search will start.\n @return witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block.\n @return witnetResultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain.\n @return witnetResultTallyHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.\n @return witnetResultFinalityBlock EVM block number from which the provided randomness can be considered to be final."
            },
            "functionSelector": "17f45487",
            "id": 13549,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "fetchRandomnessAfterProof",
            "nameLocation": "2542:25:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13539,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13538,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "2576:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13549,
                  "src": "2568:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13537,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2568:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2567:21:55"
            },
            "returnParameters": {
              "id": 13548,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13541,
                  "mutability": "mutable",
                  "name": "witnetResultRandomness",
                  "nameLocation": "2634:22:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13549,
                  "src": "2626:30:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13540,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2626:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13543,
                  "mutability": "mutable",
                  "name": "witnetResultTimestamp",
                  "nameLocation": "2679:21:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13549,
                  "src": "2671:29:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 13542,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "2671:6:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13545,
                  "mutability": "mutable",
                  "name": "witnetResultTallyHash",
                  "nameLocation": "2724:21:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13549,
                  "src": "2716:29:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13544,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2716:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13547,
                  "mutability": "mutable",
                  "name": "witnetResultFinalityBlock",
                  "nameLocation": "2768:25:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13549,
                  "src": "2760:33:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13546,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2760:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2611:193:55"
            },
            "scope": 13639,
            "src": "2533:272:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13550,
              "nodeType": "StructuredDocumentation",
              "src": "2814:73:55",
              "text": "@notice Returns last block number on which a randomize was requested."
            },
            "functionSelector": "8f261684",
            "id": 13555,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getLastRandomizeBlock",
            "nameLocation": "2902:21:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13551,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2923:2:55"
            },
            "returnParameters": {
              "id": 13554,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13553,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13555,
                  "src": "2949:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13552,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2949:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2948:9:55"
            },
            "scope": 13639,
            "src": "2893:65:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13556,
              "nodeType": "StructuredDocumentation",
              "src": "2966:604:55",
              "text": "@notice Retrieves metadata related to the randomize request that got posted to the \n @notice Witnet Oracle contract on the given block number.\n @dev Returns zero values if no randomize request was actually posted on the given block.\n @return witnetQueryId Identifier of the underlying Witnet query created on the given block number. \n @return prevRandomizeBlock Block number in which a randomize request got posted just before this one. 0 if none.\n @return nextRandomizeBlock Block number in which a randomize request got posted just after this one, 0 if none."
            },
            "functionSelector": "a3252f68",
            "id": 13567,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRandomizeData",
            "nameLocation": "3585:16:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13559,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13558,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "3610:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13567,
                  "src": "3602:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13557,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3602:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3601:21:55"
            },
            "returnParameters": {
              "id": 13566,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13561,
                  "mutability": "mutable",
                  "name": "witnetQueryId",
                  "nameLocation": "3668:13:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13567,
                  "src": "3660:21:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13560,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3660:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13563,
                  "mutability": "mutable",
                  "name": "prevRandomizeBlock",
                  "nameLocation": "3704:18:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13567,
                  "src": "3696:26:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13562,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3696:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13565,
                  "mutability": "mutable",
                  "name": "nextRandomizeBlock",
                  "nameLocation": "3746:18:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13567,
                  "src": "3738:26:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13564,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3738:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3645:130:55"
            },
            "scope": 13639,
            "src": "3576:200:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13568,
              "nodeType": "StructuredDocumentation",
              "src": "3788:273:55",
              "text": "@notice Returns the number of the next block in which a randomize request was posted after the given one. \n @param blockNumber Block number from which the search will start.\n @return Number of the first block found after the given one, or `0` otherwise."
            },
            "functionSelector": "de0958ac",
            "id": 13575,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRandomizeNextBlock",
            "nameLocation": "4076:21:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13571,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13570,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "4106:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13575,
                  "src": "4098:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13569,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4098:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4097:21:55"
            },
            "returnParameters": {
              "id": 13574,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13573,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13575,
                  "src": "4142:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13572,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4142:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4141:9:55"
            },
            "scope": 13639,
            "src": "4067:84:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13576,
              "nodeType": "StructuredDocumentation",
              "src": "4160:264:55",
              "text": "@notice Returns the number of the previous block in which a randomize request was posted before the given one.\n @param blockNumber Block number from which the search will start.\n @return First block found before the given one, or `0` otherwise."
            },
            "functionSelector": "c0248bf1",
            "id": 13583,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRandomizePrevBlock",
            "nameLocation": "4439:21:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13579,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13578,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "4469:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13583,
                  "src": "4461:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13577,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4461:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4460:21:55"
            },
            "returnParameters": {
              "id": 13582,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13581,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13583,
                  "src": "4505:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13580,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4505:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4504:9:55"
            },
            "scope": 13639,
            "src": "4430:84:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13584,
              "nodeType": "StructuredDocumentation",
              "src": "4522:685:55",
              "text": "@notice Gets current status of the first non-errored randomize request posted on or after the given block number.\n @dev Possible values:\n @dev - 0 -> Void: no randomize request was actually posted on or after the given block number.\n @dev - 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.\n @dev - 2 -> Ready: a successfull randomize value was reported and ready to be read.\n @dev - 3 -> Error: all randomize resolutions after the given block were solved with errors.\n @dev - 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final.  "
            },
            "functionSelector": "76fa9d20",
            "id": 13592,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRandomizeStatus",
            "nameLocation": "5222:18:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13587,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13586,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "5249:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13592,
                  "src": "5241:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13585,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5241:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5240:21:55"
            },
            "returnParameters": {
              "id": 13591,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13590,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13592,
                  "src": "5285:23:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                    "typeString": "enum WitnetV2.ResponseStatus"
                  },
                  "typeName": {
                    "id": 13589,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13588,
                      "name": "WitnetV2.ResponseStatus",
                      "nameLocations": [
                        "5285:8:55",
                        "5294:14:55"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23496,
                      "src": "5285:23:55"
                    },
                    "referencedDeclaration": 23496,
                    "src": "5285:23:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_ResponseStatus_$23496",
                      "typeString": "enum WitnetV2.ResponseStatus"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5284:25:55"
            },
            "scope": 13639,
            "src": "5213:97:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13593,
              "nodeType": "StructuredDocumentation",
              "src": "5318:200:55",
              "text": "@notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first \n @notice non-errored randomize request posted on or after the given block number."
            },
            "functionSelector": "9bc86fec",
            "id": 13600,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "isRandomized",
            "nameLocation": "5533:12:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13596,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13595,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "5554:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13600,
                  "src": "5546:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13594,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5546:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5545:21:55"
            },
            "returnParameters": {
              "id": 13599,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13598,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13600,
                  "src": "5590:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 13597,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5590:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5589:6:55"
            },
            "scope": 13639,
            "src": "5524:72:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13601,
              "nodeType": "StructuredDocumentation",
              "src": "5604:614:55",
              "text": "@notice Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using \n @notice the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. \n @dev Fails under same conditions as `getRandomnessAfter(uint256)` does.\n @param range Range within which the uniformly-distributed random number will be generated.\n @param nonce Nonce value enabling multiple random numbers from the same randomness value.\n @param blockNumber Block number from which the search for the first randomize request solved aftewards will start."
            },
            "functionSelector": "24cbbfc1",
            "id": 13612,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "random",
            "nameLocation": "6233:6:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13608,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13603,
                  "mutability": "mutable",
                  "name": "range",
                  "nameLocation": "6247:5:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13612,
                  "src": "6240:12:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 13602,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6240:6:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13605,
                  "mutability": "mutable",
                  "name": "nonce",
                  "nameLocation": "6262:5:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13612,
                  "src": "6254:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13604,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6254:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 13607,
                  "mutability": "mutable",
                  "name": "blockNumber",
                  "nameLocation": "6277:11:55",
                  "nodeType": "VariableDeclaration",
                  "scope": 13612,
                  "src": "6269:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13606,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6269:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6239:50:55"
            },
            "returnParameters": {
              "id": 13611,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13610,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13612,
                  "src": "6313:6:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 13609,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6313:6:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6312:8:55"
            },
            "scope": 13639,
            "src": "6224:97:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13613,
              "nodeType": "StructuredDocumentation",
              "src": "6329:331:55",
              "text": "@notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. \n @dev Only one randomness request per block will be actually posted to the Witnet Oracle. \n @dev Unused funds will be transfered back to the `msg.sender`. \n @return Funds actually paid as randomize fee. "
            },
            "functionSelector": "699b328a",
            "id": 13618,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "randomize",
            "nameLocation": "6675:9:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13614,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6684:2:55"
            },
            "returnParameters": {
              "id": 13617,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13616,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13618,
                  "src": "6713:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 13615,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6713:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6712:9:55"
            },
            "scope": 13639,
            "src": "6666:56:55",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13619,
              "nodeType": "StructuredDocumentation",
              "src": "6730:110:55",
              "text": "@notice Returns address of the Witnet Oracle bridging contract being used for solving randomness requests."
            },
            "functionSelector": "46d1d21a",
            "id": 13625,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "witnet",
            "nameLocation": "6855:6:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13620,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6861:2:55"
            },
            "returnParameters": {
              "id": 13624,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13623,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13625,
                  "src": "6887:12:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_WitnetOracle_$749",
                    "typeString": "contract WitnetOracle"
                  },
                  "typeName": {
                    "id": 13622,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13621,
                      "name": "WitnetOracle",
                      "nameLocations": [
                        "6887:12:55"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 749,
                      "src": "6887:12:55"
                    },
                    "referencedDeclaration": 749,
                    "src": "6887:12:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WitnetOracle_$749",
                      "typeString": "contract WitnetOracle"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6886:14:55"
            },
            "scope": 13639,
            "src": "6846:55:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13626,
              "nodeType": "StructuredDocumentation",
              "src": "6909:319:55",
              "text": "@notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill \n @notice when solving randomness requests:\n @notice - number of witnessing nodes contributing to randomness generation\n @notice - reward in $nanoWIT received per witnessing node in the Witnet blockchain"
            },
            "functionSelector": "9353badd",
            "id": 13632,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "witnetQuerySLA",
            "nameLocation": "7243:14:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13627,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7257:2:55"
            },
            "returnParameters": {
              "id": 13631,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13630,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13632,
                  "src": "7283:24:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_RadonSLA_$23503_memory_ptr",
                    "typeString": "struct WitnetV2.RadonSLA"
                  },
                  "typeName": {
                    "id": 13629,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 13628,
                      "name": "WitnetV2.RadonSLA",
                      "nameLocations": [
                        "7283:8:55",
                        "7292:8:55"
                      ],
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 23503,
                      "src": "7283:17:55"
                    },
                    "referencedDeclaration": 23503,
                    "src": "7283:17:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr",
                      "typeString": "struct WitnetV2.RadonSLA"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7282:26:55"
            },
            "scope": 13639,
            "src": "7234:75:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "documentation": {
              "id": 13633,
              "nodeType": "StructuredDocumentation",
              "src": "7317:113:55",
              "text": "@notice Returns the unique identifier of the Witnet-compliant data request being used for solving randomness."
            },
            "functionSelector": "613e9978",
            "id": 13638,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "witnetRadHash",
            "nameLocation": "7445:13:55",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 13634,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7458:2:55"
            },
            "returnParameters": {
              "id": 13637,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 13636,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13638,
                  "src": "7484:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 13635,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "7484:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7483:9:55"
            },
            "scope": 13639,
            "src": "7436:57:55",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          }
        ],
        "scope": 13640,
        "src": "225:7271:55",
        "usedErrors": [],
        "usedEvents": []
      }
    ],
    "src": "35:7463:55"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.25+commit.b61c2a91.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2024-12-05T09:36:04.509Z",
  "devdoc": {
    "author": "Witnet Foundation.",
    "kind": "dev",
    "methods": {
      "fetchRandomnessAfter(uint256)": {
        "details": "Reverts if:i.   no `randomize()` was requested on neither the given block, nor afterwards.ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.",
        "params": {
          "blockNumber": "Block number from which the search will start."
        }
      },
      "fetchRandomnessAfterProof(uint256)": {
        "details": "Reverts if:i.   no `randomize()` was requested on neither the given block, nor afterwards.ii.  the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.",
        "params": {
          "blockNumber": "Block number from which the search will start."
        },
        "returns": {
          "witnetResultFinalityBlock": "EVM block number from which the provided randomness can be considered to be final.",
          "witnetResultRandomness": "Random value provided by the Witnet blockchain and used for solving randomness after given block.",
          "witnetResultTallyHash": "Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.",
          "witnetResultTimestamp": "Timestamp at which the randomness value was generated by the Witnet blockchain."
        }
      },
      "getRandomizeData(uint256)": {
        "details": "Returns zero values if no randomize request was actually posted on the given block.",
        "returns": {
          "nextRandomizeBlock": "Block number in which a randomize request got posted just after this one, 0 if none.",
          "prevRandomizeBlock": "Block number in which a randomize request got posted just before this one. 0 if none.",
          "witnetQueryId": "Identifier of the underlying Witnet query created on the given block number. "
        }
      },
      "getRandomizeNextBlock(uint256)": {
        "params": {
          "blockNumber": "Block number from which the search will start."
        },
        "returns": {
          "_0": "Number of the first block found after the given one, or `0` otherwise."
        }
      },
      "getRandomizePrevBlock(uint256)": {
        "params": {
          "blockNumber": "Block number from which the search will start."
        },
        "returns": {
          "_0": "First block found before the given one, or `0` otherwise."
        }
      },
      "getRandomizeStatus(uint256)": {
        "details": "Possible values:- 0 -> Void: no randomize request was actually posted on or after the given block number.- 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.- 2 -> Ready: a successfull randomize value was reported and ready to be read.- 3 -> Error: all randomize resolutions after the given block were solved with errors.- 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final.  "
      },
      "random(uint32,uint256,uint256)": {
        "details": "Fails under same conditions as `getRandomnessAfter(uint256)` does.",
        "params": {
          "blockNumber": "Block number from which the search for the first randomize request solved aftewards will start.",
          "nonce": "Nonce value enabling multiple random numbers from the same randomness value.",
          "range": "Range within which the uniformly-distributed random number will be generated."
        }
      },
      "randomize()": {
        "details": "Only one randomness request per block will be actually posted to the Witnet Oracle. Unused funds will be transfered back to the `msg.sender`. ",
        "returns": {
          "_0": "Funds actually paid as randomize fee. "
        }
      }
    },
    "title": "The Witnet Randomness generator interface.",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {
      "estimateRandomizeFee(uint256)": {
        "notice": "Returns amount of wei required to be paid as a fee when requesting randomization with a  transaction gas price as the one given."
      },
      "fetchRandomnessAfter(uint256)": {
        "notice": "Retrieves the result of keccak256-hashing the given block number with the randomness value generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved after such block number."
      },
      "fetchRandomnessAfterProof(uint256)": {
        "notice": "Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that tookplace in the Witnet Oracle blockchain in response to the first non-errored randomize requestsolved after the given block number."
      },
      "getLastRandomizeBlock()": {
        "notice": "Returns last block number on which a randomize was requested."
      },
      "getRandomizeData(uint256)": {
        "notice": "Retrieves metadata related to the randomize request that got posted to the Witnet Oracle contract on the given block number."
      },
      "getRandomizeNextBlock(uint256)": {
        "notice": "Returns the number of the next block in which a randomize request was posted after the given one. "
      },
      "getRandomizePrevBlock(uint256)": {
        "notice": "Returns the number of the previous block in which a randomize request was posted before the given one."
      },
      "getRandomizeStatus(uint256)": {
        "notice": "Gets current status of the first non-errored randomize request posted on or after the given block number."
      },
      "isRandomized(uint256)": {
        "notice": "Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first non-errored randomize request posted on or after the given block number."
      },
      "random(uint32,uint256,uint256)": {
        "notice": "Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. "
      },
      "randomize()": {
        "notice": "Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. "
      },
      "witnet()": {
        "notice": "Returns address of the Witnet Oracle bridging contract being used for solving randomness requests."
      },
      "witnetQuerySLA()": {
        "notice": "Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill when solving randomness requests:- number of witnessing nodes contributing to randomness generation- reward in $nanoWIT received per witnessing node in the Witnet blockchain"
      },
      "witnetRadHash()": {
        "notice": "Returns the unique identifier of the Witnet-compliant data request being used for solving randomness."
      }
    },
    "version": 1
  }
}