Skip to content

📃 UsingWitnetRandomness

Solidity wizard

Constructor

ParametersTypeDescription
_witnetRandomnessWitnetRandomnessAddress of the WitnetRandomnesscontract to interact with.

Properties

NameVisibilityDescription
witnetImmutable publicAddress of the WitnetOracle instance used by WitnetRandomness for posting randomize requests.
__RNGImmutable internalWitnetRandomness instance where to query and fetch randomness from.

Events

EventsArgumentsDescription
WitnetQuery

address evmRequester

uint256 evmGasPrice

uint256 evmReward

uint256 queryId

bytes32 queryRadHash

RadonSLA querySLA

Emitted every time a new randomize query gets posted to the WitnetOracle contract.
WitnetQueryUpgrade

uint256 queryId

address evmSender

uint256 evmGasPrice

uint256 evmReward

Emitted if the EVM reward for solving a previously posted randomize is increased by anyone in any amount.
Randomizing

address evmOrigin

address evmSender

uint256 witOracleQueryId

Emitted every time a new randomize is requested to the WitnetRandomness contract.