Appearance
📃 UsingWitnetRequest
Constructor
| Parameters | Type | Description |
|---|---|---|
| _witnetRequest | WitnetRequest | Address of the WitnetRequestinstance to use as reference when querying data updates to WitnetOracle. |
| _baseFeeOverHeadPercentage | uint16 | Percentage over base fee to pay when querying new data updates. |
Properties
| Name | Visibility | Description |
|---|---|---|
| dataRequest | Immutable public | Address of the WitnetRequestinstance passed in the constructor. |
| __witnet | Immutable internal | Address of the WitnetOracle instance to directly interact with. |
| __witnetBaseFeeOverheadPercentage | Internal | Percentage over base fee to pay when querying new data updates. Defaults to 33%. |
| __witnetDefaultSLA | Internal | Default Service Level Agreement parameters to be fulfilled by the Wit/Oracle blockchain when solving data updates. |
| __witnetRequestRadHash | Immutable internal | Immutable RAD hash identifying the actual sources and computations being solved by the Wit/Oracle upon every data update. |
Internal methods
| Methods | Description |
|---|---|
| _witnetCheckQueryResponseStatus(uint256) | Check current WitnetV2.ResponseStatus of the specified query. |
| _witnetCheckQueryResultAvailability(uint256) | Check if the specified query was already reported back from the Wit/Oracle blockchain. |
| _witnetCheckQueryResultError(uint256) | Get detailed Witnet.ResultError for the specified query. |
| _witnetEstimateEvmReward() | Estimate the minimum reward required for posting a data request, using tx.gasprice as a reference. |
| __witnetRequestData(uint256 _evmReward) | Post a data query in expectation that it will get eventually solved and reported from the Wit/Oracle blockchain, specifying how much fee to pay out from this contract's balance. |
| __witnetRequestData(uint256, RadonSLA) | Post a data query in expectation that it will get eventually solved and reported, specifying how much fee to pay and the SLA parameters to be fulfilled by the Wit/Oracle blockchain. |
Events
| Events | Arguments | Description |
|---|---|---|
| WitnetQuery |
| Emitted every time a new randomize query gets posted to the WitnetOracle contract. |
| WitnetQueryUpgrade |
| Emitted if the EVM reward for solving a previously posted randomize is increased by anyone in any amount. |