Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 2.9 KB

File metadata and controls

23 lines (14 loc) · 2.9 KB

📃 UsingWitnet

{% content-ref url="../../solidity-wizard.md" %} solidity-wizard.md {% endcontent-ref %}

Constructor

Parameters Type Description
_witnetOracle WitnetOracle Address of the WitnetOracle instance to interact with.

Properties

NameVisibilityDescription
__witnetImmutable internalAddress of the WitnetOracle instance to directly interact with.
__witnetBaseFeeOverheadPercentageInternalPercentage over base fee to pay when querying new data updates. Defaults to 33%.
__witnetDefaultSLAInternalDefault Service Level Agreement parameters to be fulfilled by the Wit/Oracle blockchain when solving data updates.

Internal methods

MethodsDescription
_witnetCheckQueryResultAvailability(uint256)Check if the specified query was already reported back from the Wit/Oracle blockchain.
_witnetEstimateEvmReward(uint16)Estimate the minimum reward required for posting a data request, using tx.gasprice as a reference.
_witnetCheckQueryResponseStatus(uint256)Check current WitnetV2.ResponseStatus of the specified query.
_witnetCheckQueryResultError(uint256)Get detailed Witnet.ResultError for the specified query.

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.